Class DuplicateRule
- java.lang.Object
-
- fr.paris.lutece.plugins.identitystore.business.rules.duplicate.DuplicateRule
-
- All Implemented Interfaces:
java.io.Serializable
public class DuplicateRule extends java.lang.Object implements java.io.SerializableThe 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<DuplicateRuleAttributeTreatment>getAttributeTreatments()java.lang.StringgetAuthorName()java.util.List<AttributeKey>getCheckedAttributes()java.lang.StringgetCode()java.sql.DategetCreationDate()java.sql.TimestampgetDaemonLastExecDate()java.lang.StringgetDescription()intgetDetectionLimit()Default value -1 means unlimited detection.intgetId()java.sql.DategetLastUpdateDate()java.lang.StringgetName()intgetNbEqualAttributes()intgetNbFilledAttributes()intgetNbMissingAttributes()intgetPriority()booleanisActive()booleanisDaemon()voidsetActive(boolean _bActive)voidsetAttributeTreatments(java.util.List<DuplicateRuleAttributeTreatment> _listAttributeTreatments)voidsetAuthorName(java.lang.String _strAuthorName)voidsetCheckedAttributes(java.util.List<AttributeKey> _listCheckedAttributes)voidsetCode(java.lang.String _strCode)voidsetCreationDate(java.sql.Date creationDate)voidsetDaemon(boolean _bDaemon)voidsetDaemonLastExecDate(java.sql.Timestamp _dateDaemonLastExecDate)voidsetDescription(java.lang.String _strDescription)voidsetDetectionLimit(int _nDetectionLimit)voidsetId(int _nId)voidsetLastUpdateDate(java.sql.Date lastUpdateDate)voidsetName(java.lang.String _strName)voidsetNbEqualAttributes(int _nNbEqualAttributes)voidsetNbFilledAttributes(int _nNbFilledAttributes)voidsetNbMissingAttributes(int _nNbMissingAttributes)voidsetPriority(int _priority)voidvalidate()
-
-
-
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 java.lang.String getName()
-
setName
public void setName(java.lang.String _strName)
-
getCode
public java.lang.String getCode()
-
setCode
public void setCode(java.lang.String _strCode)
-
getDescription
public java.lang.String getDescription()
-
setDescription
public void setDescription(java.lang.String _strDescription)
-
getCheckedAttributes
public java.util.List<AttributeKey> getCheckedAttributes()
-
setCheckedAttributes
public void setCheckedAttributes(java.util.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 java.util.List<DuplicateRuleAttributeTreatment> getAttributeTreatments()
-
setAttributeTreatments
public void setAttributeTreatments(java.util.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 java.sql.Timestamp getDaemonLastExecDate()
-
setDaemonLastExecDate
public void setDaemonLastExecDate(java.sql.Timestamp _dateDaemonLastExecDate)
-
getDetectionLimit
public int getDetectionLimit()
Default value -1 means unlimited detection.
-
setDetectionLimit
public void setDetectionLimit(int _nDetectionLimit)
-
getAuthorName
public java.lang.String getAuthorName()
-
setAuthorName
public void setAuthorName(java.lang.String _strAuthorName)
-
getLastUpdateDate
public java.sql.Date getLastUpdateDate()
-
setLastUpdateDate
public void setLastUpdateDate(java.sql.Date lastUpdateDate)
-
getCreationDate
public java.sql.Date getCreationDate()
-
setCreationDate
public void setCreationDate(java.sql.Date creationDate)
-
-