Class EntityHistoryServiceImpl
java.lang.Object
ch.tocco.nice2.optional.entityhistory.impl.EntityHistoryServiceImpl
- All Implemented Interfaces:
EntityHistoryService
-
Constructor Summary
ConstructorDescriptionEntityHistoryServiceImpl
(PrincipalService principalService, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService) -
Method Summary
Modifier and TypeMethodDescriptiongetConfigForEntity
(Entity entity) returns an entity according to the model name of the givenEntity
getHistoryRelatedEntities
(Entity sourceEntity, HistoryConfig historyConfig, Set<EntityId> createdEntityIds) gets the entities related to a history entity.void
setDefaults
(Entity sourceEntity, Entity historyEntity) void
setHistoryConfigs
(List<EntityHistoryConfig> configs)
-
Constructor Details
-
EntityHistoryServiceImpl
public EntityHistoryServiceImpl(PrincipalService principalService, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService)
-
-
Method Details
-
setDefaults
- Specified by:
setDefaults
in interfaceEntityHistoryService
-
getHistoryRelatedEntities
public EntityList getHistoryRelatedEntities(Entity sourceEntity, HistoryConfig historyConfig, Set<EntityId> createdEntityIds) Description copied from interface:EntityHistoryService
gets the entities related to a history entity. The path provided byHistoryConfig.getPathToHistoryRelatedEntity()
will be used to resolve them and only the Entities which fulfill the condition provided byHistoryConfig.getCondition()
will be returned.- Specified by:
getHistoryRelatedEntities
in interfaceEntityHistoryService
-
getConfigForEntity
Description copied from interface:EntityHistoryService
returns an entity according to the model name of the givenEntity
- Specified by:
getConfigForEntity
in interfaceEntityHistoryService
-
setHistoryConfigs
-