public class MetadataBuilderImpl extends Object implements MetadataBuilderImplementor, TypeContributions
| Modifier and Type | Class and Description |
|---|---|
static class |
MetadataBuilderImpl.MappingDefaultsImpl |
static class |
MetadataBuilderImpl.MetadataBuildingOptionsImpl |
| Constructor and Description |
|---|
MetadataBuilderImpl(MetadataSources sources) |
MetadataBuilderImpl(MetadataSources sources,
StandardServiceRegistry serviceRegistry) |
| Modifier and Type | Method and Description |
|---|---|
MetadataBuilder |
allowSpecjSyntax() |
MetadataBuilder |
applyAccessType(AccessType implicitCacheAccessType)
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(ReflectionManager reflectionManager)
Defines the Hibernate Commons Annotations ReflectionManager to use
|
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 sharedCacheMode)
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)
|
MetadataImplementor |
build()
Actually build the metamodel
|
void |
contributeType(BasicType type) |
void |
contributeType(BasicType type,
String... keys) |
void |
contributeType(CompositeUserType type,
String[] keys) |
void |
contributeType(UserType type,
String[] keys) |
MetadataBuilder |
enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean supported)
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 supported)
Similarly to
MetadataBuilder.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 enabled)
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. |
MetadataBuildingOptions |
getMetadataBuildingOptions()
Get the options being collected on this MetadataBuilder that will ultimately be used in
building the Metadata.
|
<T extends MetadataBuilder> |
unwrap(Class<T> type)
Allows unwrapping this builder as another, more specific type.
|
public MetadataBuilderImpl(MetadataSources sources)
public MetadataBuilderImpl(MetadataSources sources, StandardServiceRegistry serviceRegistry)
public MetadataBuilder applyImplicitSchemaName(String implicitSchemaName)
MetadataBuilderAvailableSettings.DEFAULT_SCHEMA
setting if using property-based configuration.applyImplicitSchemaName in interface MetadataBuilderimplicitSchemaName - The implicit schema namethis, for method chainingAvailableSettings.DEFAULT_SCHEMApublic MetadataBuilder applyImplicitCatalogName(String implicitCatalogName)
MetadataBuilderAvailableSettings.DEFAULT_CATALOG
setting if using property-based configuration.applyImplicitCatalogName in interface MetadataBuilderimplicitCatalogName - The implicit catalog namethis, for method chainingAvailableSettings.DEFAULT_CATALOGpublic MetadataBuilder applyImplicitNamingStrategy(ImplicitNamingStrategy namingStrategy)
MetadataBuilderAvailableSettings.IMPLICIT_NAMING_STRATEGY
setting if using property-based configuration.applyImplicitNamingStrategy in interface MetadataBuildernamingStrategy - The ImplicitNamingStrategy to applythis, for method chainingAvailableSettings.IMPLICIT_NAMING_STRATEGYpublic MetadataBuilder applyPhysicalNamingStrategy(PhysicalNamingStrategy namingStrategy)
MetadataBuilderAvailableSettings.PHYSICAL_NAMING_STRATEGY
setting if using property-based configuration.applyPhysicalNamingStrategy in interface MetadataBuildernamingStrategy - The PhysicalNamingStrategy to applythis, for method chainingAvailableSettings.PHYSICAL_NAMING_STRATEGYpublic MetadataBuilder applyReflectionManager(ReflectionManager reflectionManager)
MetadataBuilderapplyReflectionManager in interface MetadataBuilderreflectionManager - The ReflectionManager to use.this, for method chainingpublic MetadataBuilder applySharedCacheMode(SharedCacheMode sharedCacheMode)
MetadataBuilderapplySharedCacheMode in interface MetadataBuildersharedCacheMode - The cache mode.this, for method chainingMetadataBuilder.applyAccessType(org.hibernate.cache.spi.access.AccessType)public MetadataBuilder applyAccessType(AccessType implicitCacheAccessType)
MetadataBuilderAvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY
setting if using property-based configuration.applyAccessType in interface MetadataBuilderimplicitCacheAccessType - The access-type to use as default.this, for method chainingAvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY,
MetadataBuilder.applySharedCacheMode(javax.persistence.SharedCacheMode)public MetadataBuilder applyIndexView(org.jboss.jandex.IndexView jandexView)
MetadataBuilderapplyIndexView in interface MetadataBuilderjandexView - The Jandex index to use.this, for method chainingpublic MetadataBuilder applyScanOptions(ScanOptions scanOptions)
MetadataBuilderapplyScanOptions in interface MetadataBuilderscanOptions - The scan options.this, for method chainingAvailableSettings.SCANNER_DISCOVERYpublic MetadataBuilder applyScanEnvironment(ScanEnvironment scanEnvironment)
MetadataBuilderScanEnvironmentapplyScanEnvironment in interface MetadataBuilderscanEnvironment - The environment for scanningthis, for method chainingpublic MetadataBuilder applyScanner(Scanner scanner)
MetadataBuilderAvailableSettings.SCANNER
setting if using property-based configuration.applyScanner in interface MetadataBuilderscanner - The scanner to use.this, for method chainingAvailableSettings.SCANNERpublic MetadataBuilder applyArchiveDescriptorFactory(ArchiveDescriptorFactory factory)
MetadataBuilderAvailableSettings.SCANNER_ARCHIVE_INTERPRETER
setting if using property-based configuration.applyArchiveDescriptorFactory in interface MetadataBuilderfactory - The ArchiveDescriptorFactory to use.this, for method chainingAvailableSettings.SCANNER_ARCHIVE_INTERPRETERpublic MetadataBuilder enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean supported)
MetadataBuilderAvailableSettings.IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
setting if using property-based configuration.enableExplicitDiscriminatorsForJoinedSubclassSupport in interface MetadataBuildersupported - Should processing (not ignoring) explicit discriminators be
enabled?this, for method chainingAvailableSettings.IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASSpublic MetadataBuilder enableImplicitDiscriminatorsForJoinedSubclassSupport(boolean supported)
MetadataBuilderMetadataBuilder.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.enableImplicitDiscriminatorsForJoinedSubclassSupport in interface MetadataBuildersupported - Should we implicitly create discriminator for joined
inheritance if one is not explicitly mentioned?this, for method chainingAvailableSettings.IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASSpublic MetadataBuilder enableImplicitForcingOfDiscriminatorsInSelect(boolean supported)
MetadataBuilderfalse
Its default is defined by the AvailableSettings.FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
setting if using property-based configuration.enableImplicitForcingOfDiscriminatorsInSelect in interface MetadataBuildersupported - true indicates we will force the discriminator into the select;
false indicates we will not.this, for method chainingAvailableSettings.FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULTpublic MetadataBuilder enableGlobalNationalizedCharacterDataSupport(boolean enabled)
MetadataBuilderNVARCHAR 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.enableGlobalNationalizedCharacterDataSupport in interface MetadataBuilderenabled - true says to use nationalized variants; false
says to use the non-nationalized variants.this, for method chainingAvailableSettings.USE_NATIONALIZED_CHARACTER_DATApublic MetadataBuilder applyBasicType(BasicType type)
MetadataBuilderapplyBasicType in interface MetadataBuildertype - The type addition or override.this, for method chainingpublic MetadataBuilder applyBasicType(BasicType type, String... keys)
MetadataBuilderapplyBasicType in interface MetadataBuildertype - The type addition or override.keys - The keys under which to register the basic type.this, for method chainingpublic MetadataBuilder applyBasicType(UserType type, String... keys)
MetadataBuilderapplyBasicType in interface MetadataBuildertype - The custom typekeys - The keys under which to register the custom type.this, for method chainingpublic MetadataBuilder applyBasicType(CompositeUserType type, String... keys)
MetadataBuilderapplyBasicType in interface MetadataBuildertype - The composite custom typekeys - The keys under which to register the composite custom type.this, for method chainingpublic MetadataBuilder applyTypes(TypeContributor typeContributor)
MetadataBuilderapplyTypes in interface MetadataBuildertypeContributor - The contributor to applythis, for method chainingpublic void contributeType(BasicType type)
contributeType in interface TypeContributionspublic void contributeType(BasicType type, String... keys)
contributeType in interface TypeContributionspublic void contributeType(UserType type, String[] keys)
contributeType in interface TypeContributionspublic void contributeType(CompositeUserType type, String[] keys)
contributeType in interface TypeContributionspublic MetadataBuilder applyCacheRegionDefinition(CacheRegionDefinition cacheRegionDefinition)
MetadataBuilderapplyCacheRegionDefinition in interface MetadataBuildercacheRegionDefinition - The cache region definition to applythis, for method chainingpublic MetadataBuilder applyTempClassLoader(ClassLoader tempClassLoader)
MetadataBuilderPersistenceUnitInfo.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.applyTempClassLoader in interface MetadataBuildertempClassLoader - ClassLoader for use during building the Metadatathis, for method chainingpublic MetadataBuilder applySourceProcessOrdering(MetadataSourceType... sourceTypes)
MetadataBuilderAvailableSettings.ARTIFACT_PROCESSING_ORDER
setting if using property-based configuration.applySourceProcessOrdering in interface MetadataBuildersourceTypes - The types, in the order they should be processedthis for method chainingAvailableSettings.ARTIFACT_PROCESSING_ORDERpublic MetadataBuilder allowSpecjSyntax()
public MetadataBuilder applySqlFunction(String functionName, SQLFunction function)
applySqlFunction in interface MetadataBuilderpublic MetadataBuilder applyAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)
applyAuxiliaryDatabaseObject in interface MetadataBuilderpublic MetadataBuilder applyAttributeConverter(AttributeConverterDefinition definition)
MetadataBuilderapplyAttributeConverter in interface MetadataBuilderdefinition - The definitionthis for method chainingpublic MetadataBuilder applyAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass)
MetadataBuilderapplyAttributeConverter in interface MetadataBuilderattributeConverterClass - The AttributeConverter class.this for method chainingAttributeConverterDefinition.from(Class)public MetadataBuilder applyAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass, boolean autoApply)
MetadataBuilderapplyAttributeConverter in interface MetadataBuilderattributeConverterClass - 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)public MetadataBuilder applyAttributeConverter(AttributeConverter attributeConverter)
MetadataBuilderapplyAttributeConverter in interface MetadataBuilderattributeConverter - The AttributeConverter instance.this for method chainingAttributeConverterDefinition.from(AttributeConverter)public MetadataBuilder applyAttributeConverter(AttributeConverter attributeConverter, boolean autoApply)
MetadataBuilderapplyAttributeConverter in interface MetadataBuilderattributeConverter - 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)public MetadataBuilder enableNewIdentifierGeneratorSupport(boolean enabled)
MetadataBuilderAvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS
setting if using property-based configuration.enableNewIdentifierGeneratorSupport in interface MetadataBuilderenabled - true to enable; false to disable;don't call for
default.this, for method chainingAvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGSpublic MetadataBuilder applyIdGenerationTypeInterpreter(IdGeneratorStrategyInterpreter interpreter)
applyIdGenerationTypeInterpreter in interface MetadataBuilderpublic <T extends MetadataBuilder> T unwrap(Class<T> type)
MetadataBuilderunwrap in interface MetadataBuilderpublic MetadataImplementor build()
MetadataBuilderbuild in interface MetadataBuilderpublic MetadataBuildingOptions getMetadataBuildingOptions()
MetadataBuilderImplementorgetMetadataBuildingOptions in interface MetadataBuilderImplementorCopyright © 2017 JBoss by Red Hat. All rights reserved.