T - The type of a specific sub-class; Allows sub-classes to narrow down the return-type of the contract methods
to a specialization of MetadataBuilderImplementorpublic abstract class AbstractDelegatingMetadataBuilderImplementor<T extends MetadataBuilderImplementor> extends Object implements MetadataBuilderImplementor
Convenience base class for custom implementors of MetadataBuilderImplementor using delegation.
| Constructor and Description |
|---|
AbstractDelegatingMetadataBuilderImplementor(MetadataBuilderImplementor delegate) |
| 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 |
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
|
protected MetadataBuilderImplementor |
delegate() |
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?
<p/>
Its default is defined by the AvailableSettings.USE_NATIONALIZED_CHARACTER_DATA
setting if using property-based configuration. |
MetadataBuilder |
enableImplicitDiscriminatorsForJoinedSubclassSupport(boolean enabled)
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
<p/>
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:<ul>
<li>
GenerationType.SEQUENCE</li>
<li>GenerationType.IDENTITY</li>
<li>GenerationType.TABLE</li>
<li>GenerationType.AUTO</li>
</ul>
<p/>
Its default is defined by the AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS
setting if using property-based configuration. |
MetadataBuilderImplementor |
getDelegate()
Deprecated.
use
delegate() instead |
MetadataBuildingOptions |
getMetadataBuildingOptions()
Get the options being collected on this MetadataBuilder that will ultimately be used in
building the Metadata.
|
protected abstract T |
getThis()
Returns a specific implementation.
|
<M extends MetadataBuilder> |
unwrap(Class<M> type)
Allows unwrapping this builder as another, more specific type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBootstrapContextpublic AbstractDelegatingMetadataBuilderImplementor(MetadataBuilderImplementor delegate)
@Deprecated public MetadataBuilderImplementor getDelegate()
delegate() insteadKept for compatibility reason but should be removed as soon as possible.
protected MetadataBuilderImplementor delegate()
protected abstract T getThis()
Returns a specific implementation. See the <a href="http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html#FAQ206">What is the "getThis trick?"</a>.
public MetadataBuilder applyImplicitSchemaName(String implicitSchemaName)
MetadataBuilderSpecify the implicit schema name to apply to any unqualified database names.
<p/>
Its default is defined by the AvailableSettings.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)
MetadataBuilderSpecify the implicit catalog name to apply to any unqualified database names.
<p/>
Its default is defined by the AvailableSettings.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)
MetadataBuilderSpecify the ImplicitNamingStrategy to use in building the Metadata.
<p/>
Its default is defined by the AvailableSettings.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)
MetadataBuilderSpecify the PhysicalNamingStrategy to use in building the Metadata.
<p/>
Its default is defined by the AvailableSettings.PHYSICAL_NAMING_STRATEGY
setting if using property-based configuration.
applyPhysicalNamingStrategy in interface MetadataBuildernamingStrategy - The PhysicalNamingStrategy to applythis, for method chainingAvailableSettings.PHYSICAL_NAMING_STRATEGYpublic MetadataBuilder applySharedCacheMode(SharedCacheMode cacheMode)
MetadataBuilderSpecify the second-level cache mode to be used. This is the cache mode in terms of whether or not to cache. <p/> Its default is defined by the setting if using property-based configuration.
applySharedCacheMode in interface MetadataBuildercacheMode - The cache mode.this, for method chainingMetadataBuilder.applyAccessType(org.hibernate.cache.spi.access.AccessType)public MetadataBuilder applyAccessType(AccessType accessType)
MetadataBuilderSpecify 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.
<p/>
Its default is defined by the AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY
setting if using property-based configuration.
applyAccessType in interface MetadataBuilderaccessType - 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)
MetadataBuilderAllows specifying a specific Jandex index to use for reading annotation information. <p/> It is <i>important</i> to understand that if a Jandex index is passed in, it is expected that this Jandex index already contains all entries for all classes. No additional indexing will be done in this case. <p/> NOTE : Here for future expansion. At the moment the passed Jandex index is not used.
applyIndexView in interface MetadataBuilderjandexView - The Jandex index to use.this, for method chainingpublic MetadataBuilder applyScanOptions(ScanOptions scanOptions)
MetadataBuilderSpecify the options to be used in performing scanning.
applyScanOptions in interface MetadataBuilderscanOptions - The scan options.this, for method chainingAvailableSettings.SCANNER_DISCOVERYpublic MetadataBuilder applyScanEnvironment(ScanEnvironment scanEnvironment)
MetadataBuilderConsider this temporary as discussed on ScanEnvironment
applyScanEnvironment in interface MetadataBuilderscanEnvironment - The environment for scanningthis, for method chainingpublic MetadataBuilder applyScanner(Scanner scanner)
MetadataBuilderSpecify a particular Scanner instance to use.
<p/>
Its default is defined by the AvailableSettings.SCANNER
setting if using property-based configuration.
applyScanner in interface MetadataBuilderscanner - The scanner to use.this, for method chainingAvailableSettings.SCANNERpublic MetadataBuilder applyArchiveDescriptorFactory(ArchiveDescriptorFactory factory)
MetadataBuilderSpecify a particular ArchiveDescriptorFactory instance to use in scanning.
<p/>
Its default is defined by the AvailableSettings.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 enableNewIdentifierGeneratorSupport(boolean enable)
MetadataBuilderShould we enable support for the "new" (since 3.2) identifier generator mappings for
handling:<ul>
<li>GenerationType.SEQUENCE</li>
<li>GenerationType.IDENTITY</li>
<li>GenerationType.TABLE</li>
<li>GenerationType.AUTO</li>
</ul>
<p/>
Its default is defined by the AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS
setting if using property-based configuration.
enableNewIdentifierGeneratorSupport in interface MetadataBuilderenable - true to enable; false to disable;don’t call for
default.this, for method chainingAvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGSpublic MetadataBuilder enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean enabled)
MetadataBuilderShould we process or ignore explicitly defined discriminators in the case
of joined-subclasses. The legacy behavior of Hibernate was to ignore the
discriminator annotations because Hibernate (unlike some providers) does
not need discriminators to determine the concrete type when it comes to
joined inheritance. However, for portability reasons we do now allow using
explicit discriminators along with joined inheritance. It is configurable
though to support legacy apps.
<p/>
Its default is defined by the AvailableSettings.IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
setting if using property-based configuration.
enableExplicitDiscriminatorsForJoinedSubclassSupport in interface MetadataBuilderenabled - Should processing (not ignoring) explicit discriminators be
enabled?this, for method chainingAvailableSettings.IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASSpublic MetadataBuilder enableImplicitDiscriminatorsForJoinedSubclassSupport(boolean enabled)
MetadataBuilderSimilarly 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).
<p/>
Again the premise here is JPA portability, bearing in mind that some
JPA provider need these discriminators.
<p/>
Its default is defined by the AvailableSettings.IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
setting if using property-based configuration.
enableImplicitDiscriminatorsForJoinedSubclassSupport in interface MetadataBuilderenabled - 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)
MetadataBuilderFor entities which do not explicitly say, should we force discriminators into
SQL selects? The (historical) default is false
<p/>
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)
MetadataBuilderShould nationalized variants of character data be used in the database types? For example, should
NVARCHAR be used instead of VARCHAR? NCLOB instead of CLOB?
<p/>
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)
MetadataBuilderSpecify an additional or overridden basic type mapping.
applyBasicType in interface MetadataBuildertype - The type addition or override.this, for method chainingpublic MetadataBuilder applyBasicType(BasicType type, String... keys)
MetadataBuilderSpecify an additional or overridden basic type mapping supplying specific registration keys.
applyBasicType 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)
MetadataBuilderRegister an additional or overridden custom type mapping.
applyBasicType 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)
MetadataBuilderRegister an additional or overridden composite custom type mapping.
applyBasicType 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)
MetadataBuilderApply an explicit TypeContributor (implicit application via ServiceLoader will still happen too)
applyTypes in interface MetadataBuildertypeContributor - The contributor to applythis, for method chainingpublic MetadataBuilder applyCacheRegionDefinition(CacheRegionDefinition cacheRegionDefinition)
MetadataBuilderApply a CacheRegionDefinition to be applied to an entity, collection or query while building the Metadata object.
applyCacheRegionDefinition in interface MetadataBuildercacheRegionDefinition - The cache region definition to applythis, for method chainingpublic MetadataBuilder applyTempClassLoader(ClassLoader tempClassLoader)
MetadataBuilderApply a ClassLoader for use while building the Metadata.
<p/>
Ideally we should avoid accessing ClassLoaders when perform 1st phase of bootstrap. This
is a ClassLoader that can be used in cases when we have to. IN EE managed environments, this
is the ClassLoader mandated by
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.
applyTempClassLoader in interface MetadataBuildertempClassLoader - ClassLoader for use during building the Metadatathis, for method chainingpublic MetadataBuilder applySourceProcessOrdering(MetadataSourceType... sourceTypes)
MetadataBuilderApply a specific ordering to the processing of sources. Note that unlike most
of the methods on this contract that deal with multiple values internally, this
one replaces any already set (its more a setter) instead of adding to.
<p/>
Its default is defined by the AvailableSettings.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 applySqlFunction(String functionName, SQLFunction function)
applySqlFunction in interface MetadataBuilderpublic MetadataBuilder applyAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)
applyAuxiliaryDatabaseObject in interface MetadataBuilderpublic MetadataBuilder applyAttributeConverter(AttributeConverterDefinition definition)
MetadataBuilderAdds an AttributeConverter by a AttributeConverterDefinition
applyAttributeConverter in interface MetadataBuilderdefinition - The definitionthis for method chainingpublic MetadataBuilder applyAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass)
MetadataBuilderAdds an AttributeConverter by its Class.
applyAttributeConverter in interface MetadataBuilderattributeConverterClass - The AttributeConverter class.this for method chainingpublic MetadataBuilder applyAttributeConverter(Class<? extends AttributeConverter> attributeConverterClass, boolean autoApply)
MetadataBuilderAdds an AttributeConverter by its Class plus a boolean indicating whether to auto apply it.
applyAttributeConverter 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)
MetadataBuilderAdds an AttributeConverter instance.
applyAttributeConverter in interface MetadataBuilderattributeConverter - The AttributeConverter instance.this for method chainingAttributeConverterDefinition.from(AttributeConverter)public MetadataBuilder applyAttributeConverter(AttributeConverter attributeConverter, boolean autoApply)
MetadataBuilderAdds an AttributeConverter instance, explicitly indicating whether to auto-apply.
applyAttributeConverter 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 applyIdGenerationTypeInterpreter(IdGeneratorStrategyInterpreter interpreter)
applyIdGenerationTypeInterpreter in interface MetadataBuilderpublic <M extends MetadataBuilder> M unwrap(Class<M> type)
MetadataBuilderAllows unwrapping this builder as another, more specific type.
unwrap in interface MetadataBuilderpublic MetadataBuildingOptions getMetadataBuildingOptions()
MetadataBuilderImplementorGet the options being collected on this MetadataBuilder that will ultimately be used in building the Metadata.
getMetadataBuildingOptions in interface MetadataBuilderImplementorpublic Metadata build()
MetadataBuilderActually build the metamodel
build in interface MetadataBuilderCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.