public interface GroupOperations
The operations give matching results for records that belong to a group.
A matching result can produce matched or suspected records.
In order to create an instance of this class, the external program must provide an authenticated session:
GroupOperations groupOperations = OperationsFactory.getGroupOperations(session);
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();
}
}
MatchingOperationsProvider.getOperations(Session)| Modifier and Type | Method and Description |
|---|---|
Group |
getGroup(com.onwbp.adaptation.AdaptationTable table,
BigDecimal groupId)
Returns a group
|
Groups |
getGroupsWithActionRequired(com.onwbp.adaptation.AdaptationTable table)
Returns groups of records that require user-performed actions.
|
Groups getGroupsWithActionRequired(com.onwbp.adaptation.AdaptationTable table) throws com.orchestranetworks.addon.mame.common.InvalidStateException
table - a EBX tablecom.orchestranetworks.addon.mame.common.InvalidStateExceptionGroup getGroup(com.onwbp.adaptation.AdaptationTable table, BigDecimal groupId) throws com.orchestranetworks.addon.mame.common.NotFoundException
table - an EBX tablegroupId - a group idcom.orchestranetworks.addon.mame.common.NotFoundException