Interface DuplicateEntityManager

All Known Implementing Classes:
DuplicateEntityManagerImpl

public interface DuplicateEntityManager
Executes import for a given import configuration and ImportedData.
  • Method Details

    • load

      @Nullable Object load(Object entity, UniqueEntityConfiguration configuration, FetchPlan fetchPlan)
      Searches in the database the duplicate for a specified entity by properties from the given UniqueEntityConfiguration.
      Parameters:
      entity - entity for which duplicated is searched
      configuration - unique entity configuration
      fetchPlan - fetch plan with which the duplicate entity is loaded
      Returns:
      found duplicate
    • isDuplicated

      boolean isDuplicated(Object firstEntity, Object secondEntity, UniqueEntityConfiguration configuration)
      Checks whether specified entities are duplicates by properties from the given UniqueEntityConfiguration.
      Parameters:
      firstEntity - first entity
      secondEntity - second entity
      configuration - unique entity configuration
      Returns:
      true if entities are duplicates
    • find

      @Nullable Object find(Collection<Object> existingEntities, Map<String,Object> propertyValues)
      Searches an entity in the specified list that has the same property values as in specified map.
      Parameters:
      existingEntities - entities to search the entity by property values
      propertyValues - property values
      Returns:
      found entity
    • load

      @Nullable Object load(Class entityClass, Map<String,Object> propertyValues, @Nullable FetchPlan fetchPlan)
      Loads an entity by given property values.
      Parameters:
      entityClass - class of entity to load
      propertyValues - property values
      fetchPlan - fetch plan
      Returns:
      loaded entity