类 Identifier
- java.lang.Object
-
- org.hibernate.boot.model.naming.Identifier
-
- 所有已实现的接口:
Comparable<Identifier>
- 直接已知子类:
DatabaseIdentifier
public class Identifier extends Object implements Comparable<Identifier>
Models an identifier (name), which may or may not be quoted.- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 限定符 构造器 说明 protectedIdentifier(String text)Constructs an unquoted identifier instance.Identifier(String text, boolean quoted)Constructs an identifier instance.
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static booleanareEqual(Identifier id1, Identifier id2)intcompareTo(Identifier o)booleanequals(Object o)StringgetCanonicalName()StringgetText()Get the identifiers name (text)inthashCode()booleanisQuoted()Is this a quoted identifier?static booleanisQuoted(String name)Is the given identifier text considered quoted.static Identifierquote(Identifier identifier)Stringrender()Stringrender(Dialect dialect)If this is a quoted identifier, then return the identifier name enclosed in dialect-specific open- and end-quotes; otherwise, simply return the unquoted identifier.static IdentifiertoIdentifier(String text)Means to generate anIdentifierinstance from its simple text form.static IdentifiertoIdentifier(String text, boolean quote)Means to generate anIdentifierinstance from its simple text form.StringtoString()
-
-
-
方法详细资料
-
toIdentifier
public static Identifier toIdentifier(String text)
Means to generate anIdentifierinstance from its simple text form. If passed text isnull,nullis returned. If passed text is surrounded in quote markers, the generated Identifier is considered quoted. Quote markers include back-ticks (`), and double-quotes (").- 参数:
text- The text form- 返回:
- The identifier form, or
nullif text wasnull
-
toIdentifier
public static Identifier toIdentifier(String text, boolean quote)
Means to generate anIdentifierinstance from its simple text form. If passed text isnull,nullis returned. If passed text is surrounded in quote markers, the generated Identifier is considered quoted. Quote markers include back-ticks (`), and double-quotes (").- 参数:
text- The text formquote- Whether to quote unquoted text forms- 返回:
- The identifier form, or
nullif text wasnull
-
isQuoted
public static boolean isQuoted(String name)
Is the given identifier text considered quoted. The following patterns are recognized as quoted:`name`[name]"name"
- 参数:
name-- 返回:
trueif the given identifier text is considered quoted;falseotherwise.
-
getText
public String getText()
Get the identifiers name (text)- 返回:
- The name
-
isQuoted
public boolean isQuoted()
Is this a quoted identifier?- 返回:
- True if this is a quote identifier; false otherwise.
-
render
public String render(Dialect dialect)
If this is a quoted identifier, then return the identifier name enclosed in dialect-specific open- and end-quotes; otherwise, simply return the unquoted identifier.- 参数:
dialect- The dialect whose dialect-specific quoting should be used.- 返回:
- if quoted, identifier name enclosed in dialect-specific open- and end-quotes; otherwise, the unquoted identifier.
-
render
public String render()
-
getCanonicalName
public String getCanonicalName()
-
areEqual
public static boolean areEqual(Identifier id1, Identifier id2)
-
quote
public static Identifier quote(Identifier identifier)
-
compareTo
public int compareTo(Identifier o)
- 指定者:
compareTo在接口中Comparable<Identifier>
-
-