Class AbstractCollectionMetadataGenerator
java.lang.Object
org.hibernate.envers.configuration.internal.metadata.AbstractMetadataGenerator
org.hibernate.envers.configuration.internal.metadata.AbstractCollectionMetadataGenerator
- Direct Known Subclasses:
JoinColumnCollectionMetadataGenerator
,MiddleTableCollectionMetadataGenerator
Abstract base class for various collection-based metadata generators.
-
Constructor Summary
ConstructorDescriptionAbstractCollectionMetadataGenerator
(EnversMetadataBuildingContext metadataBuildingContext, BasicMetadataGenerator basicMetadataGenerator, ValueMetadataGenerator valueMetadataGenerator) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAttributesToEntity
(RootPersistentEntity entity, List<Attribute> attributes) abstract void
addCollection
(CollectionMetadataContext context) Entry point for all collection-based metadata generators where the collection will be inspected and the appropriate boot and runtime mappings are generated.protected MiddleComponentData
addIndex
(CollectionMetadataContext context, RootPersistentEntity middleEntity, QueryGeneratorBuilder queryGeneratorBuilder) protected void
addMapper
(CollectionMetadataContext context, CommonCollectionMapperData commonCollectionMapperData, MiddleComponentData elementComponentData, MiddleComponentData indexComponentData) protected MiddleComponentData
addValueToMiddleTable
(CollectionMetadataContext context, Value value, RootPersistentEntity entity, QueryGeneratorBuilder queryGeneratorBuilder, String prefix, AuditJoinTableData joinTableData, boolean key) protected CommonCollectionMapperData
createCommonCollectionMapperData
(CollectionMetadataContext context, String entityName, MiddleIdData idData, RelationQueryGenerator queryGenerator) protected MiddleIdData
createMiddleIdData
(IdMappingData idMappingData, String prefix, String entityName) protected String
getOrderBy
(Collection collection) protected String
getOrderByCollectionRole
(Collection collection, String orderBy) getPrefixedIdAttributes
(String prefix, ColumnNameIterator iterator, IdMappingData idMapping) protected boolean
protected boolean
Returns whether the collection is a map-type and that the map element is defined as a Clob/NClob type.Methods inherited from class org.hibernate.envers.configuration.internal.metadata.AbstractMetadataGenerator
addAuditedEntityConfiguration, addAuditStrategyAdditionalColumnsToEntity, addAuditStrategyRevisionEndTimestampOnly, addNotAuditedEntityConfiguration, addRevisionInfoRelationToIdentifier, addRevisionTypeToAttributeContainer, getAuditedEntityConfiguration, getAuditedEntityConfigurations, getCatalogName, getMetadataBuildingContext, getNotAuditedEntityConfiguration, getNotAuditedEntityConfigurations, getReferencedIdMappingData, getSchemaName, hasAuditedEntityConfiguration, hasNotAuditedEntityConfiguration, throwUnsupportedTypeException
-
Constructor Details
-
AbstractCollectionMetadataGenerator
public AbstractCollectionMetadataGenerator(EnversMetadataBuildingContext metadataBuildingContext, BasicMetadataGenerator basicMetadataGenerator, ValueMetadataGenerator valueMetadataGenerator)
-
-
Method Details
-
addCollection
Entry point for all collection-based metadata generators where the collection will be inspected and the appropriate boot and runtime mappings are generated.- Parameters:
context
- the per-collection metadata context
-
createMiddleIdData
protected MiddleIdData createMiddleIdData(IdMappingData idMappingData, String prefix, String entityName) -
getPrefixedIdAttributes
protected List<Attribute> getPrefixedIdAttributes(String prefix, ColumnNameIterator iterator, IdMappingData idMapping) -
addAttributesToEntity
-
createCommonCollectionMapperData
protected CommonCollectionMapperData createCommonCollectionMapperData(CollectionMetadataContext context, String entityName, MiddleIdData idData, RelationQueryGenerator queryGenerator) -
getOrderBy
-
getOrderByCollectionRole
-
addIndex
protected MiddleComponentData addIndex(CollectionMetadataContext context, RootPersistentEntity middleEntity, QueryGeneratorBuilder queryGeneratorBuilder) -
addValueToMiddleTable
protected MiddleComponentData addValueToMiddleTable(CollectionMetadataContext context, Value value, RootPersistentEntity entity, QueryGeneratorBuilder queryGeneratorBuilder, String prefix, AuditJoinTableData joinTableData, boolean key) -
addMapper
protected void addMapper(CollectionMetadataContext context, CommonCollectionMapperData commonCollectionMapperData, MiddleComponentData elementComponentData, MiddleComponentData indexComponentData) -
isLobMapElementType
Returns whether the collection is a map-type and that the map element is defined as a Clob/NClob type.- Returns:
true
if the element is a Clob/NClob type, otherwisefalse
.
-
isEmbeddableElementType
-