Class SuspiciousIdentityDAO

  • All Implemented Interfaces:
    ISuspiciousIdentityDAO

    public final class SuspiciousIdentityDAO
    extends java.lang.Object
    implements ISuspiciousIdentityDAO
    This class provides Data Access methods for SuspiciousIdentity objects
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkIfContainsSuspicious​(java.util.List<java.lang.String> customerIds, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Verify if at least one customer ID within a list is identified as suspicious
      boolean checkIfExcluded​(java.lang.String firstCuid, java.lang.String secondCuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Verify if suspicious identities are already marked as excluded
      boolean checkIfExcluded​(java.lang.String firstCuid, java.util.List<java.lang.String> cuids, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Verify if suspicious identities are already marked as excluded
      int countSuspiciousIdentities​(int ruleId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Return the number of pending suspicious identities for a given rule.
      int countSuspiciousIdentities​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Return the number of pending suspicious identities
      void delete​(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      void delete​(java.lang.String customerId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      java.util.List<SuspiciousIdentity> getAllLocks​(fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      void insert​(SuspiciousIdentity suspiciousIdentity, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      void insertExcluded​(java.lang.String firstCuid, java.lang.String secondCuid, java.lang.String authorType, java.lang.String authorName, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      java.util.Optional<SuspiciousIdentity> load​(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      boolean manageLock​(java.lang.String customerId, boolean lock, java.lang.String authorType, java.lang.String authorName, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      void purge​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Truncates duplicate suspicions
      void purgeByRuleId​(java.lang.Integer ruleId, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      void purgeLocks​(fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      void removeExcludedIdentities​(java.lang.String cuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      void removeExcludedIdentities​(java.lang.String firstCuid, java.lang.String secondCuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      void removeLock​(java.lang.String customerId, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      SuspiciousIdentity selectByCustomerID​(java.lang.String customerId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of suspiciousIdentity with customerID matching argument
      java.util.List<SuspiciousIdentity> selectByCustomerIDs​(java.util.List<java.lang.String> customerIds, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the SuspiciousIdentity list that has been marked for this list of CUIDs, if any
      java.util.List<ExcludedIdentities> selectExcludedIdentitiesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the excluded identities objects and returns them as a list
      java.util.List<ExcludedIdentities> selectExcludedIdentitiesList​(java.lang.String customerId, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      java.util.List<java.lang.Integer> selectIdSuspiciousIdentitysList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the id of all the suspiciousIdentity objects and returns them as a list
      java.util.List<java.lang.String> selectSuspiciousIdentityCuidsList​(java.lang.String ruleCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      java.util.List<SuspiciousIdentity> selectSuspiciousIdentitysList​(java.lang.String ruleCode, int max, java.lang.Integer priority, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the suspiciousIdentity objects and returns them as a list
      java.util.List<SuspiciousIdentity> selectSuspiciousIdentitysList​(java.lang.String ruleCode, java.util.List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchAttribute> attributes, java.lang.Integer max, java.lang.Integer priority, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the suspiciousIdentity objects and returns them as a list
      java.util.List<SuspiciousIdentity> selectSuspiciousIdentitysListByIds​(fr.paris.lutece.portal.service.plugin.Plugin plugin, java.util.List<java.lang.Integer> listIds)
      Load the data of all the avant objects and returns them as a list
      fr.paris.lutece.util.ReferenceList selectSuspiciousIdentitysReferenceList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the suspiciousIdentity objects and returns them as a referenceList
      void store​(SuspiciousIdentity suspiciousIdentity, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SuspiciousIdentityDAO

        public SuspiciousIdentityDAO()
    • Method Detail

      • insert

        public void insert​(SuspiciousIdentity suspiciousIdentity,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a new record in the table.
        Specified by:
        insert in interface ISuspiciousIdentityDAO
        Parameters:
        suspiciousIdentity - instance of the SuspiciousIdentity object to insert
        plugin - the Plugin
      • insertExcluded

        public void insertExcluded​(java.lang.String firstCuid,
                                   java.lang.String secondCuid,
                                   java.lang.String authorType,
                                   java.lang.String authorName,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        insertExcluded in interface ISuspiciousIdentityDAO
      • load

        public java.util.Optional<SuspiciousIdentity> load​(int nKey,
                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data from the table
        Specified by:
        load in interface ISuspiciousIdentityDAO
        Parameters:
        nKey - The identifier of the suspiciousIdentity
        plugin - the Plugin
        Returns:
        The instance of the suspiciousIdentity
      • selectByCustomerID

        public SuspiciousIdentity selectByCustomerID​(java.lang.String customerId,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of suspiciousIdentity with customerID matching argument
        Specified by:
        selectByCustomerID in interface ISuspiciousIdentityDAO
        Parameters:
        customerId - id of the customer
        plugin - the Plugin
        Returns:
        The SuspiciousIdentity
      • selectByCustomerIDs

        public java.util.List<SuspiciousIdentity> selectByCustomerIDs​(java.util.List<java.lang.String> customerIds,
                                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the SuspiciousIdentity list that has been marked for this list of CUIDs, if any
        Specified by:
        selectByCustomerIDs in interface ISuspiciousIdentityDAO
        Parameters:
        customerIds - the list of CUIDs to search for
        plugin - the plugin
        Returns:
        the SuspiciousIdentity list that has been marked for this list of CUIDs, if any
      • delete

        public void delete​(int nId,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete a record from the table
        Specified by:
        delete in interface ISuspiciousIdentityDAO
        Parameters:
        nId - The identifier of the SuspiciousIdentity to delete
        plugin - the Plugin
      • delete

        public void delete​(java.lang.String customerId,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete a record from the table
        Specified by:
        delete in interface ISuspiciousIdentityDAO
        Parameters:
        customerId - The identifier of the SuspiciousIdentity to delete
        plugin - the Plugin
      • store

        public void store​(SuspiciousIdentity suspiciousIdentity,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update the record in the table
        Specified by:
        store in interface ISuspiciousIdentityDAO
        Parameters:
        suspiciousIdentity - the reference of the SuspiciousIdentity
        plugin - the Plugin
      • selectSuspiciousIdentitysList

        public java.util.List<SuspiciousIdentity> selectSuspiciousIdentitysList​(java.lang.String ruleCode,
                                                                                int max,
                                                                                java.lang.Integer priority,
                                                                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
                                                                         throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Load the data of all the suspiciousIdentity objects and returns them as a list
        Specified by:
        selectSuspiciousIdentitysList in interface ISuspiciousIdentityDAO
        max - maximum number of SuspiciousIdentity to return
        plugin - the Plugin
        Returns:
        The list which contains the data of all the suspiciousIdentity objects
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • selectSuspiciousIdentitysList

        public java.util.List<SuspiciousIdentity> selectSuspiciousIdentitysList​(java.lang.String ruleCode,
                                                                                java.util.List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchAttribute> attributes,
                                                                                java.lang.Integer max,
                                                                                java.lang.Integer priority,
                                                                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
                                                                         throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
        Load the data of all the suspiciousIdentity objects and returns them as a list
        Specified by:
        selectSuspiciousIdentitysList in interface ISuspiciousIdentityDAO
        attributes - attribute keys and values to filter on
        max - maximum number of SuspiciousIdentity to return
        plugin - the Plugin
        Returns:
        The list which contains the data of all the suspiciousIdentity objects
        Throws:
        fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      • selectExcludedIdentitiesList

        public java.util.List<ExcludedIdentities> selectExcludedIdentitiesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ISuspiciousIdentityDAO
        Load the data of all the excluded identities objects and returns them as a list
        Specified by:
        selectExcludedIdentitiesList in interface ISuspiciousIdentityDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The list which contains the data of all the suspiciousIdentity objects
      • selectIdSuspiciousIdentitysList

        public java.util.List<java.lang.Integer> selectIdSuspiciousIdentitysList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the id of all the suspiciousIdentity objects and returns them as a list
        Specified by:
        selectIdSuspiciousIdentitysList in interface ISuspiciousIdentityDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The list which contains the id of all the suspiciousIdentity objects
      • selectSuspiciousIdentitysReferenceList

        public fr.paris.lutece.util.ReferenceList selectSuspiciousIdentitysReferenceList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the suspiciousIdentity objects and returns them as a referenceList
        Specified by:
        selectSuspiciousIdentitysReferenceList in interface ISuspiciousIdentityDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The referenceList which contains the data of all the suspiciousIdentity objects
      • selectSuspiciousIdentitysListByIds

        public java.util.List<SuspiciousIdentity> selectSuspiciousIdentitysListByIds​(fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                                                     java.util.List<java.lang.Integer> listIds)
        Load the data of all the avant objects and returns them as a list
        Specified by:
        selectSuspiciousIdentitysListByIds in interface ISuspiciousIdentityDAO
        Parameters:
        plugin - the Plugin
        listIds - liste of ids
        Returns:
        The list which contains the data of all the avant objects
      • purgeByRuleId

        public void purgeByRuleId​(java.lang.Integer ruleId,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        purgeByRuleId in interface ISuspiciousIdentityDAO
      • countSuspiciousIdentities

        public int countSuspiciousIdentities​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Return the number of pending suspicious identities
        Specified by:
        countSuspiciousIdentities in interface ISuspiciousIdentityDAO
        Returns:
        the count
      • countSuspiciousIdentities

        public int countSuspiciousIdentities​(int ruleId,
                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Return the number of pending suspicious identities for a given rule.
        Specified by:
        countSuspiciousIdentities in interface ISuspiciousIdentityDAO
        Parameters:
        ruleId - the rule ID
        Returns:
        the count
      • checkIfExcluded

        public boolean checkIfExcluded​(java.lang.String firstCuid,
                                       java.lang.String secondCuid,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ISuspiciousIdentityDAO
        Verify if suspicious identities are already marked as excluded
        Specified by:
        checkIfExcluded in interface ISuspiciousIdentityDAO
        Parameters:
        firstCuid - cuid of the firstCuid identity
        secondCuid - cuid of the secondCuid identity
      • checkIfExcluded

        public boolean checkIfExcluded​(java.lang.String firstCuid,
                                       java.util.List<java.lang.String> cuids,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ISuspiciousIdentityDAO
        Verify if suspicious identities are already marked as excluded
        Specified by:
        checkIfExcluded in interface ISuspiciousIdentityDAO
        Parameters:
        firstCuid - cuid of the firstCuid identity
        cuids - cuids of the potential secondCuid identity
      • checkIfContainsSuspicious

        public boolean checkIfContainsSuspicious​(java.util.List<java.lang.String> customerIds,
                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: ISuspiciousIdentityDAO
        Verify if at least one customer ID within a list is identified as suspicious
        Specified by:
        checkIfContainsSuspicious in interface ISuspiciousIdentityDAO
        Parameters:
        customerIds - list of cuids
      • manageLock

        public boolean manageLock​(java.lang.String customerId,
                                  boolean lock,
                                  java.lang.String authorType,
                                  java.lang.String authorName,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        manageLock in interface ISuspiciousIdentityDAO
      • removeLock

        public void removeLock​(java.lang.String customerId,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        removeLock in interface ISuspiciousIdentityDAO
      • selectSuspiciousIdentityCuidsList

        public java.util.List<java.lang.String> selectSuspiciousIdentityCuidsList​(java.lang.String ruleCode,
                                                                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        selectSuspiciousIdentityCuidsList in interface ISuspiciousIdentityDAO
      • removeExcludedIdentities

        public void removeExcludedIdentities​(java.lang.String firstCuid,
                                             java.lang.String secondCuid,
                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        removeExcludedIdentities in interface ISuspiciousIdentityDAO