Class DelegatingIdentifierHelper
- All Implemented Interfaces:
IdentifierHelper
Supported base for selectively decorating a configured identifier helper.
First configure the builder received by
IdentifierSupport.buildIdentifierHelper(IdentifierHelperBuildRequest) and
invoke the inherited build operation. Extend this class only when the
resulting helper requires a database-specific rule which builder
configuration cannot express. Override every related entry point which must
apply that rule; each inherited operation forwards independently.
Call super to preserve ordinary forwarding or use delegate() when an
override must invoke a different delegate operation. Retaining the delegate
as part of the returned runtime helper is supported. Do not retain the
boot-scoped build request, builder, or metadata view.
- Since:
- 8.0
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDelegatingIdentifierHelper(IdentifierHelper delegate) Create a decorator around the non-null configured helper. -
Method Summary
Modifier and TypeMethodDescriptionapplyGlobalQuoting(String text) Apply global quoting to acolumn-definitionfragment as required by Jakarta Persistence.protected final IdentifierHelperdelegate()Access the stable configured helper owned by this decorator.booleanisReservedWord(String word) Determine whether the configured environment treats a word as reserved.normalizeQuoting(Identifier identifier) Quote the identifier when required by the configured global, reserved-word, or database-specific policy.toIdentifier(String text) Create an identifier from mapping text, applying configured implicit quoting when necessary.toIdentifier(String text, boolean quoted) Create an identifier from mapping text, honoring explicit quoting and then applying configured implicit quoting when necessary.toIdentifier(String text, boolean quoted, boolean isExplicit) Create an identifier from mapping text while retaining whether the mapping supplied the name explicitly.toMetaDataCatalogName(Identifier catalogIdentifier) Render a catalog identifier forjava.sql.DatabaseMetaDatacalls.toMetaDataObjectName(Identifier identifier) Render a required database-object identifier forjava.sql.DatabaseMetaDatacalls.toMetaDataSchemaName(Identifier schemaIdentifier) Render a schema identifier forjava.sql.DatabaseMetaDatacalls.
-
Constructor Details
-
DelegatingIdentifierHelper
Create a decorator around the non-null configured helper.- Since:
- 8.0
-
-
Method Details
-
delegate
Access the stable configured helper owned by this decorator.- Since:
- 8.0
-
normalizeQuoting
Description copied from interface:IdentifierHelperQuote the identifier when required by the configured global, reserved-word, or database-specific policy.- Specified by:
normalizeQuotingin interfaceIdentifierHelper- Parameters:
identifier- the identifier to normalize- Returns:
- the quoting-normalized identifier
-
toIdentifier
Description copied from interface:IdentifierHelperCreate an identifier from mapping text, applying configured implicit quoting when necessary.- Specified by:
toIdentifierin interfaceIdentifierHelper- Parameters:
text- the name obtained from mapping information- Returns:
- the identifier form of the name
-
toIdentifier
Description copied from interface:IdentifierHelperCreate an identifier from mapping text, honoring explicit quoting and then applying configured implicit quoting when necessary.- Specified by:
toIdentifierin interfaceIdentifierHelper- Parameters:
text- the name obtained from mapping informationquoted- whether the identifier is explicitly quoted- Returns:
- the identifier form of the name
-
toIdentifier
@SPI({USE,IMPLEMENT}) public Identifier toIdentifier(String text, boolean quoted, boolean isExplicit) Description copied from interface:IdentifierHelperCreate an identifier from mapping text while retaining whether the mapping supplied the name explicitly.- Specified by:
toIdentifierin interfaceIdentifierHelper- Parameters:
text- the name obtained from mapping informationquoted- whether the identifier is explicitly quotedisExplicit- whether the mapping supplied the name explicitly- Returns:
- the identifier form of the name
-
applyGlobalQuoting
Description copied from interface:IdentifierHelperApply global quoting to a
column-definitionfragment as required by Jakarta Persistence. Do not use this operation for ordinary identifiers.Applications may exclude column definitions from global quoting through
MappingSettings.GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONS.- Specified by:
applyGlobalQuotingin interfaceIdentifierHelper- Parameters:
text- the text to quote when global policy requires it- Returns:
- the identifier form
-
isReservedWord
Description copied from interface:IdentifierHelperDetermine whether the configured environment treats a word as reserved.- Specified by:
isReservedWordin interfaceIdentifierHelper- Parameters:
word- the word to check- Returns:
truewhen the word is reserved
-
toMetaDataCatalogName
Description copied from interface:IdentifierHelperRender a catalog identifier forjava.sql.DatabaseMetaDatacalls.- Specified by:
toMetaDataCatalogNamein interfaceIdentifierHelper- Parameters:
catalogIdentifier- the catalog identifier, ornullfor the configured current-catalog behavior- Returns:
- the JDBC metadata catalog name
-
toMetaDataSchemaName
Description copied from interface:IdentifierHelperRender a schema identifier forjava.sql.DatabaseMetaDatacalls.- Specified by:
toMetaDataSchemaNamein interfaceIdentifierHelper- Parameters:
schemaIdentifier- the schema identifier, ornullfor the configured current-schema behavior- Returns:
- the JDBC metadata schema name
-
toMetaDataObjectName
Description copied from interface:IdentifierHelperRender a required database-object identifier forjava.sql.DatabaseMetaDatacalls.- Specified by:
toMetaDataObjectNamein interfaceIdentifierHelper- Parameters:
identifier- the required object identifier- Returns:
- the JDBC metadata object name
-