Interface GroupOperations
public interface GroupOperations
Provides group operations for the EBX� Match and Merge Add-on. These operations must be called within a different EBX context, such as a:
user service, script/user task, or trigger.
The operations give matching results for records that belong to a group.
A matching result can produce matched
or suspected
records.
Using this class
In order to create an instance of this class, the external program must provide an authenticated session:
GroupOperations groupOperations = OperationsFactory.getGroupOperations(session);
Code Sample
public class CustomMatchingUserServiceSample implements UserService<TableViewEntitySelection> { public void setupDisplay(UserServiceSetupDisplayContext<TableViewEntitySelection> context, UserServiceDisplayConfigurator configurator) { Session session = context.getSession(); AdaptationHome dataspace = context.getRepository().lookupHome(HomeKey.parse("BMAME-TEST")); Adaptation dataset = dataspace.findAdaptationOrNull(AdaptationName.forName("testMame")); AdaptationTable table = dataset.getTable(PathPerson._People.getPathInSchema()); Adaptation pk = table.lookupAdaptationByPrimaryKey(PrimaryKey.parseString("1")); BigDecimal groupId = (BigDecimal) pk.get(Path.parse("/Linked_Field_GroupId")); //access to the group operation interface GroupOperations groupOperations = OperationsFactory.getGroupOperations(session); try { //get a group in order to access matches and suspects of this group Group group = groupOperations.getGroup(table, groupId); RecordIterable matches = group.getMatches(); RecordIterable suspects = group.getSuspects(); } catch (NotFoundException e) { e.printStackTrace(); } // access to get groups with action required. this can be the groups that require a merge action or which contain suspects or false positives. try { Groups groups = groupOperations.getGroupsWithActionRequired(table); List<Group> groupsWithFalsePositives = groups.getGroupsWithFalsePositives(); } catch (InvalidStateException e) { e.printStackTrace(); } }
- See Also:
-
MatchingOperationsProvider.getOperations(Session)
-
Method Summary
Modifier and TypeMethodDescriptiongetGroup
(com.onwbp.adaptation.AdaptationTable table, BigDecimal groupId) Returns a groupgetGroupsWithActionRequired
(com.onwbp.adaptation.AdaptationTable table) Returns groups of records that require user-performed actions.
-
Method Details
-
getGroupsWithActionRequired
Groups getGroupsWithActionRequired(com.onwbp.adaptation.AdaptationTable table) throws com.orchestranetworks.addon.mame.common.InvalidStateException Returns groups of records that require user-performed actions. For example, groups that:- Need to be merged
- Contain suspects
- Include false positives
- Parameters:
table
- a EBX table- Returns:
- Groups a representation of groups of records that require manual actions
- Throws:
com.orchestranetworks.addon.mame.common.InvalidStateException
-
getGroup
Group getGroup(com.onwbp.adaptation.AdaptationTable table, BigDecimal groupId) throws com.orchestranetworks.addon.mame.common.NotFoundException Returns a group- Parameters:
table
- an EBX tablegroupId
- a group id- Returns:
- a group of matches and suspects records.
- Throws:
com.orchestranetworks.addon.mame.common.NotFoundException
-