Class DuplicateSearchServiceImpl
java.lang.Object
ch.tocco.nice2.duplicate.impl.search.DuplicateSearchServiceImpl
- All Implemented Interfaces:
DuplicateSearchService
-
Constructor Summary
ConstructorDescriptionDuplicateSearchServiceImpl
(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.void
saveDuplicates
(List<DuplicateResult.Duplicate> duplicates, EntityModel entityModel, BusinessUnit businessUnit) Persists the given duplicates to the 'nice_duplicate' table.void
setIgnoreAccents
(boolean ignoreAccents) void
setTrigramSimilarity
(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:DuplicateSearchService
Persists the given duplicates to the 'nice_duplicate' table.- Specified by:
saveDuplicates
in interfaceDuplicateSearchService
-
findAllDuplicates
Description copied from interface:DuplicateSearchService
Queries the database for all duplicate entities for the given model according to the currently active Duplicate_config.- Specified by:
findAllDuplicates
in interfaceDuplicateSearchService
-
findAllDuplicates
public DuplicateResult findAllDuplicates(EntityModel entityModel, BusinessUnit businessUnit, Set<PrimaryKey> includedKeys) Description copied from interface:DuplicateSearchService
LikeDuplicateSearchService.findAllDuplicates(EntityModel, BusinessUnit)
but only searches within the given keys.- Specified by:
findAllDuplicates
in interfaceDuplicateSearchService
-
findDuplicatesForEntity
Description copied from interface:DuplicateSearchService
Find duplicates for a certain entity.- Specified by:
findDuplicatesForEntity
in interfaceDuplicateSearchService
-
findDuplicateEntities
public List<Entity> findDuplicateEntities(EntityModel entityModel, DuplicateResult.Duplicate duplicate, BusinessUnit businessUnit) Description copied from interface:DuplicateSearchService
Returns 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:
findDuplicateEntities
in interfaceDuplicateSearchService
-
setIgnoreAccents
@Value("${nice2.duplicate.ignoreAccents}") public void setIgnoreAccents(boolean ignoreAccents)
-