类 NormalizingIdentifierHelperImpl
- java.lang.Object
-
- org.hibernate.engine.jdbc.env.internal.NormalizingIdentifierHelperImpl
-
- 所有已实现的接口:
IdentifierHelper
public class NormalizingIdentifierHelperImpl extends Object implements IdentifierHelper
- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 NormalizingIdentifierHelperImpl(JdbcEnvironment jdbcEnvironment, NameQualifierSupport nameQualifierSupport, boolean globallyQuoteIdentifiers, boolean globallyQuoteIdentifiersSkipColumnDefinitions, boolean autoQuoteKeywords, Set<String> reservedWords, IdentifierCaseStrategy unquotedCaseStrategy, IdentifierCaseStrategy quotedCaseStrategy)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 IdentifierapplyGlobalQuoting(String text)Intended only for use in handling quoting requirements forcolumn-definitionas defined byColumn.columnDefinition(),JoinColumn.columnDefinition(), etc.booleanisReservedWord(String word)Check whether the given word represents a reserved word.IdentifiernormalizeQuoting(Identifier identifier)Essentially quotes the identifier if it needs to be.IdentifiertoIdentifier(String text)Generate an Identifier instance from its simple name as obtained from mapping information.IdentifiertoIdentifier(String text, boolean quoted)Generate an Identifier instance from its simple name as obtained from mapping information.StringtoMetaDataCatalogName(Identifier identifier)Render the Identifier representation of a catalog name into the String form needed inDatabaseMetaDatacalls.StringtoMetaDataObjectName(Identifier identifier)Render the Identifier representation of an object name (table, sequence, etc) into the String form needed inDatabaseMetaDatacalls.StringtoMetaDataSchemaName(Identifier identifier)Render the Identifier representation of a schema name into the String form needed inDatabaseMetaDatacalls.
-
-
-
构造器详细资料
-
NormalizingIdentifierHelperImpl
public NormalizingIdentifierHelperImpl(JdbcEnvironment jdbcEnvironment, NameQualifierSupport nameQualifierSupport, boolean globallyQuoteIdentifiers, boolean globallyQuoteIdentifiersSkipColumnDefinitions, boolean autoQuoteKeywords, Set<String> reservedWords, IdentifierCaseStrategy unquotedCaseStrategy, IdentifierCaseStrategy quotedCaseStrategy)
-
-
方法详细资料
-
normalizeQuoting
public Identifier normalizeQuoting(Identifier identifier)
从接口复制的说明:IdentifierHelperEssentially quotes the identifier if it needs to be. Useful to apply global quoting, as well as reserved word quoting after calls to naming strategies.- 指定者:
normalizeQuoting在接口中IdentifierHelper- 参数:
identifier- The identifier for which to normalize quoting.- 返回:
- The quoting-normalized Identifier.
-
toIdentifier
public Identifier toIdentifier(String text)
从接口复制的说明:IdentifierHelperGenerate an Identifier instance from its simple name as obtained from mapping information. Note that Identifiers returned from here may be implicitly quoted based on 'globally quoted identifiers' or based on reserved words.- 指定者:
toIdentifier在接口中IdentifierHelper- 参数:
text- The text form of a name as obtained from mapping information.- 返回:
- The identifier form of the name.
-
toIdentifier
public Identifier toIdentifier(String text, boolean quoted)
从接口复制的说明:IdentifierHelperGenerate an Identifier instance from its simple name as obtained from mapping information. Additionally, this form takes a boolean indicating whether to explicitly quote the Identifier. Note that Identifiers returned from here may be implicitly quoted based on 'globally quoted identifiers' or based on reserved words.- 指定者:
toIdentifier在接口中IdentifierHelper- 参数:
text- The text form of a name as obtained from mapping information.quoted- Is the identifier to be quoted explicitly.- 返回:
- The identifier form of the name.
-
applyGlobalQuoting
public Identifier applyGlobalQuoting(String text)
从接口复制的说明:IdentifierHelperIntended only for use in handling quoting requirements forcolumn-definitionas defined byColumn.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 thatcolumn-definitionshould 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在接口中IdentifierHelper- 参数:
text- The text to be (possibly) quoted- 返回:
- The identifier form
- 另请参阅:
AvailableSettings.GLOBALLY_QUOTED_IDENTIFIERS_SKIP_COLUMN_DEFINITIONS
-
isReservedWord
public boolean isReservedWord(String word)
从接口复制的说明:IdentifierHelperCheck whether the given word represents a reserved word.- 指定者:
isReservedWord在接口中IdentifierHelper- 参数:
word- The word to check- 返回:
trueif the given word represents a reserved word;falseotherwise.
-
toMetaDataCatalogName
public String toMetaDataCatalogName(Identifier identifier)
从接口复制的说明:IdentifierHelperRender the Identifier representation of a catalog name into the String form needed inDatabaseMetaDatacalls.- 指定者:
toMetaDataCatalogName在接口中IdentifierHelper- 参数:
identifier- The Identifier representation of a catalog name- 返回:
- The String representation of the given catalog name
-
toMetaDataSchemaName
public String toMetaDataSchemaName(Identifier identifier)
从接口复制的说明:IdentifierHelperRender the Identifier representation of a schema name into the String form needed inDatabaseMetaDatacalls.- 指定者:
toMetaDataSchemaName在接口中IdentifierHelper- 参数:
identifier- The Identifier representation of a schema name- 返回:
- The String representation of the given schema name
-
toMetaDataObjectName
public String toMetaDataObjectName(Identifier identifier)
从接口复制的说明:IdentifierHelperRender the Identifier representation of an object name (table, sequence, etc) into the String form needed inDatabaseMetaDatacalls.- 指定者:
toMetaDataObjectName在接口中IdentifierHelper- 参数:
identifier- The Identifier representation of an object name- 返回:
- The String representation of the given object name
-
-