Class SuspiciousIdentityDAO
java.lang.Object
fr.paris.lutece.plugins.identitystore.business.duplicates.suspicions.SuspiciousIdentityDAO
- All Implemented Interfaces:
ISuspiciousIdentityDAO
This class provides Data Access methods for SuspiciousIdentity objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckIfContainsSuspicious(List<String> customerIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Verify if at least one customer ID within a list is identified as suspiciousbooleancheckIfExcluded(String firstCuid, String secondCuid, fr.paris.lutece.portal.service.plugin.Plugin plugin) Verify if suspicious identities are already marked as excludedbooleancheckIfExcluded(String firstCuid, List<String> cuids, fr.paris.lutece.portal.service.plugin.Plugin plugin) Verify if suspicious identities are already marked as excludedintcountSuspiciousIdentities(int ruleId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Return the number of pending suspicious identities for a given rule.intcountSuspiciousIdentities(fr.paris.lutece.portal.service.plugin.Plugin plugin) Return the number of pending suspicious identitiesvoiddelete(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the tablevoidDelete a record from the tablegetAllLocks(fr.paris.lutece.portal.service.plugin.Plugin plugin) voidinsert(SuspiciousIdentity suspiciousIdentity, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the table.voidinsertExcluded(String firstCuid, String secondCuid, String authorType, String authorName, fr.paris.lutece.portal.service.plugin.Plugin plugin) load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tablebooleanmanageLock(String customerId, boolean lock, String authorType, String authorName, fr.paris.lutece.portal.service.plugin.Plugin plugin) voidpurge(fr.paris.lutece.portal.service.plugin.Plugin plugin) Truncates duplicate suspicionsvoidpurgeByRuleId(Integer ruleId, fr.paris.lutece.portal.service.plugin.Plugin plugin) voidpurgeLocks(fr.paris.lutece.portal.service.plugin.Plugin plugin) voidremoveExcludedIdentities(String cuid, fr.paris.lutece.portal.service.plugin.Plugin plugin) voidremoveExcludedIdentities(String firstCuid, String secondCuid, fr.paris.lutece.portal.service.plugin.Plugin plugin) voidremoveLock(String customerId, fr.paris.lutece.portal.service.plugin.Plugin plugin) selectByCustomerID(String customerId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of suspiciousIdentity with customerID matching argumentselectByCustomerIDs(List<String> customerIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Get theSuspiciousIdentitylist that has been marked for this list of CUIDs, if anyselectExcludedIdentitiesList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the excluded identities objects and returns them as a listselectExcludedIdentitiesList(String customerId, fr.paris.lutece.portal.service.plugin.Plugin plugin) selectIdSuspiciousIdentitysList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the id of all the suspiciousIdentity objects and returns them as a listselectSuspiciousIdentityCuidsList(String ruleCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) selectSuspiciousIdentitysList(String ruleCode, int max, Integer priority, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the suspiciousIdentity objects and returns them as a listselectSuspiciousIdentitysList(String ruleCode, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchAttribute> attributes, Integer max, Integer priority, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the suspiciousIdentity objects and returns them as a listselectSuspiciousIdentitysListByIds(fr.paris.lutece.portal.service.plugin.Plugin plugin, List<Integer> listIds) Load the data of all the avant objects and returns them as a listfr.paris.lutece.util.ReferenceListselectSuspiciousIdentitysReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the suspiciousIdentity objects and returns them as a referenceListvoidstore(SuspiciousIdentity suspiciousIdentity, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the record in the table
-
Constructor Details
-
SuspiciousIdentityDAO
public SuspiciousIdentityDAO()
-
-
Method Details
-
insert
public void insert(SuspiciousIdentity suspiciousIdentity, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the table.- Specified by:
insertin interfaceISuspiciousIdentityDAO- Parameters:
suspiciousIdentity- instance of the SuspiciousIdentity object to insertplugin- the Plugin
-
insertExcluded
public void insertExcluded(String firstCuid, String secondCuid, String authorType, String authorName, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
insertExcludedin interfaceISuspiciousIdentityDAO
-
load
public Optional<SuspiciousIdentity> load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the table- Specified by:
loadin interfaceISuspiciousIdentityDAO- Parameters:
nKey- The identifier of the suspiciousIdentityplugin- the Plugin- Returns:
- The instance of the suspiciousIdentity
-
selectByCustomerID
public SuspiciousIdentity selectByCustomerID(String customerId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of suspiciousIdentity with customerID matching argument- Specified by:
selectByCustomerIDin interfaceISuspiciousIdentityDAO- Parameters:
customerId- id of the customerplugin- the Plugin- Returns:
- The SuspiciousIdentity
-
selectByCustomerIDs
public List<SuspiciousIdentity> selectByCustomerIDs(List<String> customerIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Get theSuspiciousIdentitylist that has been marked for this list of CUIDs, if any- Specified by:
selectByCustomerIDsin interfaceISuspiciousIdentityDAO- Parameters:
customerIds- the list of CUIDs to search forplugin- the plugin- Returns:
- the
SuspiciousIdentitylist 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:
deletein interfaceISuspiciousIdentityDAO- Parameters:
nId- The identifier of the SuspiciousIdentity to deleteplugin- the Plugin
-
delete
Delete a record from the table- Specified by:
deletein interfaceISuspiciousIdentityDAO- Parameters:
customerId- The identifier of the SuspiciousIdentity to deleteplugin- the Plugin
-
store
public void store(SuspiciousIdentity suspiciousIdentity, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the record in the table- Specified by:
storein interfaceISuspiciousIdentityDAO- Parameters:
suspiciousIdentity- the reference of the SuspiciousIdentityplugin- the Plugin
-
selectSuspiciousIdentitysList
public List<SuspiciousIdentity> selectSuspiciousIdentitysList(String ruleCode, int max, 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:
selectSuspiciousIdentitysListin interfaceISuspiciousIdentityDAOmax- maximum number ofSuspiciousIdentityto returnplugin- 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 List<SuspiciousIdentity> selectSuspiciousIdentitysList(String ruleCode, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchAttribute> attributes, Integer max, 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:
selectSuspiciousIdentitysListin interfaceISuspiciousIdentityDAOattributes- attribute keys and values to filter onmax- maximum number ofSuspiciousIdentityto returnplugin- 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 List<ExcludedIdentities> selectExcludedIdentitiesList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISuspiciousIdentityDAOLoad the data of all the excluded identities objects and returns them as a list- Specified by:
selectExcludedIdentitiesListin interfaceISuspiciousIdentityDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the data of all the suspiciousIdentity objects
-
selectExcludedIdentitiesList
public List<ExcludedIdentities> selectExcludedIdentitiesList(String customerId, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
selectExcludedIdentitiesListin interfaceISuspiciousIdentityDAO
-
selectIdSuspiciousIdentitysList
public List<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:
selectIdSuspiciousIdentitysListin interfaceISuspiciousIdentityDAO- 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:
selectSuspiciousIdentitysReferenceListin interfaceISuspiciousIdentityDAO- Parameters:
plugin- the Plugin- Returns:
- The referenceList which contains the data of all the suspiciousIdentity objects
-
selectSuspiciousIdentitysListByIds
public List<SuspiciousIdentity> selectSuspiciousIdentitysListByIds(fr.paris.lutece.portal.service.plugin.Plugin plugin, List<Integer> listIds) Load the data of all the avant objects and returns them as a list- Specified by:
selectSuspiciousIdentitysListByIdsin interfaceISuspiciousIdentityDAO- Parameters:
plugin- the PluginlistIds- liste of ids- Returns:
- The list which contains the data of all the avant objects
-
purge
public void purge(fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISuspiciousIdentityDAOTruncates duplicate suspicions- Specified by:
purgein interfaceISuspiciousIdentityDAO
-
purgeByRuleId
- Specified by:
purgeByRuleIdin interfaceISuspiciousIdentityDAO
-
countSuspiciousIdentities
public int countSuspiciousIdentities(fr.paris.lutece.portal.service.plugin.Plugin plugin) Return the number of pending suspicious identities- Specified by:
countSuspiciousIdentitiesin interfaceISuspiciousIdentityDAO- 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:
countSuspiciousIdentitiesin interfaceISuspiciousIdentityDAO- Parameters:
ruleId- the rule ID- Returns:
- the count
-
checkIfExcluded
public boolean checkIfExcluded(String firstCuid, String secondCuid, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISuspiciousIdentityDAOVerify if suspicious identities are already marked as excluded- Specified by:
checkIfExcludedin interfaceISuspiciousIdentityDAO- Parameters:
firstCuid- cuid of the firstCuid identitysecondCuid- cuid of the secondCuid identity
-
checkIfExcluded
public boolean checkIfExcluded(String firstCuid, List<String> cuids, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISuspiciousIdentityDAOVerify if suspicious identities are already marked as excluded- Specified by:
checkIfExcludedin interfaceISuspiciousIdentityDAO- Parameters:
firstCuid- cuid of the firstCuid identitycuids- cuids of the potential secondCuid identity
-
checkIfContainsSuspicious
public boolean checkIfContainsSuspicious(List<String> customerIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:ISuspiciousIdentityDAOVerify if at least one customer ID within a list is identified as suspicious- Specified by:
checkIfContainsSuspiciousin interfaceISuspiciousIdentityDAO- Parameters:
customerIds- list of cuids
-
manageLock
public boolean manageLock(String customerId, boolean lock, String authorType, String authorName, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
manageLockin interfaceISuspiciousIdentityDAO
-
purgeLocks
public void purgeLocks(fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
purgeLocksin interfaceISuspiciousIdentityDAO
-
getAllLocks
- Specified by:
getAllLocksin interfaceISuspiciousIdentityDAO
-
removeLock
- Specified by:
removeLockin interfaceISuspiciousIdentityDAO
-
selectSuspiciousIdentityCuidsList
public List<String> selectSuspiciousIdentityCuidsList(String ruleCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
selectSuspiciousIdentityCuidsListin interfaceISuspiciousIdentityDAO
-
removeExcludedIdentities
public void removeExcludedIdentities(String firstCuid, String secondCuid, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
removeExcludedIdentitiesin interfaceISuspiciousIdentityDAO
-
removeExcludedIdentities
public void removeExcludedIdentities(String cuid, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
removeExcludedIdentitiesin interfaceISuspiciousIdentityDAO
-