public class CompareByProperties extends GenericService implements MarkerDuplicateComparator
Each property is compared using object.equals().
To return true both markers must be of the same type and all the compared properties must be equal.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
java.lang.String[] |
mPropertiesToCompare |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
CompareByProperties() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getPropertiesToCompare()
Returns the the property names to compare
|
boolean |
isDuplicateMarker(RepositoryItem pMarker1,
RepositoryItem pMarker2)
This method determines if the two markers are duplicates of each other.
|
void |
setPropertiesToCompare(java.lang.String[] pPropertiesToCompare)
Sets the property names to compare
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
public java.lang.String[] mPropertiesToCompare
public void setPropertiesToCompare(java.lang.String[] pPropertiesToCompare)
public java.lang.String[] getPropertiesToCompare()
public boolean isDuplicateMarker(RepositoryItem pMarker1, RepositoryItem pMarker2) throws MarkerException
isDuplicateMarker
in interface MarkerDuplicateComparator
pMarker1
- marker 1 to use in comparisonpMarker2
- marker 2 to use in comparisonMarkerException