public class NormalizingIdentifierHelperImpl extends java.lang.Object implements IdentifierHelper
| Constructor and Description |
|---|
NormalizingIdentifierHelperImpl(JdbcEnvironment jdbcEnvironment,
NameQualifierSupport nameQualifierSupport,
boolean globallyQuoteIdentifiers,
boolean globallyQuoteIdentifiersSkipColumnDefinitions,
boolean autoQuoteKeywords,
java.util.Set<java.lang.String> reservedWords,
IdentifierCaseStrategy unquotedCaseStrategy,
IdentifierCaseStrategy quotedCaseStrategy) |
| Modifier and Type | Method and Description |
|---|---|
Identifier |
applyGlobalQuoting(java.lang.String text)
Intended only for use in handling quoting requirements for
column-definition
as defined by Column.columnDefinition(),
JoinColumn.columnDefinition(), etc. |
boolean |
isReservedWord(java.lang.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(java.lang.String text)
Generate an Identifier instance from its simple name as obtained from mapping
information.
|
Identifier |
toIdentifier(java.lang.String text,
boolean quoted)
Generate an Identifier instance from its simple name as obtained from mapping
information.
|
java.lang.String |
toMetaDataCatalogName(Identifier identifier)
Render the Identifier representation of a catalog name into the String form needed
in
DatabaseMetaData calls. |
java.lang.String |
toMetaDataObjectName(Identifier identifier)
Render the Identifier representation of an object name (table, sequence, etc) into the
String form needed in
DatabaseMetaData calls. |
java.lang.String |
toMetaDataSchemaName(Identifier identifier)
Render the Identifier representation of a schema name into the String form needed
in
DatabaseMetaData calls. |
public NormalizingIdentifierHelperImpl(JdbcEnvironment jdbcEnvironment, NameQualifierSupport nameQualifierSupport, boolean globallyQuoteIdentifiers, boolean globallyQuoteIdentifiersSkipColumnDefinitions, boolean autoQuoteKeywords, java.util.Set<java.lang.String> reservedWords, IdentifierCaseStrategy unquotedCaseStrategy, IdentifierCaseStrategy quotedCaseStrategy)
public Identifier normalizeQuoting(Identifier identifier)
IdentifierHelpernormalizeQuoting in interface IdentifierHelperidentifier - The identifier for which to normalize quoting.public Identifier toIdentifier(java.lang.String text)
IdentifierHelpertoIdentifier in interface IdentifierHelpertext - The text form of a name as obtained from mapping information.public Identifier toIdentifier(java.lang.String text, boolean quoted)
IdentifierHelpertoIdentifier in interface IdentifierHelpertext - The text form of a name as obtained from mapping information.quoted - Is the identifier to be quoted explicitly.public Identifier applyGlobalQuoting(java.lang.String text)
IdentifierHelpercolumn-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.applyGlobalQuoting in interface IdentifierHelpertext - The text to be (possibly) quotedAvailableSettings.GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONSpublic boolean isReservedWord(java.lang.String word)
IdentifierHelperisReservedWord in interface IdentifierHelperword - The word to checktrue if the given word represents a reserved word; false otherwise.public java.lang.String toMetaDataCatalogName(Identifier identifier)
IdentifierHelperDatabaseMetaData calls.toMetaDataCatalogName in interface IdentifierHelperidentifier - The Identifier representation of a catalog namepublic java.lang.String toMetaDataSchemaName(Identifier identifier)
IdentifierHelperDatabaseMetaData calls.toMetaDataSchemaName in interface IdentifierHelperidentifier - The Identifier representation of a schema namepublic java.lang.String toMetaDataObjectName(Identifier identifier)
IdentifierHelperDatabaseMetaData calls.toMetaDataObjectName in interface IdentifierHelperidentifier - The Identifier representation of an object nameCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.