public interface MetadataBuilder
Modifier and Type | Method and Description |
---|---|
MetadataBuilder |
applyAccessType(AccessType accessType)
Specify the second-level access-type to be used by default for entities and collections that define second-level
caching, but do not specify a granular access-type.
|
MetadataBuilder |
applyArchiveDescriptorFactory(ArchiveDescriptorFactory factory)
Specify a particular ArchiveDescriptorFactory instance to use in scanning.
|
MetadataBuilder |
applyAttributeConverter(AttributeConverter attributeConverter)
Adds an AttributeConverter instance.
|
MetadataBuilder |
applyAttributeConverter(AttributeConverter attributeConverter,
boolean autoApply)
Adds an AttributeConverter instance, explicitly indicating whether to auto-apply.
|
MetadataBuilder |
applyAttributeConverter(AttributeConverterDefinition definition)
Adds an AttributeConverter by a AttributeConverterDefinition
|
MetadataBuilder |
applyAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass)
Adds an AttributeConverter by its Class.
|
MetadataBuilder |
applyAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass,
boolean autoApply)
Adds an AttributeConverter by its Class plus a boolean indicating whether to auto apply it.
|
MetadataBuilder |
applyAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject) |
MetadataBuilder |
applyBasicType(BasicType type)
Specify an additional or overridden basic type mapping.
|
MetadataBuilder |
applyBasicType(BasicType type,
String... keys)
Specify an additional or overridden basic type mapping supplying specific
registration keys.
|
MetadataBuilder |
applyBasicType(CompositeUserType type,
String... keys)
Register an additional or overridden composite custom type mapping.
|
MetadataBuilder |
applyBasicType(UserType type,
String... keys)
Register an additional or overridden custom type mapping.
|
MetadataBuilder |
applyCacheRegionDefinition(CacheRegionDefinition cacheRegionDefinition)
Apply a CacheRegionDefinition to be applied to an entity, collection or query while building the
Metadata object.
|
MetadataBuilder |
applyIdGenerationTypeInterpreter(IdGeneratorStrategyInterpreter interpreter) |
MetadataBuilder |
applyImplicitCatalogName(String implicitCatalogName)
Specify the implicit catalog name to apply to any unqualified database names.
|
MetadataBuilder |
applyImplicitNamingStrategy(ImplicitNamingStrategy namingStrategy)
Specify the ImplicitNamingStrategy to use in building the Metadata.
|
MetadataBuilder |
applyImplicitSchemaName(String implicitSchemaName)
Specify the implicit schema name to apply to any unqualified database names.
|
MetadataBuilder |
applyIndexView(org.jboss.jandex.IndexView jandexView)
Allows specifying a specific Jandex index to use for reading annotation information.
|
MetadataBuilder |
applyPhysicalNamingStrategy(PhysicalNamingStrategy namingStrategy)
Specify the PhysicalNamingStrategy to use in building the Metadata.
|
MetadataBuilder |
applyReflectionManager(org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager)
Deprecated.
Deprecated (with no replacement) to indicate that this will go away as
we migrate away from Hibernate Commons Annotations to Jandex for annotation handling
and XMl->annotation merging.
|
MetadataBuilder |
applyScanEnvironment(ScanEnvironment scanEnvironment)
Consider this temporary as discussed on
ScanEnvironment |
MetadataBuilder |
applyScanner(Scanner scanner)
Specify a particular Scanner instance to use.
|
MetadataBuilder |
applyScanOptions(ScanOptions scanOptions)
Specify the options to be used in performing scanning.
|
MetadataBuilder |
applySharedCacheMode(SharedCacheMode cacheMode)
Specify the second-level cache mode to be used.
|
MetadataBuilder |
applySourceProcessOrdering(MetadataSourceType... sourceTypes)
Apply a specific ordering to the processing of sources.
|
MetadataBuilder |
applySqlFunction(String functionName,
SQLFunction function) |
MetadataBuilder |
applyTempClassLoader(ClassLoader tempClassLoader)
Apply a ClassLoader for use while building the Metadata.
|
MetadataBuilder |
applyTypes(TypeContributor typeContributor)
Apply an explicit TypeContributor (implicit application via ServiceLoader will still happen too)
|
Metadata |
build()
Actually build the metamodel
|
MetadataBuilder |
enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean enabled)
Should we process or ignore explicitly defined discriminators in the case
of joined-subclasses.
|
MetadataBuilder |
enableGlobalNationalizedCharacterDataSupport(boolean enabled)
Should nationalized variants of character data be used in the database types? For example, should
NVARCHAR be used instead of VARCHAR ? NCLOB instead of CLOB ?
Its default is defined by the AvailableSettings.USE_NATIONALIZED_CHARACTER_DATA
setting if using property-based configuration. |
MetadataBuilder |
enableImplicitDiscriminatorsForJoinedSubclassSupport(boolean enabled)
Similarly to
enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean) ,
but here how should we treat joined inheritance when there is no explicitly
defined discriminator annotations? If enabled, we will handle joined
inheritance with no explicit discriminator annotations by implicitly
creating one (following the JPA implicit naming rules). |
MetadataBuilder |
enableImplicitForcingOfDiscriminatorsInSelect(boolean supported)
For entities which do not explicitly say, should we force discriminators into
SQL selects? The (historical) default is
false
Its default is defined by the AvailableSettings.FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
setting if using property-based configuration. |
MetadataBuilder |
enableNewIdentifierGeneratorSupport(boolean enable)
Should we enable support for the "new" (since 3.2) identifier generator mappings for
handling:
GenerationType.SEQUENCE
GenerationType.IDENTITY
GenerationType.TABLE
GenerationType.AUTO
Its default is defined by the AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS
setting if using property-based configuration. |
<T extends MetadataBuilder> |
unwrap(Class<T> type)
Allows unwrapping this builder as another, more specific type.
|
MetadataBuilder applyImplicitCatalogName(String implicitCatalogName)
AvailableSettings.DEFAULT_CATALOG
setting if using property-based configuration.implicitCatalogName
- The implicit catalog namethis
, for method chainingAvailableSettings.DEFAULT_CATALOG
MetadataBuilder applyImplicitSchemaName(String implicitSchemaName)
AvailableSettings.DEFAULT_SCHEMA
setting if using property-based configuration.implicitSchemaName
- The implicit schema namethis
, for method chainingAvailableSettings.DEFAULT_SCHEMA
MetadataBuilder applyImplicitNamingStrategy(ImplicitNamingStrategy namingStrategy)
AvailableSettings.IMPLICIT_NAMING_STRATEGY
setting if using property-based configuration.namingStrategy
- The ImplicitNamingStrategy to applythis
, for method chainingAvailableSettings.IMPLICIT_NAMING_STRATEGY
MetadataBuilder applyPhysicalNamingStrategy(PhysicalNamingStrategy namingStrategy)
AvailableSettings.PHYSICAL_NAMING_STRATEGY
setting if using property-based configuration.namingStrategy
- The PhysicalNamingStrategy to applythis
, for method chainingAvailableSettings.PHYSICAL_NAMING_STRATEGY
@Deprecated MetadataBuilder applyReflectionManager(org.hibernate.annotations.common.reflection.ReflectionManager reflectionManager)
reflectionManager
- The ReflectionManager to use.this
, for method chainingMetadataBuilder applySharedCacheMode(SharedCacheMode cacheMode)
cacheMode
- The cache mode.this
, for method chainingapplyAccessType(org.hibernate.cache.spi.access.AccessType)
MetadataBuilder applyAccessType(AccessType accessType)
AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY
setting if using property-based configuration.accessType
- The access-type to use as default.this
, for method chainingAvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY
,
applySharedCacheMode(javax.persistence.SharedCacheMode)
MetadataBuilder applyIndexView(org.jboss.jandex.IndexView jandexView)
jandexView
- The Jandex index to use.this
, for method chainingMetadataBuilder applyScanOptions(ScanOptions scanOptions)
scanOptions
- The scan options.this
, for method chainingAvailableSettings.SCANNER_DISCOVERY
MetadataBuilder applyScanEnvironment(ScanEnvironment scanEnvironment)
ScanEnvironment
scanEnvironment
- The environment for scanningthis
, for method chainingMetadataBuilder applyScanner(Scanner scanner)
AvailableSettings.SCANNER
setting if using property-based configuration.scanner
- The scanner to use.this
, for method chainingAvailableSettings.SCANNER
MetadataBuilder applyArchiveDescriptorFactory(ArchiveDescriptorFactory factory)
AvailableSettings.SCANNER_ARCHIVE_INTERPRETER
setting if using property-based configuration.factory
- The ArchiveDescriptorFactory to use.this
, for method chainingAvailableSettings.SCANNER_ARCHIVE_INTERPRETER
MetadataBuilder enableNewIdentifierGeneratorSupport(boolean enable)
AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS
setting if using property-based configuration.enable
- true
to enable; false
to disable;don't call for
default.this
, for method chainingAvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS
MetadataBuilder enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean enabled)
AvailableSettings.IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
setting if using property-based configuration.enabled
- Should processing (not ignoring) explicit discriminators be
enabled?this
, for method chainingAvailableSettings.IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
MetadataBuilder enableImplicitDiscriminatorsForJoinedSubclassSupport(boolean enabled)
enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean)
,
but here how should we treat joined inheritance when there is no explicitly
defined discriminator annotations? If enabled, we will handle joined
inheritance with no explicit discriminator annotations by implicitly
creating one (following the JPA implicit naming rules).
Again the premise here is JPA portability, bearing in mind that some
JPA provider need these discriminators.
Its default is defined by the AvailableSettings.IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
setting if using property-based configuration.enabled
- Should we implicitly create discriminator for joined
inheritance if one is not explicitly mentioned?this
, for method chainingAvailableSettings.IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
MetadataBuilder enableImplicitForcingOfDiscriminatorsInSelect(boolean supported)
false
Its default is defined by the AvailableSettings.FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
setting if using property-based configuration.supported
- true
indicates we will force the discriminator into the select;
false
indicates we will not.this
, for method chainingAvailableSettings.FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
MetadataBuilder enableGlobalNationalizedCharacterDataSupport(boolean enabled)
NVARCHAR
be used instead of VARCHAR
? NCLOB
instead of CLOB
?
Its default is defined by the AvailableSettings.USE_NATIONALIZED_CHARACTER_DATA
setting if using property-based configuration.enabled
- true
says to use nationalized variants; false
says to use the non-nationalized variants.this
, for method chainingAvailableSettings.USE_NATIONALIZED_CHARACTER_DATA
MetadataBuilder applyBasicType(BasicType type)
type
- The type addition or override.this
, for method chainingMetadataBuilder applyBasicType(BasicType type, String... keys)
type
- The type addition or override.keys
- The keys under which to register the basic type.this
, for method chainingMetadataBuilder applyBasicType(UserType type, String... keys)
type
- The custom typekeys
- The keys under which to register the custom type.this
, for method chainingMetadataBuilder applyBasicType(CompositeUserType type, String... keys)
type
- The composite custom typekeys
- The keys under which to register the composite custom type.this
, for method chainingMetadataBuilder applyTypes(TypeContributor typeContributor)
typeContributor
- The contributor to applythis
, for method chainingMetadataBuilder applyCacheRegionDefinition(CacheRegionDefinition cacheRegionDefinition)
cacheRegionDefinition
- The cache region definition to applythis
, for method chainingMetadataBuilder applyTempClassLoader(ClassLoader tempClassLoader)
PersistenceUnitInfo.getNewTempClassLoader()
. This ClassLoader
is thrown away by the container afterwards. The idea being that the Class can still be enhanced
in the application ClassLoader. In other environments, pass a ClassLoader that performs the
same function if desired.tempClassLoader
- ClassLoader for use during building the Metadatathis
, for method chainingMetadataBuilder applySourceProcessOrdering(MetadataSourceType... sourceTypes)
AvailableSettings.ARTIFACT_PROCESSING_ORDER
setting if using property-based configuration.sourceTypes
- The types, in the order they should be processedthis
for method chainingAvailableSettings.ARTIFACT_PROCESSING_ORDER
MetadataBuilder applySqlFunction(String functionName, SQLFunction function)
MetadataBuilder applyAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)
MetadataBuilder applyAttributeConverter(AttributeConverterDefinition definition)
definition
- The definitionthis
for method chainingMetadataBuilder applyAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass)
attributeConverterClass
- The AttributeConverter class.this
for method chainingAttributeConverterDefinition.from(Class)
MetadataBuilder applyAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass, boolean autoApply)
attributeConverterClass
- The AttributeConverter class.autoApply
- Should the AttributeConverter be auto applied to property types as specified
by its "entity attribute" parameterized type?this
for method chainingAttributeConverterDefinition.from(Class, boolean)
MetadataBuilder applyAttributeConverter(AttributeConverter attributeConverter)
attributeConverter
- The AttributeConverter instance.this
for method chainingAttributeConverterDefinition.from(AttributeConverter)
MetadataBuilder applyAttributeConverter(AttributeConverter attributeConverter, boolean autoApply)
attributeConverter
- The AttributeConverter instance.autoApply
- Should the AttributeConverter be auto applied to property types as specified
by its "entity attribute" parameterized type?this
for method chainingAttributeConverterDefinition.from(AttributeConverter, boolean)
MetadataBuilder applyIdGenerationTypeInterpreter(IdGeneratorStrategyInterpreter interpreter)
<T extends MetadataBuilder> T unwrap(Class<T> type)
T
- type
- Metadata build()
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.