Class CqlIdentifier
java.lang.Object
org.springframework.data.cassandra.core.cql.CqlIdentifier
- All Implemented Interfaces:
Serializable
,Comparable<CqlIdentifier>
@Deprecated
public final class CqlIdentifier
extends Object
implements Comparable<CqlIdentifier>, Serializable
Deprecated.
This encapsulates the logic for CQL quoted and unquoted identifiers.
CQL identifiers, when unquoted, are converted to lower case. When quoted, they are returned as-is with no lower
casing and encased in double quotes. To render, use any of the methods toCql()
,
toCql(StringBuilder)
, or toString()
.
- Author:
- John McPeek, Matthew T. Adams, Mark Paluch, John Blum
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(CqlIdentifier identifier) Deprecated.Unquoted identifiers sort before quoted ones.static CqlIdentifier
cqlId
(CharSequence identifier) Deprecated.since 2.0, useof(CharSequence)
static CqlIdentifier
cqlId
(CharSequence identifier, boolean forceQuote) Deprecated.since 2.0, useof(CharSequence, boolean)
boolean
Deprecated.Compares thisCqlIdentifier
to the given object.Deprecated.Returns the identifier without encasing quotes, regardless of the value ofisQuoted()
.int
hashCode()
Deprecated.boolean
isQuoted()
Deprecated.Whether or not this identifier is quoted.static boolean
isQuotedIdentifier
(CharSequence chars) Deprecated.Returnstrue
if the givenCharSequence
is an identifier with quotes.static boolean
isUnquotedIdentifier
(CharSequence chars) Deprecated.Returnstrue
if the givenCharSequence
is a legal unquoted identifier.static CqlIdentifier
of
(CharSequence identifier) Deprecated.Factory method forCqlIdentifier
.static CqlIdentifier
of
(CharSequence identifier, boolean forceQuote) Deprecated.Factory method forCqlIdentifier
.static CqlIdentifier
quoted
(CharSequence identifier) Deprecated.Factory method for a force-quotedCqlIdentifier
.static CqlIdentifier
quotedCqlId
(CharSequence identifier) Deprecated.since 2.0, usequoted(CharSequence)
.static boolean
requiresQuoting
(CharSequence chars) Deprecated.Returnstrue
if the givenCharSequence
requires quoting.toCql()
Deprecated.Renders this identifier appropriately.toCql
(StringBuilder builder) Deprecated.Appends the rendering of this identifier to the givenStringBuilder
, then returns thatStringBuilder
.com.datastax.oss.driver.api.core.CqlIdentifier
Deprecated.Create a Cassandra driverCqlIdentifier
from thisCqlIdentifier
.toString()
Deprecated.Alias fortoCql()
.
-
Field Details
-
UNQUOTED_REGEX
Deprecated.- See Also:
-
UNQUOTED
Deprecated. -
QUOTED_REGEX
Deprecated.- See Also:
-
QUOTED
Deprecated.
-
-
Method Details
-
cqlId
Deprecated.since 2.0, useof(CharSequence)
Factory method forCqlIdentifier
. Convenient if imported statically.- See Also:
-
CqlIdentifier(CharSequence)
-
cqlId
Deprecated.since 2.0, useof(CharSequence, boolean)
Factory method forCqlIdentifier
. Convenient if imported statically.- See Also:
-
CqlIdentifier(CharSequence, boolean)
-
of
Deprecated.Factory method forCqlIdentifier
.- Since:
- 2.0
-
of
Deprecated.Factory method forCqlIdentifier
.- Since:
- 2.0
-
quotedCqlId
Deprecated.since 2.0, usequoted(CharSequence)
.Factory method for a force-quotedCqlIdentifier
. Convenient if imported statically.- See Also:
-
CqlIdentifier(CharSequence, boolean)
-
quoted
Deprecated.Factory method for a force-quotedCqlIdentifier
.- Since:
- 2.0.
-
isUnquotedIdentifier
Deprecated.Returnstrue
if the givenCharSequence
is a legal unquoted identifier. -
isQuotedIdentifier
Deprecated.Returnstrue
if the givenCharSequence
is an identifier with quotes. -
requiresQuoting
Deprecated.Returnstrue
if the givenCharSequence
requires quoting.- Since:
- 2.2
-
getUnquoted
Deprecated.Returns the identifier without encasing quotes, regardless of the value ofisQuoted()
. For example, ifisQuoted()
istrue
, then this value will be the same astoCql()
andtoString()
.This is needed, for example, to get the correct
TableMetadata
fromKeyspaceMetadata.getTable(String)
: the given string must not be quoted. -
toCql
Deprecated.Renders this identifier appropriately. -
toCql
Deprecated.Appends the rendering of this identifier to the givenStringBuilder
, then returns thatStringBuilder
. If null is given, a newStringBuilder
is created, appended to, and returned. -
isQuoted
public boolean isQuoted()Deprecated.Whether or not this identifier is quoted. -
compareTo
Deprecated.Unquoted identifiers sort before quoted ones. Otherwise, they compare according to their identifiers.- Specified by:
compareTo
in interfaceComparable<CqlIdentifier>
-
equals
Deprecated.Compares thisCqlIdentifier
to the given object. Note that if aCharSequence
is given, a newCqlIdentifier
is created from it and compared, such that aCharSequence
can be effectively equal to aCqlIdentifier
. -
hashCode
public int hashCode()Deprecated. -
toString
Deprecated.Alias fortoCql()
. -
toCqlIdentifier
public com.datastax.oss.driver.api.core.CqlIdentifier toCqlIdentifier()Deprecated.Create a Cassandra driverCqlIdentifier
from thisCqlIdentifier
.- Returns:
- the
CqlIdentifier
from thisCqlIdentifier
. - Since:
- 3.0
-
CqlIdentifier
instead.