Class LookupEntityHistoryConfig
java.lang.Object
ch.tocco.nice2.persist.history.impl.v2.config.LookupEntityHistoryConfig
- All Implemented Interfaces:
EntityHistoryConfiguration
@Component
public class LookupEntityHistoryConfig
extends Object
implements EntityHistoryConfiguration
The default configuration for lookup entities.
The key, version, unique_id and label fields are included (no relations are included).
This configuration is only used for nested lookup entities in the xml. If the lookup entity itself is adjusted the normal
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.persist.history.api.v2.EntityHistoryConfiguration
EntityHistoryConfiguration.RelationDefinition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetIncludedFields
(EntityModel entityModel) getIncludedRelations
(Entity centerEntity) boolean
int
priority()
void
setIgnoreEntityModels
(List<HistoryExclusionContribution> contributions) boolean
supports
(EntityModel entityModel, boolean isRootEntity)
-
Constructor Details
-
LookupEntityHistoryConfig
public LookupEntityHistoryConfig()
-
-
Method Details
-
setIgnoreEntityModels
@Autowired(required=false) public void setIgnoreEntityModels(List<HistoryExclusionContribution> contributions) -
supports
- Specified by:
supports
in interfaceEntityHistoryConfiguration
- Returns:
- true if
EntityHistoryConfiguration
supports this entity model. `isRootEntity` is used to distinguish between a lookup entity itself is changed and the full xml should be generated or a related entity is changed and only some fields should be in the xml.
-
priority
public int priority()- Specified by:
priority
in interfaceEntityHistoryConfiguration
-
isApplicableForHistory
- Specified by:
isApplicableForHistory
in interfaceEntityHistoryConfiguration
- Returns:
- true if the given event should trigger the creation of a history entry
-
getIncludedFields
- Specified by:
getIncludedFields
in interfaceEntityHistoryConfiguration
- Returns:
- which fields should be included in the history snapshot for the given entity model
-
getIncludedRelations
public List<EntityHistoryConfiguration.RelationDefinition> getIncludedRelations(Entity centerEntity) - Specified by:
getIncludedRelations
in interfaceEntityHistoryConfiguration
- Returns:
- which relations should be included in the history snapshot for the given entity model
-