com.sun.mdm.index.ejb.master
Class MasterControllerEJB

java.lang.Object
  extended bycom.sun.mdm.index.ejb.master.MasterControllerEJB
All Implemented Interfaces:
MasterController, MasterControllerLocal, MasterControllerRemote

public class MasterControllerEJB
extends java.lang.Object
implements MasterControllerRemote, MasterControllerLocal

The Master Controller EJB implements the main interface that is exposed to clients of the indexing system. This is a stateless session bean, though some methods will return objects that have handles to stateful beans.


Constructor Summary
MasterControllerEJB()
          No argument constructor required by container.
 
Method Summary
 void activateEnterpriseObject(java.lang.String euid)
          Changes the status of a deactivated enterprise object back to active.
 void activateSystemObject(SystemObjectPK systemKey)
          Changes the status of a deactivated system object back to active.
 void addSystemObject(java.lang.String euid, SystemObject sysobj)
          Adds the system object to the enterprise object associated with the EUID.
 void calculatePotentialDuplicates(java.lang.String euid, java.lang.String transID)
          Calculates potential duplicates for the specified EUID and transaction ID.
 SBR calculateSBR(EnterpriseObject eo)
          Calculates a new single best record (SBR) for an enterprise object that has been updated.
 void cleanUp()
          cleanUp before the instance is destroyed
 int countAssumedMatches(AssumedMatchSearchObject amso)
          Counts the number of assumed match records matching the date criteria specified in search object.
 int countPotentialDuplicates(PotentialDuplicateSearchObject pdso)
          Counts the number of potential duplicate records matching the criteria specified in search object.
 EnterpriseObject createEnterpriseObject(SystemObject sysobj)
          Creates a new enterprise object to add to the master index database using the information in the specified system object.
 EnterpriseObject createEnterpriseObject(SystemObject[] sysobj)
          Creates a new enterprise object to add to the master index database using the information in the specified array of system objects.
 void deactivateEnterpriseObject(java.lang.String euid)
          Changes the status of an enterprise object from active to inactive and deletes all potential duplicate listings for that object.
 void deactivateSystemObject(SystemObjectPK systemKey)
          Changes the status of a system object from active to inactive.
 void deleteSystemObject(SystemObjectPK systemKey)
          Permanently deletes a system object from its associated enterprise object.
 MatchResult executeMatch(SystemObject sysObj)
          executeMatch is one of four methods that process a system object based on the configuration defined for the Master Index Manager Service and associated runtime components.
 MatchResult executeMatchDupRecalc(SystemObject sysObj, java.lang.Boolean performPessimistic)
          executeMatchDupRecalc is one of four methods that process a system object based on the configuration defined for the Master Index Manager Service and associated runtime components.
 MatchResult executeMatchGui(SystemObject sysObj)
          executeMatchGui is identical to executeMatch, but it is only called by the Enterprise Data Manager.
 MatchResult executeMatchUpdate(SystemObject sysObj)
          executeMatchUpdate is one of four methods that process a system object based on the configuration defined for the Master Index Manager Service and associated runtime components.
 MatchResult executeMatchUpdateDupRecalc(SystemObject sysObj, java.lang.Boolean performPessimistic)
          executeMatchUpdateDupRecalc is one of four methods that process a system object based on the configuration defined for the Master Index Manager Service and associated runtime components.
 float getAssumedMatchThreshold()
          Retrieve the Assumed Match threshold.
 java.lang.Object getConfigurationValue(java.lang.String param)
          Retrieves the configuration for a master controller parameter, such as the EUID length, duplicate threshold, or match threshold.
 java.lang.String getDatabaseStatus()
          Retrieves the status of the master index database.
 float getDuplicateThreshold()
          Retrieve the potential duplicate threshold.
 EnterpriseObject getEnterpriseObject(java.lang.String euid)
          Returns the enterprise object associated with the specified EUID.
 EnterpriseObject getEnterpriseObject(java.lang.String euid, EOGetOptions options)
          Returns the enterprise object associated with the specified EUID.
 EnterpriseObject getEnterpriseObject(SystemObjectPK key)
          Returns the enterprise object associated with a system code and local ID pair (SystemObjectPK).
 java.lang.String getEUID(SystemObjectPK key)
          Returns the EUID associated with the system code and local ID specified in the SystemObjectPK object.
 java.util.Map getLinkValues(EnterpriseObject eo)
          Returns a map with (fieldName, actual value for link) for the given EO.
 MergeHistoryNode getMergeHistory(java.lang.String euid)
          Retrieves a tree structure representing all of the merge transactions associated with the specified EUID.
 java.lang.Integer getRevisionNumber(java.lang.String euid)
          Retrieves the SBR revision number for the specified EUID.
 SBR getSBR(java.lang.String euid)
          Returns the SBR object associated with the specified EUID.
 SystemObject getSystemObject(SystemObjectPK key)
          Returns the system object associated with the system code and local ID contained in the specified SystemObjectPK object.
 void initialize()
          Create method specified in EJB 1.1 section 6.10.3
 void insertAuditLog(AuditDataObject auditObject)
          Inserts an audit log record of a transaction into the database.
 java.lang.Object intercept(InvocationContext invocation)
           
 AssumedMatchIterator lookupAssumedMatches(AssumedMatchSearchObject obj)
          Returns an iterator of AssumedMatchSummary objects based on the criteria contained in the assumed match search object (AssumedMatchSearchObject class).
 AuditIterator lookupAuditLog(AuditSearchObject obj)
          Looks up an audit log record based on the criteria contained in an audit search object.
 PotentialDuplicateIterator lookupPotentialDuplicates(PotentialDuplicateSearchObject obj)
          Returns an iterator of PotentialDuplicateSummary objects based on the criteria contained in the potential duplicate search object (PotentialDuplicateSearchObject class).
 SystemDefinition lookupSystemDefinition(java.lang.String systemCode)
          Retrieves the attributes of an external system from the master index database based on the system code.
 SystemDefinition[] lookupSystemDefinitions()
          Retrieves the attributes of an external systemCode from the master index database, such as the system code, masking flags, local ID format and so on.
 SystemObjectPK[] lookupSystemObjectPKs(java.lang.String euid)
          Returns an array of all system objects associated with the specified EUID.
 SystemObjectPK[] lookupSystemObjectPKs(java.lang.String euid, java.lang.String status)
          Returns an array of all system objects of a certain status that are associated with the specified EUID.
 SystemObjectPK[] lookupSystemObjectPKs(java.lang.String sourceSystem, java.lang.String sourceLID, java.lang.String destSystem, java.lang.String status)
          Returns an array of system object keys (local ID and system code pairs) of the specified status that belong to the specified destination system.
 SystemObject[] lookupSystemObjects(java.lang.String euid)
          Looks up the active system objects associated with the specified EUID.
 SystemObject[] lookupSystemObjects(java.lang.String euid, java.lang.String status)
          Looks up the system objects of a certain status that are associated with the specified EUID.
 TransactionSummary lookupTransaction(java.lang.String transId)
          Returns a transaction summary for the transaction associated with the specified transaction number.
 TransactionIterator lookupTransactions(TransactionSearchObject obj)
          Returns an array of transaction summaries based on the search criteria contained in the specified transaction search object.
 MergeResult mergeEnterpriseObject(java.lang.String sourceEUID, EnterpriseObject destinationEO, boolean calculateOnly)
          Merges two enterprise objects based on the specified EUID and enterprise object.
 MergeResult mergeEnterpriseObject(java.lang.String sourceEUID, EnterpriseObject destinationEO, java.lang.String srcRevisionNumber, java.lang.String destRevisionNumber, boolean calculateOnly)
          Merges two enterprise objects based on the specified EUID and enterprise object.
 MergeResult mergeEnterpriseObject(java.lang.String fromEUID, java.lang.String toEUID, boolean calculateOnly)
          Merges two enterprise objects based on the specified EUIDs.
 MergeResult mergeEnterpriseObject(java.lang.String fromEUID, java.lang.String toEUID, java.lang.String srcRevisionNumber, java.lang.String destRevisionNumber, boolean calculateOnly)
          Merges two enterprise objects based on the specified EUIDs.
 MergeResult[] mergeMultipleEnterpriseObjects(java.lang.String[] sourceEUIDs, EnterpriseObject destinationEO, java.lang.String[] srcRevisionNumbers, java.lang.String destRevisionNumber, boolean calculateOnly)
          Merges multiple enterprise objects based on the specified EUIDs and enterprise object.
 MergeResult mergeSystemObject(java.lang.String systemCode, java.lang.String sourceLID, java.lang.String destLID, boolean calculateOnly)
          Merges two system objects from the specified system.
 MergeResult mergeSystemObject(java.lang.String systemCode, java.lang.String sourceLID, java.lang.String destLID, ObjectNode destImage, boolean calculateOnly)
          Merges the source system object into the destination system object.
 MergeResult mergeSystemObject(java.lang.String systemCode, java.lang.String sourceLID, java.lang.String destLID, ObjectNode destImage, java.lang.String srcRevisionNumber, java.lang.String destRevisionNumber, boolean calculateOnly)
          Merges the source system object into the destination system object.
 MergeResult mergeSystemObject(java.lang.String systemCode, java.lang.String sourceLID, java.lang.String destLID, ObjectNode destImage, java.lang.String srcRevisionNumber, java.lang.String destRevisionNumber, boolean calculateOnly, java.lang.Boolean performPessimistic)
          Merges the source system object into the destination system object.
 MergeResult mergeSystemObject(java.lang.String systemCode, java.lang.String sourceLID, java.lang.String destLID, java.lang.String srcRevisionNumber, java.lang.String destRevisionNumber, boolean calculateOnly)
          Merges two system objects from the specified system.
 EnterpriseObject previewUndoAssumedMatch(java.lang.String assumedMatchId)
          Provides capability to have preview of undo assumed Match before its is persisted in the Database.
 void resolvePotentialDuplicate(java.lang.String id, boolean autoResolve)
          Flags a potential duplicate pair with "Resolved" or "Auto Resolved" status.
 EOSearchResultIterator searchEnterpriseObject(EOSearchCriteria criteria, EOSearchOptions searchOptions)
          Returns an iterator of enterprise objects that match the specified search criteria and options.
 EOSearchResultIterator searchEnterpriseObject(java.lang.String[] Euids, EOSearchOptions searchOptions)
          Returns an iterator of enterprise objects that match the specified EUIDs and options.
 void setSessionContext(SessionContext sessionContext)
           
 void transferSystemObject(java.lang.String toEUID, SystemObjectPK systemKey)
          Transfers the specified system object from its current enterprise object to a different enterprise object.
 java.lang.String undoAssumedMatch(java.lang.String assumedMatchId)
          Reverses an assumed match transaction, unmerging the two objects that were matched and creating a new enterprise object for the record that caused the assumed match.
 MergeResult unmergeEnterpriseObject(java.lang.String euid, boolean calculateOnly)
          Unmerges the two enterprise objects that were involved in the most recent merge transaction for the specified EUID.
 MergeResult unmergeEnterpriseObject(java.lang.String euid, java.lang.String revisionNumber, boolean calculateOnly)
          Unmerges the two enterprise objects that were involved in the most recent merge transaction for the specified EUID.
 MergeResult unmergeSystemObject(java.lang.String systemCode, java.lang.String sourceLID, java.lang.String destLID, boolean calculateOnly)
          Unmerges the two system objects that were involved in the most recent merge transaction for the specified local ID.
 MergeResult unmergeSystemObject(java.lang.String systemCode, java.lang.String sourceLID, java.lang.String destLID, java.lang.String srcRevisionNumber, boolean calculateOnly)
          Unmerges the two system objects that were involved in the most recent merge transaction for the specified local ID.
 void unresolvePotentialDuplicate(java.lang.String id)
          Changes the status of a resolved or auto-resolved potential duplicate record pair back to unresolved and places the records back in the potential duplicate listing.
 UpdateResult updateEnterpriseDupRecalc(EnterpriseObject eo, java.lang.Boolean performPessimistic)
          Updates the database to reflect the new values of the specified enterprise object.
 void updateEnterpriseObject(EnterpriseObject eo)
          Updates the database to reflect the new values of the specified enterprise object.
 EnterpriseObject updateSBR(java.util.Map mapSystems, EnterpriseObject eo, boolean removalFlag)
          Updates SBR by collecting the values from MAP to the SBR that specified by EUID.
 void updateSystemObject(SystemObject sysobj)
          Updates the database with the new values of the modified system object specified as a parameter.
 void updateSystemObject(SystemObject sysobj, java.lang.String revisionNumber)
          Updates the database with the new values of the modified system object specified as a parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MasterControllerEJB

public MasterControllerEJB()
No argument constructor required by container.

Method Detail

activateEnterpriseObject

public void activateEnterpriseObject(java.lang.String euid)
                              throws ProcessingException,
                                     UserException
Changes the status of a deactivated enterprise object back to active. Since all potential duplicates were deleted when the EUID was originally deactivated, potential duplicates are always recalculated, regardless of the update mode.

Specified by:
activateEnterpriseObject in interface MasterController
Parameters:
euid - The EUID associated with the enterprise object to activate.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while changing the status.
UserException - Thrown if a parameter is invalid.

activateSystemObject

public void activateSystemObject(SystemObjectPK systemKey)
                          throws ProcessingException,
                                 UserException
Changes the status of a deactivated system object back to active. If the update mode in Threshold configuration is pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR. If key fields were updated, potential duplicates are recalculated for the enterprise object.

Specified by:
activateSystemObject in interface MasterController
Parameters:
systemKey - The system code and local ID of the system object to activate.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while changing the status.
UserException - Thrown if a parameter is invalid.

addSystemObject

public void addSystemObject(java.lang.String euid,
                            SystemObject sysobj)
                     throws ProcessingException,
                            UserException
Adds the system object to the enterprise object associated with the EUID. If the update mode in Threshold configuration is pessimistic, the application checks whether any key fields (that is, fields used for blocking or matching) were updated in the SBR. If key fields were updated, potential duplicates are recalculated for the enterprise object.

Specified by:
addSystemObject in interface MasterController
Parameters:
euid - The EUID of the enterprise object to which the system object will be added.
sysobj - The system object to add to the enterprise object.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while adding the system object.
UserException - Thrown if a parameter is invalid.

calculatePotentialDuplicates

public void calculatePotentialDuplicates(java.lang.String euid,
                                         java.lang.String transID)
                                  throws ProcessingException
Calculates potential duplicates for the specified EUID and transaction ID. Call this method if you chose not to check for potential duplicates during the match or update processes.

Specified by:
calculatePotentialDuplicates in interface MasterController
Parameters:
euid - The EUID for which potential duplicates should be calculated.
transID - The transaction number for which potential duplicates should be calculated.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs during the potential duplicate calculation.

calculateSBR

public SBR calculateSBR(EnterpriseObject eo)
                 throws ProcessingException,
                        UserException
Calculates a new single best record (SBR) for an enterprise object that has been updated.

Specified by:
calculateSBR in interface MasterController
Parameters:
eo - The enterprise object whose SBR will be recalculated.
Returns:
SBR - The recalculated SBR of the enterprise object.
Throws:
ProcessingException - Thrown if an error occurs while transferring the object.
UserException - Thrown if a parameter is invalid.

cleanUp

public void cleanUp()
cleanUp before the instance is destroyed


countAssumedMatches

public int countAssumedMatches(AssumedMatchSearchObject amso)
                        throws ProcessingException,
                               UserException
Counts the number of assumed match records matching the date criteria specified in search object. This does not handle searches based on EUID nor SystemCode/LID.

Specified by:
countAssumedMatches in interface MasterController
Returns:
count of the assumed match records matching the search criteria.
Throws:
ProcessingException - An error has occured.
UserException - Invalid search object

countPotentialDuplicates

public int countPotentialDuplicates(PotentialDuplicateSearchObject pdso)
                             throws ProcessingException,
                                    UserException
Counts the number of potential duplicate records matching the criteria specified in search object. This does not handle searches based on EUID nor SystemCode/LID.

Specified by:
countPotentialDuplicates in interface MasterController
Returns:
count of the potential duplicate records matching the search criteria.
Throws:
ProcessingException - An error has occured.
UserException - Invalid search object

createEnterpriseObject

public EnterpriseObject createEnterpriseObject(SystemObject sysobj)
                                        throws ProcessingException,
                                               UserException
Creates a new enterprise object to add to the master index database using the information in the specified system object. This method bypasses potential duplicate processing.

Specified by:
createEnterpriseObject in interface MasterController
Parameters:
sysobj - The system object to use as a basis for the enterprise object.
Returns:
EnterpriseObject - The enterprise object created from the specified system object.
Throws:
ProcessingException - Thrown if an error occurs while creating the enterprise object.
UserException - Thrown if the parameter is invalid.

createEnterpriseObject

public EnterpriseObject createEnterpriseObject(SystemObject[] sysobj)
                                        throws ProcessingException,
                                               UserException
Creates a new enterprise object to add to the master index database using the information in the specified array of system objects. This method bypasses potential duplicate processing.

Specified by:
createEnterpriseObject in interface MasterController
Parameters:
sysobj - The array of system objects to use as a basis for the enterprise object.
Returns:
EnterpriseObject - The enterprise object created from the specified system objects.
Throws:
ProcessingException - Thrown if an error occurs while creating the enterprise object.
UserException - Thrown if the parameter is invalid.

deactivateEnterpriseObject

public void deactivateEnterpriseObject(java.lang.String euid)
                                throws ProcessingException,
                                       UserException
Changes the status of an enterprise object from active to inactive and deletes all potential duplicate listings for that object.

Specified by:
deactivateEnterpriseObject in interface MasterController
Parameters:
euid - The EUID associated with the enterprise object to deactivate.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while changing the status.
UserException - Thrown if a parameter is invalid.

deactivateSystemObject

public void deactivateSystemObject(SystemObjectPK systemKey)
                            throws ProcessingException,
                                   UserException
Changes the status of a system object from active to inactive. If the enterprise object containing this system object has no active system objects remaining, the enterprise object is deactivated and all potential duplicate listings are deleted. If the enterprise object has active system objects after the transaction and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR. If fields were updated, potential duplicates are recalculated for the enterprise object.

Specified by:
deactivateSystemObject in interface MasterController
Parameters:
systemKey - The system code and local ID of the system object to deactivate.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while changing the status.
UserException - Thrown if a parameter is invalid.

deleteSystemObject

public void deleteSystemObject(SystemObjectPK systemKey)
                        throws ProcessingException,
                               UserException
Permanently deletes a system object from its associated enterprise object. If the enterprise object containing this system object has no active system objects remaining, the enterprise object is also deleted, along with any potential duplicate listings. If the enterprise object has active system records after the transaction and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR. If key fields were updated, potential duplicates are recalculated for the enterprise record.

Specified by:
deleteSystemObject in interface MasterController
Parameters:
systemKey - The system code and local ID of the system object to delete.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while deleting the object.
UserException - Thrown if a parameter is invalid.

executeMatch

public MatchResult executeMatch(SystemObject sysObj)
                         throws ProcessingException,
                                UserException
executeMatch is one of four methods that process a system object based on the configuration defined for the Master Index Manager Service and associated runtime components. This method searches for possible matches in the database, and if it finds a match, it replaces the system object (instead of updating the system object, which is what executeMatchUpdate does). The following runtime components configure executeMatch.

Specified by:
executeMatch in interface MasterController
Parameters:
sysObj - The system object to process into the database.
Returns:
MatchResult - A match result object containing the results of the matching process.
Throws:
ProcessingException - Thrown if an error occurs during processing.
UserException - Thrown if an invalid parameter is passed to the method.

executeMatchDupRecalc

public MatchResult executeMatchDupRecalc(SystemObject sysObj,
                                         java.lang.Boolean performPessimistic)
                                  throws ProcessingException,
                                         UserException
executeMatchDupRecalc is one of four methods that process a system object based on the configuration defined for the Master Index Manager Service and associated runtime components. It is configured by the same components as executeMatch, and is similar to executeMatch but allows you to control whether potential duplicates are recalculated when an object is updated regardless of whether the update mode is set to optimistic or pessimistic. executeMatchDupRecalc differs from executeMatch in two ways:

NOTE: To process potential duplicates at a later time, call calculatePotentialDuplicates.

Specified by:
executeMatchDupRecalc in interface MasterController
Parameters:
sysObj - The system object to process into the database.
performPessimistic - A Boolean indicator of whether to recalculate potential duplicates on update or to defer it until later. Specify true to recalculate on update; specify false to defer the recalculation.
Returns:
MatchResult - A match result object containing the results of the matching process.
Throws:
ProcessingException - Thrown if an error occurs during processing.
UserException - Thrown if an invalid parameter is passed to the method.

executeMatchGui

public MatchResult executeMatchGui(SystemObject sysObj)
                            throws ProcessingException,
                                   UserException
executeMatchGui is identical to executeMatch, but it is only called by the Enterprise Data Manager. It processes a system object based on the configuration defined for the Master Index Manager Service and associated runtime components. This method searches for possible matches in the database, and if it finds a match, it replaces the system object (instead of updating the system object). The following runtime components configure executeMatchGui.

Specified by:
executeMatchGui in interface MasterController
Parameters:
sysObj - The system object to process into the database.
Returns:
MatchResult - A match result object containing the results of the matching process.
Throws:
ProcessingException - Thrown if an error occurs during processing.
UserException - Thrown if an invalid parameter is passed to the method.

executeMatchUpdate

public MatchResult executeMatchUpdate(SystemObject sysObj)
                               throws ProcessingException,
                                      UserException
executeMatchUpdate is one of four methods that process a system object based on the configuration defined for the Master Index Manager Service and associated runtime components. It is configured by the same components as executeMatch. This method searches for possible matches in the database, and if it finds a match, it updates the system object (instead of replacing the system object, which is what executeMatch does). The following runtime components configure executeMatchUpdate.

Specified by:
executeMatchUpdate in interface MasterController
Parameters:
sysObj - The system object to process into the database.
Returns:
MatchResult - A match result object containing the results of the matching process.
Throws:
ProcessingException - Thrown if an error occurs during processing.
UserException - Thrown if an invalid parameter is passed to the method.

executeMatchUpdateDupRecalc

public MatchResult executeMatchUpdateDupRecalc(SystemObject sysObj,
                                               java.lang.Boolean performPessimistic)
                                        throws ProcessingException,
                                               UserException
executeMatchUpdateDupRecalc is one of four methods that process a system object based on the configuration defined for the Master Index Manager Service and associated runtime components. It is configured by the same components as executeMatch, and is similar to executeMatchUpdate but allows you to control whether potential duplicates are recalculated when an object is updated regardless of whether the update mode is set to optimistic or pessimistic. executeMatchUpdateDupRecalc differs from executeMatchUpdate in two ways:

NOTE: To process potential duplicates at a later time, call calculatePotentialDuplicates.

Specified by:
executeMatchUpdateDupRecalc in interface MasterController
Parameters:
sysObj - The system object to process into the database.
performPessimistic - A Boolean indicator of whether to recalculate potential duplicates on update or to defer it until later. Specify true to recalculate on update; specify false to defer the recalculation.
Returns:
MatchResult - A match result object containing the results of the matching process.
Throws:
ProcessingException - Thrown if an error occurs during processing.
UserException - Thrown if an invalid parameter is passed to the method.

getAssumedMatchThreshold

public float getAssumedMatchThreshold()
Retrieve the Assumed Match threshold.

Specified by:
getAssumedMatchThreshold in interface MasterController

getConfigurationValue

public java.lang.Object getConfigurationValue(java.lang.String param)
                                       throws ProcessingException,
                                              UserException
Retrieves the configuration for a master controller parameter, such as the EUID length, duplicate threshold, or match threshold.

Specified by:
getConfigurationValue in interface MasterController
Parameters:
param - The parameter name. These parameters are defined in the Threshold configuration file of the Master Index Project.
Returns:
Object - An object containing the value of the specified parameter.
Throws:
ProcessingException - Thrown if an error occurs during the lookup.
UserException - Thrown if a parameter is invalid.

getDatabaseStatus

public java.lang.String getDatabaseStatus()
                                   throws ProcessingException,
                                          UserException
Retrieves the status of the master index database.

Parameters:
None.

Specified by:
getDatabaseStatus in interface MasterController
Returns:
String - The status of the master index database.
Throws:
ProcessingException - Thrown if an error occurs while checking the status.
UserException - Thrown if the call is invalid.

getDuplicateThreshold

public float getDuplicateThreshold()
Retrieve the potential duplicate threshold.

Specified by:
getDuplicateThreshold in interface MasterController

getEnterpriseObject

public EnterpriseObject getEnterpriseObject(java.lang.String euid)
                                     throws ProcessingException,
                                            UserException
Returns the enterprise object associated with the specified EUID. If no matching enterprise object is found, this method returns null.

Specified by:
getEnterpriseObject in interface MasterController
Parameters:
euid - The EUID of the enterprise object you want to retrieve.
Returns:
EnterpriseObject - The enterprise object associated with the specified EUID. Returns null if no enterprise object with the specified EUID is found.
Throws:
ProcessingException - Thrown if an error occurs while processing the search.
UserException - Thrown if the parameter is invalid.

getEnterpriseObject

public EnterpriseObject getEnterpriseObject(java.lang.String euid,
                                            EOGetOptions options)
                                     throws ProcessingException,
                                            UserException
Returns the enterprise object associated with the specified EUID. If no matching enterprise object is found, this method returns null. This method allows you to specify which objects to return in the enterprise record associated with the given EUID instead of returning the entire enterprise record. The objects to include in the resulting enterprise object are specified by their ePaths. Below is a sample implementation.

String ePaths[] =

{

"Enterprise.SystemObject.Person.Phone[*].*",

"Enterprise.SystemObject.Person.Alias[*].*"

};

EOGetOptions options = new EOGetOptions();

options.setFieldsToRetrieve(ePaths);

EnterpriseObject eo = mc.getEnterpriseObject (euid, options);

Specified by:
getEnterpriseObject in interface MasterController
Parameters:
euid - The EUID of the enterprise object you want to retrieve.
options - A list of ePaths that define which types of objects to retrieve to create the resulting EnterpriseObject.
Returns:
EnterpriseObject - The enterprise object associated with the given EUID. If no matching EUID is found, the return value is null.
Throws:
ProcessingException - Thrown if an error occurs while processing the search.
UserException - Thrown if an invalid EUID is entered (for example, a null or empty string).

getEnterpriseObject

public EnterpriseObject getEnterpriseObject(SystemObjectPK key)
                                     throws ProcessingException,
                                            UserException
Returns the enterprise object associated with a system code and local ID pair (SystemObjectPK). If no matching enterprise object is found, this method returns null. Only SystemObjectPK objects representing active system records can be used.

Specified by:
getEnterpriseObject in interface MasterController
Parameters:
key - The system object primary key.
Returns:
EnterpriseObject - The enterprise object associated with the specified primary key. Returns null if no enterprise object with the specified system object primary key is found.
Throws:
ProcessingException - Thrown if an error occurs while processing the search.
UserException - Thrown if the parameter is invalid.

getEUID

public java.lang.String getEUID(SystemObjectPK key)
                         throws ProcessingException,
                                UserException
Returns the EUID associated with the system code and local ID specified in the SystemObjectPK object.

Specified by:
getEUID in interface MasterController
Parameters:
key - The system object key containing the system code and local ID to use as search criteria.
Returns:
String - The EUID associated with the given system object key. Returns null if no results are found.
Throws:
ProcessingException - Thrown if there is an error during processing.
UserException - Thrown if the parameter is invalid.

getLinkValues

public java.util.Map getLinkValues(EnterpriseObject eo)
                            throws ObjectException,
                                   ConnectionInvalidException,
                                   OPSException,
                                   ProcessingException
Returns a map with (fieldName, actual value for link) for the given EO.

Specified by:
getLinkValues in interface MasterController
Parameters:
eo - The EnterpriseObject that has LINKs
Returns:
resultMap map with (fieldName, actual value for link) for the given EO.
Throws:
ObjectException - An error occured.
ConnectionInvalidException - An error occured.
OPSException - An error occured.
ProcessingException

getMergeHistory

public MergeHistoryNode getMergeHistory(java.lang.String euid)
                                 throws ProcessingException,
                                        UserException
Retrieves a tree structure representing all of the merge transactions associated with the specified EUID.

Specified by:
getMergeHistory in interface MasterController
Parameters:
euid - The EUID associated with the merge tree to retrieve.
Returns:
MergeHistoryNode - The merge history tree for the specified EUID.
Throws:
ProcessingException - Thrown if an error occurs during processing.
UserException - Thrown if an invalid EUID is passed as a parameter.

getRevisionNumber

public java.lang.Integer getRevisionNumber(java.lang.String euid)
                                    throws ProcessingException
Retrieves the SBR revision number for the specified EUID.

Specified by:
getRevisionNumber in interface MasterController
Parameters:
euid - The EUID containing the SBR revision number to retrieve.
Returns:
Integer - The revision number for the SBR.
Throws:
ProcessingException - Thrown if an error occurs during the lookup.

getSBR

public SBR getSBR(java.lang.String euid)
           throws ProcessingException,
                  UserException
Returns the SBR object associated with the specified EUID. If no matching SBR object is found, this method returns null.

Specified by:
getSBR in interface MasterController
Parameters:
euid - The EUID associated with the SBR you want to retrieve.
Returns:
SBR - The SBR object associated with the specified EUID. Returns null if no SBR associated with the specified EUID is found.
Throws:
ProcessingException - Thrown if an error occurs while processing the search.
UserException - Thrown if the parameter is invalid.

getSystemObject

public SystemObject getSystemObject(SystemObjectPK key)
                             throws ProcessingException,
                                    UserException
Returns the system object associated with the system code and local ID contained in the specified SystemObjectPK object.

Specified by:
getSystemObject in interface MasterController
Parameters:
key - The system object key containing the local ID and system code to lookup.
Returns:
SystemObject - The system object associated with the specified local ID and system code.
Throws:
ProcessingException - Thrown if there is an error during processing.
UserException - Thrown if the specified system object key is invalid.

initialize

public void initialize()
                throws java.lang.Exception
Create method specified in EJB 1.1 section 6.10.3

Throws:
java.lang.Exception

insertAuditLog

public void insertAuditLog(AuditDataObject auditObject)
                    throws ProcessingException,
                           UserException
Inserts an audit log record of a transaction into the database.

Specified by:
insertAuditLog in interface MasterController
Parameters:
auditObject - The audit log record to insert.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while transferring the object.
UserException - Thrown if a parameter is invalid.

intercept

public java.lang.Object intercept(InvocationContext invocation)
                           throws java.lang.Exception
Throws:
java.lang.Exception

lookupAssumedMatches

public AssumedMatchIterator lookupAssumedMatches(AssumedMatchSearchObject obj)
                                          throws ProcessingException,
                                                 UserException
Returns an iterator of AssumedMatchSummary objects based on the criteria contained in the assumed match search object (AssumedMatchSearchObject class).

Specified by:
lookupAssumedMatches in interface MasterController
Parameters:
obj - An instance of AssumedMatchSearchObject containing the potential duplicate search criteria.
Returns:
AssumedMatchIterator - An iterator of search results (AssumedMatchSummary objects).
Throws:
ProcessingException - Thrown if an error occurs during the lookup.
UserException - Thrown if the search object is invalid.

lookupAuditLog

public AuditIterator lookupAuditLog(AuditSearchObject obj)
                             throws ProcessingException,
                                    UserException
Looks up an audit log record based on the criteria contained in an audit search object.

Specified by:
lookupAuditLog in interface MasterController
Parameters:
obj - An instance of AuditSearchObject containing the audit log search criteria.
Returns:
AuditIterator - An iterator of audit log matches to the given search criteria.
Throws:
ProcessingException - Thrown if an error occurs during the lookup.
UserException - Thrown if a parameter is invalid.

lookupPotentialDuplicates

public PotentialDuplicateIterator lookupPotentialDuplicates(PotentialDuplicateSearchObject obj)
                                                     throws ProcessingException,
                                                            UserException
Returns an iterator of PotentialDuplicateSummary objects based on the criteria contained in the potential duplicate search object (PotentialDuplicateSearchObject class).

Specified by:
lookupPotentialDuplicates in interface MasterController
Parameters:
obj - An instance of PotentialDuplicateSearchObject containing the potential duplicate search criteria.
Returns:
PotentialDuplicateIterator - An iterator of search results (PotentialDuplicateSummary objects).
Throws:
ProcessingException - Thrown if an error occurs during the lookup.
UserException - Thrown if the search object is invalid.

lookupSystemDefinition

public SystemDefinition lookupSystemDefinition(java.lang.String systemCode)
                                        throws ProcessingException
Retrieves the attributes of an external system from the master index database based on the system code. Attributes include the system code, masking flags, local ID format and so on.

Specified by:
lookupSystemDefinition in interface MasterController
Parameters:
systemCode - The system code of an external system.
Returns:
SystemDefinition - A set of system attributes for the system identified the given system code.
Throws:
ProcessingException - Thrown if an error occurs while looking up the system.

lookupSystemDefinitions

public SystemDefinition[] lookupSystemDefinitions()
                                           throws ProcessingException
Retrieves the attributes of an external systemCode from the master index database, such as the system code, masking flags, local ID format and so on.

Parameters:
None.

Specified by:
lookupSystemDefinitions in interface MasterController
Returns:
SystemDefinition[] - An array of system attributes.
Throws:
ProcessingException - Thrown if an error occurs while looking up the system.

lookupSystemObjectPKs

public SystemObjectPK[] lookupSystemObjectPKs(java.lang.String euid)
                                       throws ProcessingException,
                                              UserException
Returns an array of all system objects associated with the specified EUID.

Specified by:
lookupSystemObjectPKs in interface MasterController
Parameters:
euid - The EUID of the enterprise object containing the system objects to retrieve.
Returns:
SystemObjectPK[] - An array of system objects associated with the specified EUID.
Throws:
ProcessingException - Thrown if there is an error during processing.
UserException - Thrown if the specified EUID is invalid.

lookupSystemObjectPKs

public SystemObjectPK[] lookupSystemObjectPKs(java.lang.String euid,
                                              java.lang.String status)
                                       throws ProcessingException,
                                              UserException
Returns an array of all system objects of a certain status that are associated with the specified EUID.

Specified by:
lookupSystemObjectPKs in interface MasterController
Parameters:
euid - The EUID associated with the system objects to retrieve.
status - The status of the system objects to retrieve.
Returns:
SystemObjectPK[] - An array of system objects of the specified status that are associated with the specified EUID. Returns null if no results are found.
Throws:
ProcessingException - Thrown if there is an error during processing.
UserException - Thrown if a parameter is invalid.

lookupSystemObjectPKs

public SystemObjectPK[] lookupSystemObjectPKs(java.lang.String sourceSystem,
                                              java.lang.String sourceLID,
                                              java.lang.String destSystem,
                                              java.lang.String status)
                                       throws ProcessingException,
                                              UserException
Returns an array of system object keys (local ID and system code pairs) of the specified status that belong to the specified destination system. The returned keys are associated with the EUID that is associated with the source system code and local ID pair.

Specified by:
lookupSystemObjectPKs in interface MasterController
Parameters:
sourceSystem - The source system code of the known local ID.
sourceLID - A local ID associated with the source system.
destSystem - The system code of the system object keys to retrieve.
status - The status of the records to lookup.
Returns:
SystemObjectPK[] - An array of system objects of the specified status. Returns null if no results are found.
Throws:
ProcessingException - Thrown if there is an error during processing.
UserException - Thrown if a parameter is invalid.

lookupSystemObjects

public SystemObject[] lookupSystemObjects(java.lang.String euid)
                                   throws ProcessingException,
                                          UserException
Looks up the active system objects associated with the specified EUID.

Specified by:
lookupSystemObjects in interface MasterController
Parameters:
euid - The EUID whose associated system objects will be retrieved.
Returns:
SystemObject[] - An array of system objects that are associated with the specified EUID.
Throws:
ProcessingException - Thrown if an error occurs while performing the lookup.
UserException - Thrown if the EUID is invalid.

lookupSystemObjects

public SystemObject[] lookupSystemObjects(java.lang.String euid,
                                          java.lang.String status)
                                   throws ProcessingException,
                                          UserException
Looks up the system objects of a certain status that are associated with the specified EUID.

Specified by:
lookupSystemObjects in interface MasterController
Parameters:
euid - The EUID whose associated system objects will be retrieved.
status - The status code of the system objects to retrieve.
Returns:
SystemObject[] - A list of system objects of the specified status that are associated with the given EUID.
Throws:
ProcessingException - Thrown if an error occurs while performing the lookup.
UserException - Thrown if a parameter is invalid.

lookupTransaction

public TransactionSummary lookupTransaction(java.lang.String transId)
                                     throws ProcessingException,
                                            UserException
Returns a transaction summary for the transaction associated with the specified transaction number.

Specified by:
lookupTransaction in interface MasterController
Parameters:
transId - The transaction number for the transaction.
Returns:
TransactionSummary - The transaction summary for the specified transaction ID.
Throws:
ProcessingException - Thrown if an error occurs while retrieving the summary.
UserException - Thrown if the transaction number is invalid.

lookupTransactions

public TransactionIterator lookupTransactions(TransactionSearchObject obj)
                                       throws ProcessingException,
                                              UserException
Returns an array of transaction summaries based on the search criteria contained in the specified transaction search object.

Specified by:
lookupTransactions in interface MasterController
Parameters:
obj - The transaction search object containing the search criteria.
Returns:
TransactionSummary - An array of transaction summaries matching the given search criteria.
Throws:
ProcessingException - Thrown if an error occurs during the search.
UserException - Thrown if the parameter is invalid.

mergeEnterpriseObject

public MergeResult mergeEnterpriseObject(java.lang.String sourceEUID,
                                         EnterpriseObject destinationEO,
                                         boolean calculateOnly)
                                  throws ProcessingException,
                                         UserException
Merges two enterprise objects based on the specified EUID and enterprise object. This method allows you to perform additional actions against the surviving enterprise object after the merge is performed. When this method is called with calculateOnly set to false, the application changes the status of the non-surviving enterprise object to "merged" and deletes all potential duplicate listings for that object. If the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR of the surviving enterprise object. If key fields were updated, potential duplicates are recalculated for the surviving object.

Specified by:
mergeEnterpriseObject in interface MasterController
Parameters:
sourceEUID - The EUID of the non-surviving enterprise object.
destinationEO - The enterprise object that will survive after the merge process.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The results of the merge operation.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

mergeEnterpriseObject

public MergeResult mergeEnterpriseObject(java.lang.String sourceEUID,
                                         EnterpriseObject destinationEO,
                                         java.lang.String srcRevisionNumber,
                                         java.lang.String destRevisionNumber,
                                         boolean calculateOnly)
                                  throws ProcessingException,
                                         UserException
Merges two enterprise objects based on the specified EUID and enterprise object. This merge method takes the revision numbers of the SBRs so you can check for updates before finalizing the transaction, and also allows you to perform additional actions against the surviving enterprise object after the merge is performed. When this method is called with calculateOnly set to false, the application changes the status of the merged enterprise object to "merged" and deletes all potential duplicate listings for that object. If the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR of the surviving enterprise object. If key fields were updated, potential duplicates are recalculated for the surviving object.

The SBR revision numbers of both the surviving and non-surviving enterprise objects are passed as arguments. These are compared to the SBRs stored in the database. If they differ, it means that either the source or destination record was modified by another user. In this case, the merge should not be allowed.

Specified by:
mergeEnterpriseObject in interface MasterController
Parameters:
sourceEUID - The EUID of the non-surviving enterprise object.
destinationEO - The enterprise object that will survive after the merge process.
srcRevisionNumber - The SBR revision number of the non-surviving enterprise object.
destRevisionNumber - The SBR revision number of the surviving enterprise object.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The results of the merge operation.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

mergeEnterpriseObject

public MergeResult mergeEnterpriseObject(java.lang.String fromEUID,
                                         java.lang.String toEUID,
                                         boolean calculateOnly)
                                  throws ProcessingException,
                                         UserException
Merges two enterprise objects based on the specified EUIDs. When this method is called with calculateOnly set to false, the application changes the status of the merged enterprise object to "merged" and deletes all potential duplicate listings for that object. If the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR of the surviving enterprise object. If key fields were updated, potential duplicates are recalculated for the surviving object.

Specified by:
mergeEnterpriseObject in interface MasterController
Parameters:
fromEUID - The EUID of the non-surviving enterprise object.
toEUID - The EUID of the surviving enterprise object.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The results of the merge operation.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

mergeEnterpriseObject

public MergeResult mergeEnterpriseObject(java.lang.String fromEUID,
                                         java.lang.String toEUID,
                                         java.lang.String srcRevisionNumber,
                                         java.lang.String destRevisionNumber,
                                         boolean calculateOnly)
                                  throws ProcessingException,
                                         UserException
Merges two enterprise objects based on the specified EUIDs. This merge method takes the revision numbers of the SBRs so you can check for updates before finalizing the transaction. When this method is called with calculateOnly set to false, the application changes the status of the merged enterprise object to "merged" and deletes all potential duplicate listings for that object. If the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR of the surviving enterprise object. If key fields were updated, potential duplicates are recalculated for the surviving object.

The SBR revision numbers of both the surviving and non-surviving enterprise objects are passed as arguments. These are compared to the SBRs stored in the database. If they differ, it means that either the source or destination record was modified by another user. In this case, the merge should not be allowed.

Specified by:
mergeEnterpriseObject in interface MasterController
Parameters:
fromEUID - The EUID of the non-surviving enterprise object.
toEUID - The EUID of the surviving enterprise object.
srcRevisionNumber - The SBR revision number of the non-surviving enterprise object.
destRevisionNumber - The SBR revision number of the surviving enterprise object.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The results of the merge operation.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

mergeMultipleEnterpriseObjects

public MergeResult[] mergeMultipleEnterpriseObjects(java.lang.String[] sourceEUIDs,
                                                    EnterpriseObject destinationEO,
                                                    java.lang.String[] srcRevisionNumbers,
                                                    java.lang.String destRevisionNumber,
                                                    boolean calculateOnly)
                                             throws ProcessingException,
                                                    UserException
Merges multiple enterprise objects based on the specified EUIDs and enterprise object. The source EUIDs will each be successively merged into the destination EO. For example, sourceEUIDs[0] will be merged into the destination EO. Then sourceEUIDs[1] will be merged into the destination EO. Next, sourceEUIDS[2] will be merged into the destination EO. If there are n merges, there will be n merge transaction log entries. All of these transactions must be unmerged in order to restore the state prior to the multiple merge. This merge method takes the revision numbers of the SBRs so you can check for updates before finalizing the transaction, and also allows you to perform additional actions against the surviving enterprise object after the merge is performed. When this method is called with calculateOnly set to false, the application changes the status of the merged enterprise object to "merged" and deletes all potential duplicate listings for that object. If the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR of the surviving enterprise object. If key fields were updated, potential duplicates are recalculated for the surviving object.

The SBR revision numbers of both the surviving and non-surviving enterprise objects are passed as arguments. These are compared to the SBRs stored in the database. If they differ, it means that either the source or destination record was modified by another user. In this case, the merge should not be allowed.

Specified by:
mergeMultipleEnterpriseObjects in interface MasterController
Parameters:
sourceEUIDs - The EUIDs of the non-surviving enterprise objects.
destinationEO - The enterprise object that will survive after the merge process.
srcRevisionNumbers - The SBR revision numbers of the non-surviving enterprise object.
destRevisionNumber - The SBR revision number of the surviving enterprise object.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult[] - The results of the merge operations.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

mergeSystemObject

public MergeResult mergeSystemObject(java.lang.String systemCode,
                                     java.lang.String sourceLID,
                                     java.lang.String destLID,
                                     boolean calculateOnly)
                              throws ProcessingException,
                                     UserException
Merges two system objects from the specified system. The system objects may belong to a single enterprise object or to two different enterprise objects. They must originate from the same system. When this method is called with calculateOnly set to false, the application changes the status of the merged system object to "merged". If the system objects were merged within the same enterprise object and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR. If key fields were updated, potential duplicates are recalculated for the enterprise object.

If the two system objects originated from two different enterprise objects and the enterprise object that contained the unkept the system object no longer has any active system objects, that enterprise object is deactivated and all associated potential duplicate listings are deleted. If both enterprise objects are still active and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields that are used for matching or blocking) were updated in the SBR for each enterprise object. If key fields were updated, potential duplicates are recalculated for each enterprise object.

Specified by:
mergeSystemObject in interface MasterController
Parameters:
systemCode - The system to which the local IDs of the objects to be merged belong.
sourceLID - The local ID of the non-surviving system object.
destLID - The local ID of the surviving system object.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The results of the merge operation.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

mergeSystemObject

public MergeResult mergeSystemObject(java.lang.String systemCode,
                                     java.lang.String sourceLID,
                                     java.lang.String destLID,
                                     ObjectNode destImage,
                                     boolean calculateOnly)
                              throws ProcessingException,
                                     UserException
Merges the source system object into the destination system object. This merge method allows the new image of the merged system object to be defined if the sending system includes this information. The system objects may belong to a single enterprise object or to two different enterprise objects. They must originate from the same system. When this method is called with calculateOnly set to false, the application changes the status of the merged system object to "merged". If the system objects were merged within the same enterprise object and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR. If key fields were updated, potential duplicates are recalculated for the enterprise object.

If the two system objects originated from two different enterprise objects and the enterprise object that contained the unkept the system object no longer has any active system objects, that enterprise object is deactivated and all associated potential duplicate listings are deleted. If both enterprise objects are still active and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields that are used for matching or blocking) were updated in the SBR for each enterprise object. If key fields were updated, potential duplicates are recalculated for each enterprise object.

Specified by:
mergeSystemObject in interface MasterController
Parameters:
systemCode - The system to which the local IDs of the objects to be merged belong.
sourceLID - The local ID of the non-surviving system object.
destLID - The local ID of the surviving system object.
destImage - The new image for the destination system object. For example, if the system object contains a person object, then a person object must be used.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The results of the merge operation.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

mergeSystemObject

public MergeResult mergeSystemObject(java.lang.String systemCode,
                                     java.lang.String sourceLID,
                                     java.lang.String destLID,
                                     ObjectNode destImage,
                                     java.lang.String srcRevisionNumber,
                                     java.lang.String destRevisionNumber,
                                     boolean calculateOnly)
                              throws ProcessingException,
                                     UserException
Merges the source system object into the destination system object. This merge method allows the new image of the merged system object to be defined if the sending system includes this information. The system objects may belong to a single enterprise object or to two different enterprise objects. They must originate from the same system. When this method is called with calculateOnly set to false, the application changes the status of the merged system object to "merged". If the system objects were merged within the same enterprise object and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR. If key fields were updated, potential duplicates are recalculated for the enterprise object.

If the two system objects originated from two different enterprise objects and the enterprise object that contained the unkept the system object no longer has any active system objects, that enterprise object is deactivated and all associated potential duplicate listings are deleted. If both enterprise objects are still active and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields that are used for matching or blocking) were updated in the SBR for each enterprise object. If key fields were updated, potential duplicates are recalculated for each enterprise object.

The SBR revision numbers of both the source and destination enterprise objects are passed as arguments. These are compared to the SBRs stored in the database. If they differ, it means that either the source or destination record was modified by another user. In this case, the merge should not be allowed.

Specified by:
mergeSystemObject in interface MasterController
Parameters:
systemCode - The system to which the local IDs of the objects to be merged belong.
sourceLID - The local ID of the non-surviving system object.
destLID - The local ID of the surviving system object.
destImage - The new image for the destination system object. For example, if the system object contains a person object, then a person object must be used.
srcRevisionNumber - The SBR revision number of the source enterprise object.
destRevisionNumber - The SBR revision number of the destination enterprise object.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The result of the merge operation.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

mergeSystemObject

public MergeResult mergeSystemObject(java.lang.String systemCode,
                                     java.lang.String sourceLID,
                                     java.lang.String destLID,
                                     ObjectNode destImage,
                                     java.lang.String srcRevisionNumber,
                                     java.lang.String destRevisionNumber,
                                     boolean calculateOnly,
                                     java.lang.Boolean performPessimistic)
                              throws ProcessingException,
                                     UserException
Merges the source system object into the destination system object. This merge method allows the new image of the merged system object to be defined if the sending system includes this information. The system objects may belong to a single enterprise object or to two different enterprise objects. They must originate from the same system. When this method is called with calculateOnly set to false, the application changes the status of the merged system object to "merged".

If the system objects were merged within the same enterprise object and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR. If key fields were updated, potential duplicates are recalculated for the enterprise object. Regardless of the value of the update mode, if the performPessimistic flag is set to true the application checks for key field updates and then checks for potential duplicates. If the performPessimistic flag is set to false, neither of these steps is performed.

If the system objects originated from two different enterprise objects and the enterprise object that contained the unkept the system object no longer has any active system objects, that enterprise object is deactivated and all associated potential duplicate listings are deleted. If both enterprise objects are still active and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields that are used for matching or blocking) were updated in the SBR for each enterprise object. If key fields were updated, potential duplicates are recalculated for each enterprise object. Again, the value of the performPessimistic flag overrides the value of the update mode.

The SBR revision numbers of both the source and destination enterprise objects are passed as arguments. These are compared to the SBRs stored in the database. If they differ, it means that either the source or destination record was modified by another user. In this case, the merge should not be allowed.

Specified by:
mergeSystemObject in interface MasterController
Parameters:
systemCode - The system to which the local IDs of the objects to be merged belong.
sourceLID - The local ID of the non-surviving system object.
destLID - The local ID of the surviving system object.
destImage - The new image for the destination system object. For example, if the system object contains a person object, then a person object must be used.
srcRevisionNumber - The SBR revision number of the source enterprise object.
destRevisionNumber - The SBR revision number of the destination enterprise object.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
performPessimistic - A Boolean indicator of whether to recalculate potential duplicates on update or to defer it until later. Specify true to recalculate on update; specify false to defer the recalculation.
Returns:
MergeResult - The result of the merge operation.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

mergeSystemObject

public MergeResult mergeSystemObject(java.lang.String systemCode,
                                     java.lang.String sourceLID,
                                     java.lang.String destLID,
                                     java.lang.String srcRevisionNumber,
                                     java.lang.String destRevisionNumber,
                                     boolean calculateOnly)
                              throws ProcessingException,
                                     UserException
Merges two system objects from the specified system. The system objects may belong to a single enterprise object or to two different enterprise objects. They must originate from the same system. This method includes the revision numbers so you can check for updates before finalizing the transaction. When this method is called with calculateOnly set to false, the application changes the status of the merged system object to "merged". If the system objects were merged within the same enterprise object and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR. If key fields were updated, potential duplicates are recalculated for the enterprise object.

If the two system objects originated from two different enterprise objects and the enterprise object that contained the unkept the system object no longer has any active system objects, that enterprise object is deactivated and all associated potential duplicate listings are deleted. If both enterprise objects are still active and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields that are used for matching or blocking) were updated in the SBR for each enterprise object. If key fields were updated, potential duplicates are recalculated for each enterprise object.

The revision numbers of both the source and destination SBRs are passed as arguments. These are compared to the SBRs stored in the database. If they differ, it means that either the source or destination records were modified by another user. In this case, the merge should not be allowed.

Specified by:
mergeSystemObject in interface MasterController
Parameters:
systemCode - The system to which the local IDs of the objects to be merged belong.
sourceLID - The local ID of the non-surviving system object.
destLID - The local ID of the surviving system object.
srcRevisionNumber - The SBR revision number of the source enterprise object.
destRevisionNumber - The SBR revision number of the destination enterprise object.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The result of the merge operation.
Throws:
ProcessingException - Thrown if an error occurs during the merge process.
UserException - Thrown if a parameter is invalid.

previewUndoAssumedMatch

public EnterpriseObject previewUndoAssumedMatch(java.lang.String assumedMatchId)
                                         throws ProcessingException,
                                                UserException
Provides capability to have preview of undo assumed Match before its is persisted in the Database.

Specified by:
previewUndoAssumedMatch in interface MasterController
Parameters:
assumedMatchId - The assumed match ID of assumed match transaction to reverse.
Returns:
String - The EUID of the newly created enterprise object.
Throws:
ProcessingException - Thrown if an error occurs during the undo process.
UserException - Thrown if the assumed match ID is invalid.

resolvePotentialDuplicate

public void resolvePotentialDuplicate(java.lang.String id,
                                      boolean autoResolve)
                               throws ProcessingException,
                                      UserException
Flags a potential duplicate pair with "Resolved" or "Auto Resolved" status. If resolved, the pair can be marked as potential duplicates again during a future transaction. If auto-resolved, the pair is permanently flagged as resolved.

Specified by:
resolvePotentialDuplicate in interface MasterController
Parameters:
id - The potential duplicate ID of the pair to be resolved.
autoResolve - A Boolean value indicating whether to resolve or auto-resolve the pair. Specify true to auto-resolve; specify false to simply resolve the pair.
Returns:
void - None.
Throws:
ProcessingException - Thrown if there is an error during processing.
UserException - Thrown if the specified potential duplicate ID is invalid.

searchEnterpriseObject

public EOSearchResultIterator searchEnterpriseObject(EOSearchCriteria criteria,
                                                     EOSearchOptions searchOptions)
                                              throws ProcessingException,
                                                     UserException
Returns an iterator of enterprise objects that match the specified search criteria and options. The criteria are contained in a system object. The options consist of a query builder ID and certain attributes of the query.

Specified by:
searchEnterpriseObject in interface MasterController
Parameters:
criteria - An EOSearchCriteria object containing the search criteria.
searchOptions - An EOSearchOptions object defining attributes of the search.
Returns:
EOSearchResultIterator - An iterator containing the results of the query.
Throws:
ProcessingException - Thrown if an error occurs while processing the query.
UserException - Thrown if the search object is invalid.

searchEnterpriseObject

public EOSearchResultIterator searchEnterpriseObject(java.lang.String[] Euids,
                                                     EOSearchOptions searchOptions)
                                              throws ProcessingException,
                                                     UserException
Returns an iterator of enterprise objects that match the specified EUIDs and options. The options consist of a query builder ID and certain attributes of the query.

Specified by:
searchEnterpriseObject in interface MasterController
Parameters:
Euids - An array of EUID's for which to search
searchOptions - An EOSearchOptions object defining attributes of the search.
Returns:
EOSearchResultIterator - An iterator containing the results of the query.
Throws:
ProcessingException - Thrown if an error occurs while processing the query.
UserException - Thrown if the search object is invalid.

setSessionContext

public void setSessionContext(SessionContext sessionContext)

transferSystemObject

public void transferSystemObject(java.lang.String toEUID,
                                 SystemObjectPK systemKey)
                          throws ProcessingException,
                                 UserException
Transfers the specified system object from its current enterprise object to a different enterprise object. If the enterprise object from which the system object was transferred no longer has any active system objects, that enterprise object is deactivated and all associated potential duplicate listings are deleted. If both enterprise objects are still active and the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR for each enterprise object. If key fields were updated, potential duplicates are recalculated for each enterprise object.

Specified by:
transferSystemObject in interface MasterController
Parameters:
toEUID - The EUID of the enterprise object to which the system object will be transferred.
systemKey - The system code and local ID of the system object to transfer.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while transferring the object.
UserException - Thrown if a parameter is invalid.

undoAssumedMatch

public java.lang.String undoAssumedMatch(java.lang.String assumedMatchId)
                                  throws ProcessingException,
                                         UserException
Reverses an assumed match transaction, unmerging the two objects that were matched and creating a new enterprise object for the record that caused the assumed match. Potential duplicates are calculated for the new enterprise object regardless of the update mode. If the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR of the original enterprise object. If key fields were updated, potential duplicates are recalculated for that object.

Specified by:
undoAssumedMatch in interface MasterController
Parameters:
assumedMatchId - The assumed match ID of assumed match transaction to reverse.
Returns:
String - The EUID of the newly created enterprise object.
Throws:
ProcessingException - Thrown if an error occurs during the undo process.
UserException - Thrown if the assumed match ID is invalid.

unmergeEnterpriseObject

public MergeResult unmergeEnterpriseObject(java.lang.String euid,
                                           boolean calculateOnly)
                                    throws ProcessingException,
                                           UserException
Unmerges the two enterprise objects that were involved in the most recent merge transaction for the specified EUID. The enterprise object that had a status of "merged" after the merge transaction is changed to an active object. You can retrieve the active enterprise object (represented by activeEUID) by calling MergeResult.getDestinationEO. You can retrieve the reactivated enterprise object by calling MergeResult.getSourceEO.

When this method is called with calculateOnly set to false, the application changes the status of the merged enterprise object back to "active" and recalculates potential duplicate listings for object. If the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR of the enterprise object that was still active after the merge. If key fields were updated, potential duplicates are recalculated for that enterprise object.

Specified by:
unmergeEnterpriseObject in interface MasterController
Parameters:
euid - The EUID of the enterprise object to be unmerged.
calculateOnly - An indicator of whether to commit the unmerge to the database or to calculate the changes for viewing. Specify true to calculate for viewing; specify false to commit the changes to the database.
Returns:
MergeResult - The result of the unmerge transaction.
Throws:
ProcessingException - Thrown if an error occurs during the unmerge process.
UserException - Thrown if the EUID is invalid.

unmergeEnterpriseObject

public MergeResult unmergeEnterpriseObject(java.lang.String euid,
                                           java.lang.String revisionNumber,
                                           boolean calculateOnly)
                                    throws ProcessingException,
                                           UserException
Unmerges the two enterprise objects that were involved in the most recent merge transaction for the specified EUID. The enterprise object that had a status of "merged" after the merge transaction is changed back to an active object after the unmerge. You can retrieve the active enterprise object (represented by activeEUID) by calling MergeResult.getDestinationEO. You can retrieve the reactivated enterprise object by calling MergeResult.getSourceEO.

This method allows you to specify a revision number for the SBR of the enterprise object to unmerge so you can check for updates before finalizing the transaction. When this method is called with calculateOnly set to false, the application changes the status of the merged enterprise object back to "active" and recalculates potential duplicate listings for object. If the update mode is set to pessimistic, the application checks whether any key fields (that is, fields used for matching or blocking) were updated in the SBR of the enterprise object that was still active after the merge. If key fields were updated, potential duplicates are recalculated for that enterprise object.

The SBR revision number of the enterprise object to unmerge is passed as an argument. This is compared to the SBR stored in the database. If the two differ, it means that the record was modified by another user. In this case, the unmerge should not be allowed.

Specified by:
unmergeEnterpriseObject in interface MasterController
Parameters:
euid - The EUID of the enterprise object to unmerge.
revisionNumber - The SBR revision number of the enterprise object to unmerge.
calculateOnly - An indicator of whether to commit the unmerge to the database or to calculate the changes for viewing. Specify true to calculate for viewing; specify false to commit the changes to the database.
Returns:
MergeResult - The result of the unmerge transaction.
Throws:
ProcessingException - Thrown if an error occurs during the unmerge process.
UserException - Thrown if the EUID is invalid.

unmergeSystemObject

public MergeResult unmergeSystemObject(java.lang.String systemCode,
                                       java.lang.String sourceLID,
                                       java.lang.String destLID,
                                       boolean calculateOnly)
                                throws ProcessingException,
                                       UserException
Unmerges the two system objects that were involved in the most recent merge transaction for the specified local ID. The system object that had a status of "merged" after the merge transaction is changed to an active object. When this method is called with calculateOnly set to false, the application changes the status of the merged system object back to "active". If the source enterprise object (the object that contained the merge result system object after the merge) has more than one active system object after the unmerge and the update mode is set to pessimistic, the application checks whether any key fields were updated in that object. If key fields were updated, potential duplicates are recalculated for the source enterprise object.

If the source enterprise object has only one active system, potential duplicate processing is performed regardless of the update mode and regardless of whether there were any changes to key fields. If the update mode is set to pessimistic, the application checks whether any key fields were updated in the SBR for the destination enterprise object. If key fields were updated, potential duplicates are recalculated for the enterprise object.

Specified by:
unmergeSystemObject in interface MasterController
Parameters:
systemCode - The system to which the local IDs of the objects to be unmerged belong.
sourceLID - The local ID of the non-surviving system object.
destLID - The local ID of the surviving system object.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The result of the unmerge transaction.
Throws:
ProcessingException - Thrown if an error occurs during the unmerge process.
UserException - Thrown if a parameter is invalid.

unmergeSystemObject

public MergeResult unmergeSystemObject(java.lang.String systemCode,
                                       java.lang.String sourceLID,
                                       java.lang.String destLID,
                                       java.lang.String srcRevisionNumber,
                                       boolean calculateOnly)
                                throws ProcessingException,
                                       UserException
Unmerges the two system objects that were involved in the most recent merge transaction for the specified local ID. The system object that had a status of "merged" after the merge transaction is changed to an active object. When this method is called with calculateOnly set to false, the application changes the status of the merged system object back to "active". If the source enterprise object (the object that contained the merge result system object after the merge) has more than one active system object after the unmerge and the update mode is set to pessimistic, the application checks whether any key fields were updated in that object. If key fields were updated, potential duplicates are recalculated for the source enterprise object.

If the source enterprise object has only one active system, potential duplicate processing is performed regardless of the update mode and regardless of whether there were any changes to key fields. If the update mode is set to pessimistic, the application checks whether any key fields were updated in the SBR for the destination enterprise object. If key fields were updated, potential duplicates are recalculated for the enterprise object.

The SBR revision number of the enterprise object containing the system objects to unmerge is passed as an argument. Before finalizing the unmerge, the revision number is compared to the SBR stored in the database. If they differ, it means that the record was modified by another user. In this case, the unmerge should not be allowed.

Specified by:
unmergeSystemObject in interface MasterController
Parameters:
systemCode - The system to which the local IDs of the objects to be unmerged belong.
sourceLID - The local ID of the non-surviving system object.
destLID - The local ID of the surviving system object.
srcRevisionNumber - The SBR revision number of the enterprise object containing the system objects to unmerge.
calculateOnly - A Boolean indicator of whether to commit changes to the database or to simply compute the merge results. Specify false to commit the changes.
Returns:
MergeResult - The result of the unmerge transaction.
Throws:
ProcessingException - Thrown if an error occurs during the unmerge process.
UserException - Thrown if a parameter is invalid.

unresolvePotentialDuplicate

public void unresolvePotentialDuplicate(java.lang.String id)
                                 throws ProcessingException,
                                        UserException
Changes the status of a resolved or auto-resolved potential duplicate record pair back to unresolved and places the records back in the potential duplicate listing.

Specified by:
unresolvePotentialDuplicate in interface MasterController
Parameters:
id - The potential duplicate ID of the records to unresolve.
Returns:
void - None.
Throws:
ProcessingException - Thrown if there is an error during processing.
UserException - Thrown if the specified potential duplicate ID is invalid.

updateEnterpriseDupRecalc

public UpdateResult updateEnterpriseDupRecalc(EnterpriseObject eo,
                                              java.lang.Boolean performPessimistic)
                                       throws ProcessingException,
                                              UserException
Updates the database to reflect the new values of the specified enterprise object. This method is similar to updateEnterpriseObject but it allows you to control whether potential duplicate recalculation is performed when an enterprise object is updated, regardless of whether the update mode is set to optimistic or pessimistic. This method differs from updateEnterpriseObject in two ways:

NOTE: To process potential duplicates at a later time, call calculatePotentialDuplicates.

Specified by:
updateEnterpriseDupRecalc in interface MasterController
Parameters:
eo - The enterprise object (EnterpriseObject class) to be updated.
performPessimistic - A Boolean indicator of whether to defer potential duplicate processing. Specify true to recalculate potential duplicates on update; specify false to defer recalculation to a later time.
Returns:
UpdateResult - The UpdateResult object created from the update.
Throws:
ProcessingException - Thrown if an error occurs during the update.
UserException - Thrown if the enterprise object containing the updated data is invalid.

updateEnterpriseObject

public void updateEnterpriseObject(EnterpriseObject eo)
                            throws ProcessingException,
                                   UserException
Updates the database to reflect the new values of the specified enterprise object. If the enterprise object is deactivated during the update, potential duplicates are deleted for that object. If the enterprise object is still active, was changed during the transaction, and the update mode is set to pessimistic, the application checks whether any key fields were updated in the SBR of the enterprise object. If key fields were updated, potential duplicates are recalculated.

Specified by:
updateEnterpriseObject in interface MasterController
Parameters:
eo - The enterprise object (EnterpriseObject class) to be updated.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs during the update.
UserException - Thrown if the enterprise object containing the updated data is invalid.

updateSBR

public EnterpriseObject updateSBR(java.util.Map mapSystems,
                                  EnterpriseObject eo,
                                  boolean removalFlag)
                           throws ProcessingException,
                                  UserException
Updates SBR by collecting the values from MAP to the SBR that specified by EUID.

Specified by:
updateSBR in interface MasterController
Parameters:
mapSystems - The Map consists of epath as key and System as value from which the filed should take for updating SBR
Throws:
ProcessingException
UserException

updateSystemObject

public void updateSystemObject(SystemObject sysobj)
                        throws ProcessingException,
                               UserException
Updates the database with the new values of the modified system object specified as a parameter.

Specified by:
updateSystemObject in interface MasterController
Parameters:
sysobj - The updated system object.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while updating the database.
UserException - Thrown if the parameter is invalid.

updateSystemObject

public void updateSystemObject(SystemObject sysobj,
                               java.lang.String revisionNumber)
                        throws ProcessingException,
                               UserException
Updates the database with the new values of the modified system object specified as a parameter. This method compares the revision number of the SBR associated with the updated system object with the revision number in the database. If the numbers are different, the update is not performed (a difference indicates that the record was updated by another process).

Specified by:
updateSystemObject in interface MasterController
Parameters:
sysobj - The updated system object.
revisionNumber - The revision number of the SBR of the associated SO.
Returns:
void - None.
Throws:
ProcessingException - Thrown if an error occurs while updating the database.
UserException - Thrown if the parameter is invalid.


Sun Microsystems, Inc.