Class AbstractMetadataGenerator

java.lang.Object
org.hibernate.envers.configuration.internal.metadata.AbstractMetadataGenerator
Direct Known Subclasses:
AbstractCollectionMetadataGenerator, AuditMetadataGenerator, ComponentMetadataGenerator, IdMetadataGenerator, ToOneRelationMetadataGenerator, ValueMetadataGenerator

public abstract class AbstractMetadataGenerator extends Object
Abstract base class for all metadata generator implementations.
  • Constructor Details

  • Method Details

    • getMetadataBuildingContext

      protected EnversMetadataBuildingContext getMetadataBuildingContext()
    • getAuditedEntityConfigurations

      public Map<String,EntityConfiguration> getAuditedEntityConfigurations()
    • getNotAuditedEntityConfigurations

      public Map<String,EntityConfiguration> getNotAuditedEntityConfigurations()
    • hasAuditedEntityConfiguration

      protected boolean hasAuditedEntityConfiguration(String entityName)
    • hasNotAuditedEntityConfiguration

      protected boolean hasNotAuditedEntityConfiguration(String entityName)
    • getAuditedEntityConfiguration

      protected EntityConfiguration getAuditedEntityConfiguration(String entityName)
    • getNotAuditedEntityConfiguration

      protected EntityConfiguration getNotAuditedEntityConfiguration(String entityName)
    • addAuditedEntityConfiguration

      protected void addAuditedEntityConfiguration(String entityName, EntityConfiguration entityConfiguration)
    • addNotAuditedEntityConfiguration

      protected void addNotAuditedEntityConfiguration(String entityName, EntityConfiguration entityConfiguration)
    • getSchemaName

      protected String getSchemaName(String schemaFromAnnotation, Table table)
    • getCatalogName

      protected String getCatalogName(String catalogFromAnnotation, Table table)
    • addRevisionInfoRelationToIdentifier

      protected void addRevisionInfoRelationToIdentifier(Identifier identifier)
    • addAuditStrategyAdditionalColumnsToEntity

      protected void addAuditStrategyAdditionalColumnsToEntity(PersistentEntity entity)
    • addAuditStrategyRevisionEndTimestampOnly

      protected void addAuditStrategyRevisionEndTimestampOnly(PersistentEntity entity)
    • addRevisionTypeToAttributeContainer

      protected void addRevisionTypeToAttributeContainer(AttributeContainer container, boolean key)
    • 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 using RelationTargetAuditMode.NOT_AUDITED.
    • throwUnsupportedTypeException

      protected void throwUnsupportedTypeException(Type type, String entityName, String propertyName)