Class AbstractMetadataGenerator
java.lang.Object
org.hibernate.envers.configuration.internal.metadata.AbstractMetadataGenerator
- Direct Known Subclasses:
AbstractCollectionMetadataGenerator
,AuditMetadataGenerator
,ComponentMetadataGenerator
,IdMetadataGenerator
,ToOneRelationMetadataGenerator
,ValueMetadataGenerator
Abstract base class for all metadata generator implementations.
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractMetadataGenerator
(EnversMetadataBuildingContext metadataBuildingContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAuditedEntityConfiguration
(String entityName, EntityConfiguration entityConfiguration) protected void
protected void
protected void
addNotAuditedEntityConfiguration
(String entityName, EntityConfiguration entityConfiguration) protected void
addRevisionInfoRelationToIdentifier
(Identifier identifier) protected void
addRevisionTypeToAttributeContainer
(AttributeContainer container, boolean key) protected EntityConfiguration
getAuditedEntityConfiguration
(String entityName) protected String
getCatalogName
(String catalogFromAnnotation, Table table) protected EnversMetadataBuildingContext
protected EntityConfiguration
getNotAuditedEntityConfiguration
(String entityName) protected IdMappingData
getReferencedIdMappingData
(String entityName, String referencedEntityName, PropertyAuditingData propertyAuditingData, boolean allowNotAuditedTarget) Reads the id mapping data of a referenced entity.protected String
getSchemaName
(String schemaFromAnnotation, Table table) protected boolean
hasAuditedEntityConfiguration
(String entityName) protected boolean
hasNotAuditedEntityConfiguration
(String entityName) protected void
throwUnsupportedTypeException
(Type type, String entityName, String propertyName)
-
Constructor Details
-
AbstractMetadataGenerator
-
-
Method Details
-
getMetadataBuildingContext
-
getAuditedEntityConfigurations
-
getNotAuditedEntityConfigurations
-
hasAuditedEntityConfiguration
-
hasNotAuditedEntityConfiguration
-
getAuditedEntityConfiguration
-
getNotAuditedEntityConfiguration
-
addAuditedEntityConfiguration
protected void addAuditedEntityConfiguration(String entityName, EntityConfiguration entityConfiguration) -
addNotAuditedEntityConfiguration
protected void addNotAuditedEntityConfiguration(String entityName, EntityConfiguration entityConfiguration) -
getSchemaName
-
getCatalogName
-
addRevisionInfoRelationToIdentifier
-
addAuditStrategyAdditionalColumnsToEntity
-
addAuditStrategyRevisionEndTimestampOnly
-
addRevisionTypeToAttributeContainer
-
getReferencedIdMappingData
protected IdMappingData getReferencedIdMappingData(String entityName, String referencedEntityName, PropertyAuditingData propertyAuditingData, boolean allowNotAuditedTarget) Reads the id mapping data of a referenced entity.- Parameters:
entityName
- Name of the entity which is the source of the relation.referencedEntityName
- Name of the entity which is the target of the relation.propertyAuditingData
- Auditing data of the property that is the source of the relation.allowNotAuditedTarget
- Are not-audited target entities allowed.- Returns:
- The id mapping data of the related entity.
- Throws:
EnversMappingException
- If a relation from an audited to a non-audited entity is detected, which is not mapped usingRelationTargetAuditMode.NOT_AUDITED
.
-
throwUnsupportedTypeException
-