Class DuplicateRule
- java.lang.Object
-
- fr.paris.lutece.plugins.identitystore.business.rules.duplicate.DuplicateRule
-
- All Implemented Interfaces:
Serializable
public class DuplicateRule extends Object implements 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:- _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
- Result of the search:
_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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DuplicateRule()
-
Method Summary
-
-
-
Method Detail
-
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
public String getName()
-
setName
public void setName(String _strName)
-
getCode
public String getCode()
-
setCode
public void setCode(String _strCode)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String _strDescription)
-
getCheckedAttributes
public List<AttributeKey> getCheckedAttributes()
-
setCheckedAttributes
public void setCheckedAttributes(List<AttributeKey> _listCheckedAttributes)
-
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
public List<DuplicateRuleAttributeTreatment> getAttributeTreatments()
-
setAttributeTreatments
public void setAttributeTreatments(List<DuplicateRuleAttributeTreatment> _listAttributeTreatments)
-
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
public Timestamp getDaemonLastExecDate()
-
setDaemonLastExecDate
public void setDaemonLastExecDate(Timestamp _dateDaemonLastExecDate)
-
getDetectionLimit
public int getDetectionLimit()
Default value -1 means unlimited detection.
-
setDetectionLimit
public void setDetectionLimit(int _nDetectionLimit)
-
-