Interface IdentifierHelper
- All Known Implementing Classes:
DelegatingIdentifierHelper
Handles configured database identifiers at runtime.
A Dialect provider uses this helper after Hibernate has applied identifier
casing, keyword, quoting, and namespace configuration. Configure the
boot-scoped builder received by
IdentifierSupport.buildIdentifierHelper(IdentifierHelperBuildRequest)
before invoking the inherited build operation. When builder configuration
cannot express a database rule, decorate the resulting helper with
DelegatingIdentifierHelper. Do not
implement this interface directly as a provider contract.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionapplyGlobalQuoting(String text) Apply global quoting to acolumn-definitionfragment as required by Jakarta Persistence.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.
-
Method Details
-
normalizeQuoting
Quote the identifier when required by the configured global, reserved-word, or database-specific policy.- Parameters:
identifier- the identifier to normalize- Returns:
- the quoting-normalized identifier
-
toIdentifier
Create an identifier from mapping text, applying configured implicit quoting when necessary.- Parameters:
text- the name obtained from mapping information- Returns:
- the identifier form of the name
-
toIdentifier
Create an identifier from mapping text, honoring explicit quoting and then applying configured implicit quoting when necessary.- Parameters:
text- the name obtained from mapping informationquoted- whether the identifier is explicitly quoted- Returns:
- the identifier form of the name
-
toIdentifier
Create an identifier from mapping text while retaining whether the mapping supplied the name explicitly.- 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
Apply 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.- Parameters:
text- the text to quote when global policy requires it- Returns:
- the identifier form
-
isReservedWord
Determine whether the configured environment treats a word as reserved.- Parameters:
word- the word to check- Returns:
truewhen the word is reserved
-
toMetaDataCatalogName
Render a catalog identifier forjava.sql.DatabaseMetaDatacalls.- Parameters:
catalogIdentifier- the catalog identifier, ornullfor the configured current-catalog behavior- Returns:
- the JDBC metadata catalog name
-
toMetaDataSchemaName
Render a schema identifier forjava.sql.DatabaseMetaDatacalls.- Parameters:
schemaIdentifier- the schema identifier, ornullfor the configured current-schema behavior- Returns:
- the JDBC metadata schema name
-
toMetaDataObjectName
Render a required database-object identifier forjava.sql.DatabaseMetaDatacalls.- Parameters:
identifier- the required object identifier- Returns:
- the JDBC metadata object name
-