Class DuplicateRule

  • All Implemented Interfaces:
    java.io.Serializable

    public class DuplicateRule
    extends java.lang.Object
    implements java.io.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 AttributeKey that 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
    The search must return the identities that match:
    • _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.
    The logical rules are:
    • 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 Detail

      • DuplicateRule

        public DuplicateRule()
    • 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)
      • 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)