Class DuplicateSearchServiceImpl
java.lang.Object
ch.tocco.nice2.duplicate.impl.search.DuplicateSearchServiceImpl
- All Implemented Interfaces:
DuplicateSearchService
-
Constructor Summary
ConstructorsConstructorDescriptionDuplicateSearchServiceImpl(BusinessUnitManager businessUnitManager, SecurityManager securityManager, PersistenceService persistenceService, CommandExecutor commandExecutor, DefaultDisplayService defaultDisplayService, DuplicateConfigurationService duplicateConfigurationService) -
Method Summary
Modifier and TypeMethodDescriptionfindAllDuplicates(EntityModel entityModel, BusinessUnit businessUnit) Queries the database for all duplicate entities for the given model according to the currently active Duplicate_config.findAllDuplicates(EntityModel entityModel, BusinessUnit businessUnit, Set<PrimaryKey> includedKeys) LikeDuplicateSearchService.findAllDuplicates(EntityModel, BusinessUnit)but only searches within the given keys.findDuplicateEntities(EntityModel entityModel, DuplicateResult.Duplicate duplicate, BusinessUnit businessUnit) Returns all 'Duplicate' entities where the given keys are referenced.findDuplicatesForEntity(Entity entity, BusinessUnit businessUnit) Find duplicates for a certain entity.voidsaveDuplicates(List<DuplicateResult.Duplicate> duplicates, EntityModel entityModel, BusinessUnit businessUnit) Persists the given duplicates to the 'nice_duplicate' table.voidsetIgnoreAccents(boolean ignoreAccents) voidsetTrigramSimilarity(double trigramSimilarity)
-
Constructor Details
-
DuplicateSearchServiceImpl
public DuplicateSearchServiceImpl(BusinessUnitManager businessUnitManager, SecurityManager securityManager, PersistenceService persistenceService, CommandExecutor commandExecutor, DefaultDisplayService defaultDisplayService, DuplicateConfigurationService duplicateConfigurationService)
-
-
Method Details
-
setTrigramSimilarity
@Value("${nice2.duplicate.min.trigramSimilarity}") public void setTrigramSimilarity(double trigramSimilarity) -
saveDuplicates
public void saveDuplicates(List<DuplicateResult.Duplicate> duplicates, EntityModel entityModel, BusinessUnit businessUnit) Description copied from interface:DuplicateSearchServicePersists the given duplicates to the 'nice_duplicate' table.- Specified by:
saveDuplicatesin interfaceDuplicateSearchService
-
findAllDuplicates
Description copied from interface:DuplicateSearchServiceQueries the database for all duplicate entities for the given model according to the currently active Duplicate_config.- Specified by:
findAllDuplicatesin interfaceDuplicateSearchService
-
findAllDuplicates
public DuplicateResult findAllDuplicates(EntityModel entityModel, BusinessUnit businessUnit, Set<PrimaryKey> includedKeys) Description copied from interface:DuplicateSearchServiceLikeDuplicateSearchService.findAllDuplicates(EntityModel, BusinessUnit)but only searches within the given keys.- Specified by:
findAllDuplicatesin interfaceDuplicateSearchService
-
findDuplicatesForEntity
Description copied from interface:DuplicateSearchServiceFind duplicates for a certain entity.- Specified by:
findDuplicatesForEntityin interfaceDuplicateSearchService
-
findDuplicateEntities
public List<Entity> findDuplicateEntities(EntityModel entityModel, DuplicateResult.Duplicate duplicate, BusinessUnit businessUnit) Description copied from interface:DuplicateSearchServiceReturns all 'Duplicate' entities where the given keys are referenced. Note: between transaction this should return zero or one entities. However it may be that this methods return more than one entity temporarily during complex transaction. This state should be resolved by listeners before the transaction is committed.- Specified by:
findDuplicateEntitiesin interfaceDuplicateSearchService
-
setIgnoreAccents
@Value("${nice2.duplicate.ignoreAccents}") public void setIgnoreAccents(boolean ignoreAccents)
-