Class EntityHistoryServiceImpl
java.lang.Object
ch.tocco.nice2.optional.entityhistory.impl.EntityHistoryServiceImpl
- All Implemented Interfaces:
EntityHistoryService
-
Constructor Summary
ConstructorsConstructorDescriptionEntityHistoryServiceImpl(PrincipalService principalService, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService) -
Method Summary
Modifier and TypeMethodDescriptiongetConfigForEntity(Entity entity) returns an entity according to the model name of the givenEntitygetHistoryRelatedEntities(Entity sourceEntity, HistoryConfig historyConfig, Set<EntityId> createdEntityIds) gets the entities related to a history entity.voidsetDefaults(Entity sourceEntity, Entity historyEntity) voidsetHistoryConfigs(List<EntityHistoryConfig> configs)
-
Constructor Details
-
EntityHistoryServiceImpl
public EntityHistoryServiceImpl(PrincipalService principalService, QueryBuilderFactory queryBuilderFactory, EntityDefaultValueService entityDefaultValueService)
-
-
Method Details
-
setDefaults
- Specified by:
setDefaultsin interfaceEntityHistoryService
-
getHistoryRelatedEntities
public EntityList getHistoryRelatedEntities(Entity sourceEntity, HistoryConfig historyConfig, Set<EntityId> createdEntityIds) Description copied from interface:EntityHistoryServicegets 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:
getHistoryRelatedEntitiesin interfaceEntityHistoryService
-
getConfigForEntity
Description copied from interface:EntityHistoryServicereturns an entity according to the model name of the givenEntity- Specified by:
getConfigForEntityin interfaceEntityHistoryService
-
setHistoryConfigs
-