public class NormalizingIdentifierHelperImpl extends Object implements IdentifierHelper
Constructor and Description |
---|
NormalizingIdentifierHelperImpl(JdbcEnvironment jdbcEnvironment,
NameQualifierSupport nameQualifierSupport,
boolean globallyQuoteIdentifiers,
boolean autoQuoteKeywords,
Set<String> reservedWords,
IdentifierCaseStrategy unquotedCaseStrategy,
IdentifierCaseStrategy quotedCaseStrategy) |
Modifier and Type | Method and Description |
---|---|
Identifier |
applyGlobalQuoting(String text)
Needed to account for certain fields (
Column.columnDefinition() comes to mind)
that need to be quoted id global identifier quoting is requested, but only for spec compliance. |
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 identifier)
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 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 autoQuoteKeywords, Set<String> reservedWords, IdentifierCaseStrategy unquotedCaseStrategy, IdentifierCaseStrategy quotedCaseStrategy)
public Identifier normalizeQuoting(Identifier identifier)
IdentifierHelper
normalizeQuoting
in interface IdentifierHelper
identifier
- The identifier for which to normalize quoting.public Identifier toIdentifier(String text)
IdentifierHelper
toIdentifier
in interface IdentifierHelper
text
- The text form of a name as obtained from mapping information.public Identifier toIdentifier(String text, boolean quoted)
IdentifierHelper
toIdentifier
in interface IdentifierHelper
text
- The text form of a name as obtained from mapping information.quoted
- Is the identifier to be quoted explicitly.public Identifier applyGlobalQuoting(String text)
IdentifierHelper
Column.columnDefinition()
comes to mind)
that need to be quoted id global identifier quoting is requested, but only 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.applyGlobalQuoting
in interface IdentifierHelper
text
- The text to be (possibly) quotedpublic boolean isReservedWord(String word)
IdentifierHelper
isReservedWord
in interface IdentifierHelper
word
- The word to checktrue
if the given word represents a reserved word; false
otherwise.public String toMetaDataCatalogName(Identifier identifier)
IdentifierHelper
DatabaseMetaData
calls.toMetaDataCatalogName
in interface IdentifierHelper
identifier
- The Identifier representation of a catalog namepublic String toMetaDataSchemaName(Identifier identifier)
IdentifierHelper
DatabaseMetaData
calls.toMetaDataSchemaName
in interface IdentifierHelper
identifier
- The Identifier representation of a schema namepublic String toMetaDataObjectName(Identifier identifier)
IdentifierHelper
DatabaseMetaData
calls.toMetaDataObjectName
in interface IdentifierHelper
identifier
- The Identifier representation of an object nameCopyright © 2001-2017 Red Hat, Inc. All Rights Reserved.