public interface IdentifierHelper
Identifier
instances.Modifier and Type | Method and Description |
---|---|
Identifier |
applyGlobalQuoting(String text)
Intended only for use in handling quoting requirements for
column-definition
as defined by Column.columnDefinition() ,
JoinColumn.columnDefinition() , etc. |
boolean |
isReservedWord(String word)
Check whether the given word represents a reserved word.
|
Identifier |
normalizeQuoting(Identifier identifier)
Essentially quotes the identifier if it needs to be.
|
Identifier |
toIdentifier(String text)
Generate an Identifier instance from its simple name as obtained from mapping
information.
|
Identifier |
toIdentifier(String text,
boolean quoted)
Generate an Identifier instance from its simple name as obtained from mapping
information.
|
String |
toMetaDataCatalogName(Identifier catalogIdentifier)
Render the Identifier representation of a catalog name into the String form needed
in
DatabaseMetaData calls. |
String |
toMetaDataObjectName(Identifier identifier)
Render the Identifier representation of an object name (table, sequence, etc) into the
String form needed in
DatabaseMetaData calls. |
String |
toMetaDataSchemaName(Identifier schemaIdentifier)
Render the Identifier representation of a schema name into the String form needed
in
DatabaseMetaData calls. |
Identifier normalizeQuoting(Identifier identifier)
identifier
- The identifier for which to normalize quoting.Identifier toIdentifier(String text)
text
- The text form of a name as obtained from mapping information.Identifier toIdentifier(String text, boolean quoted)
text
- The text form of a name as obtained from mapping information.quoted
- Is the identifier to be quoted explicitly.Identifier applyGlobalQuoting(String text)
column-definition
as defined by Column.columnDefinition()
,
JoinColumn.columnDefinition()
, etc. This method should not
be called in any other scenario.
This method is needed to account for that fact that the JPA spec says that column-definition
should be quoted of global-identifier-quoting is requested. Again, this is needed for spec
compliance. TBH, I can not think of a argument why column-definitions should ever be *globally* quoted,
but the spec is the spec. In fact the default implementation allows applications to opt-out of
global-identifier-quoting affecting column-definitions.text
- The text to be (possibly) quotedAvailableSettings.GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONS
boolean isReservedWord(String word)
word
- The word to checktrue
if the given word represents a reserved word; false
otherwise.String toMetaDataCatalogName(Identifier catalogIdentifier)
DatabaseMetaData
calls.catalogIdentifier
- The Identifier representation of a catalog nameString toMetaDataSchemaName(Identifier schemaIdentifier)
DatabaseMetaData
calls.schemaIdentifier
- The Identifier representation of a schema nameString toMetaDataObjectName(Identifier identifier)
DatabaseMetaData
calls.identifier
- The Identifier representation of an object nameCopyright © 2021 JBoss by Red Hat. All rights reserved.