public interface MergeOperations
public class ScriptTaskMergeSample extends ScriptTask { private AdaptationTable table; private BigDecimal groupId; public void executeScript(ScriptTaskContext scriptTaskContext) throws OperationException { Session session = scriptTaskContext.getSession(); MergeOperations mergeOperations = OperationsFactory.getMergeOperations(session); try { //merge a group based on it's group id. MergeProcess mergeProcess = mergeOperations.merge(table, groupId); } catch (InvalidStateException e) { e.printStackTrace(); } } public AdaptationTable getTable() { return this.table; } public void setTable(AdaptationTable table) { this.table = table; } public BigDecimal getGroupId() { return this.groupId; } public void setGroupId(BigDecimal groupId) { this.groupId = groupId; } }
Modifier and Type | Method and Description |
---|---|
MergeProcess |
merge(com.onwbp.adaptation.AdaptationTable table,
BigDecimal groupId)
Deprecated.
Since 5.3.0. This method is replaced by
mergeGroup(AdaptationTable, BigDecimal)
Executes a merging process to merge a group of records. A merge policy should be defined beforehand and linked to the table on which the merged action is executed. |
MergeProcess |
mergeGroup(com.onwbp.adaptation.AdaptationTable table,
BigDecimal groupId)
Executes a merging process to merge a group of records.
|
MergeProcess |
mergeGroup(com.onwbp.adaptation.AdaptationTable table,
BigDecimal groupId,
String mergePolicyCode)
Executes a merging process to merge a group of records using the specified merge policy.
|
MergeProcess |
mergeRecords(List<com.onwbp.adaptation.Adaptation> records)
Executes a merging process to merge a selection of records.
|
MergeProcess |
mergeRecords(List<com.onwbp.adaptation.Adaptation> records,
String mergePolicyCode)
Executes a merging process to merge a selection of records using the specified merge policy.
|
void |
unmerge(com.onwbp.adaptation.AdaptationTable table,
com.onwbp.adaptation.PrimaryKey recordPk)
Reverts a merge operation on a group.
|
@Deprecated MergeProcess merge(com.onwbp.adaptation.AdaptationTable table, BigDecimal groupId) throws com.orchestranetworks.service.OperationException, com.orchestranetworks.addon.mame.common.InvalidStateException
mergeGroup(AdaptationTable, BigDecimal)
Executes a merging process to merge a group of records. A merge policy should be defined beforehand and linked to the table on which the merged action is executed.
table
- An EBX tablegroupId
- A group id of a group of recordscom.orchestranetworks.service.OperationException
- When unexpected errors occurcom.orchestranetworks.addon.mame.common.InvalidStateException
- When one of the following occur:
MergeProcess mergeGroup(com.onwbp.adaptation.AdaptationTable table, BigDecimal groupId) throws com.orchestranetworks.service.OperationException, com.orchestranetworks.addon.mame.common.InvalidStateException, com.orchestranetworks.addon.mame.common.InvalidParameterException
Used for manual merge
set to true.
Note that only one merge policy can have this setting activated.
If you prefer use another merge policy than the one configured by default,
use mergeGroup(AdaptationTable, BigDecimal, String)
instead.table
- An EBX tablegroupId
- A group id of a group of recordscom.orchestranetworks.service.OperationException
- When unexpected errors occurcom.orchestranetworks.addon.mame.common.InvalidParameterException
- When one of the following occur:
null
null
com.orchestranetworks.addon.mame.common.InvalidStateException
- When one of the following occur:
MergeProcess mergeGroup(com.onwbp.adaptation.AdaptationTable table, BigDecimal groupId, String mergePolicyCode) throws com.orchestranetworks.service.OperationException, com.orchestranetworks.addon.mame.common.InvalidStateException, com.orchestranetworks.addon.mame.common.InvalidParameterException
table
- An EBX tablegroupId
- A group id of a group of recordsmergePolicyCode
- A merge policy codecom.orchestranetworks.addon.mame.common.InvalidParameterException
- When one of the following occur:
null
or emptymergePolicyCode
is null
or emptyAuto-create new golden record
mode is not set to Duplicates and Singletons
.com.orchestranetworks.addon.mame.common.InvalidStateException
- When one of the following occur:
mergePolicyCode
in the business table's matching configuration.com.orchestranetworks.service.OperationException
MergeProcess mergeRecords(List<com.onwbp.adaptation.Adaptation> records) throws com.orchestranetworks.service.OperationException, com.orchestranetworks.addon.mame.common.InvalidStateException, com.orchestranetworks.addon.mame.common.InvalidParameterException
Used for manual merged
property set to true. Note
that only one merge policy can have this setting activated.
If you prefer use another merge policy than the one configured by default,
use mergeRecords(List, String)
instead.records
- A selection of records need to be mergedcom.orchestranetworks.service.OperationException
- When unexpected errors occurcom.orchestranetworks.addon.mame.common.InvalidParameterException
- When one of the following occur:
null
or emptyAuto create new golden record
mode is not set to Duplicates and Singletons
.
com.orchestranetworks.addon.mame.common.InvalidStateException
- When one of the following occur:
MergeProcess mergeRecords(List<com.onwbp.adaptation.Adaptation> records, String mergePolicyCode) throws com.orchestranetworks.service.OperationException, com.orchestranetworks.addon.mame.common.InvalidStateException, com.orchestranetworks.addon.mame.common.InvalidParameterException
records
- A selection of recordsmergePolicyCode
- A merge policy codecom.orchestranetworks.addon.mame.common.InvalidParameterException
- When one of the following occur:
null
or emptynull
or emptyAuto-create new golden record
mode is not set to Duplicates and Singletons
.com.orchestranetworks.addon.mame.common.InvalidStateException
- When one of the following occur:
mergePolicyCode
in business table's matching configuration.com.orchestranetworks.service.OperationException
void unmerge(com.onwbp.adaptation.AdaptationTable table, com.onwbp.adaptation.PrimaryKey recordPk) throws com.orchestranetworks.addon.mame.common.NotFoundException, com.orchestranetworks.addon.mame.common.InvalidStateException, com.orchestranetworks.service.OperationException
com.orchestranetworks.service.OperationException
- When unexpected errors occurcom.orchestranetworks.addon.mame.common.NotFoundException
- When a record with the given `recordPk` cannot be foundcom.orchestranetworks.addon.mame.common.InvalidStateException
- When one of the following occur: