Class DuplicateRule
java.lang.Object
fr.paris.lutece.plugins.identitystore.business.rules.duplicate.DuplicateRule
- All Implemented Interfaces:
Serializable
The aim of this class is to define a rule to be applied when performing duplicate identities search.
It must be applied as follows.
Eligible identities for the search:
Result of the search:
It must be applied as follows.
Eligible identities for the search:
- _listCheckedAttributes is the list of
AttributeKeythat are checked by the rule - _nNbFilledAttributes is the minimum number of checked attributes that must be present and valued in the Identities that are selected to execute the rule
- _nNbEqualAttributes is the exact number of checked attributes that must be strictly equal in the result
- _nNbMissingAttributes is the maximum number of checked attributes that can be absent in the result
- _listAttributeTreatments defines a list of conditions (APPROXIMATED or DIFFERENT) on the checked attributes that are not strictly equal.
- Identities selected for the search:
_listCheckedAttributes && _nNbFilledAttribute
_listCheckedAttributes && _nNbEqualAttributes && _nNbMissingAttributes && (_listAttributeTreatments[0] || _listAttributeTreatments[1] || ... || _listAttributeTreatments[n])
E.g:
| checked | filled | equal | missing | treatments | result | |---------|--------|-------|---------|-------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 7 | 7 | 7 | 0 | empty | Every Identity that matches exactly the given attributes | | 7 | 7 | 6 | 0 | empty | Every Identity that have 6 matching attributes over the 7 required, the 7th must exist but its value is discarded | | 7 | 7 | 6 | 1 | empty | Every Identity that have 6 matching attributes over the 7 required, the 7th can be missing | | 7 | 7 | 6 | 0 | attribute_key_a : DIFFERENT, attribute_key_b : APPROXIMATED | Every Identity that have 6 matching attributes over the 7 required, the 7th can be attribute_key_a with a different value OR attribute_key_b with an approximated value |
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCode()intDefault value -1 means unlimited detection.intgetId()getName()intintintintbooleanisActive()booleanisDaemon()voidsetActive(boolean _bActive) voidsetAttributeTreatments(List<DuplicateRuleAttributeTreatment> _listAttributeTreatments) voidsetAuthorName(String _strAuthorName) voidsetCheckedAttributes(List<AttributeKey> _listCheckedAttributes) voidvoidsetCreationDate(Date creationDate) voidsetDaemon(boolean _bDaemon) voidsetDaemonLastExecDate(Timestamp _dateDaemonLastExecDate) voidsetDescription(String _strDescription) voidsetDetectionLimit(int _nDetectionLimit) voidsetId(int _nId) voidsetLastUpdateDate(Date lastUpdateDate) voidvoidsetNbEqualAttributes(int _nNbEqualAttributes) voidsetNbFilledAttributes(int _nNbFilledAttributes) voidsetNbMissingAttributes(int _nNbMissingAttributes) voidsetPriority(int _priority) voidvalidate()
-
Constructor Details
-
DuplicateRule
public DuplicateRule()
-
-
Method Details
-
validate
public void validate() throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
getId
public int getId() -
setId
public void setId(int _nId) -
getName
-
setName
-
getCode
-
setCode
-
getDescription
-
setDescription
-
getCheckedAttributes
-
setCheckedAttributes
-
getNbFilledAttributes
public int getNbFilledAttributes() -
setNbFilledAttributes
public void setNbFilledAttributes(int _nNbFilledAttributes) -
getNbEqualAttributes
public int getNbEqualAttributes() -
setNbEqualAttributes
public void setNbEqualAttributes(int _nNbEqualAttributes) -
getNbMissingAttributes
public int getNbMissingAttributes() -
setNbMissingAttributes
public void setNbMissingAttributes(int _nNbMissingAttributes) -
getAttributeTreatments
-
setAttributeTreatments
-
getPriority
public int getPriority() -
setPriority
public void setPriority(int _priority) -
isActive
public boolean isActive() -
setActive
public void setActive(boolean _bActive) -
isDaemon
public boolean isDaemon() -
setDaemon
public void setDaemon(boolean _bDaemon) -
getDaemonLastExecDate
-
setDaemonLastExecDate
-
getDetectionLimit
public int getDetectionLimit()Default value -1 means unlimited detection. -
setDetectionLimit
public void setDetectionLimit(int _nDetectionLimit) -
getAuthorName
-
setAuthorName
-
getLastUpdateDate
-
setLastUpdateDate
-
getCreationDate
-
setCreationDate
-