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
Fields -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CqlIdentifier identifier) Deprecated.Unquoted identifiers sort before quoted ones.static CqlIdentifiercqlId(CharSequence identifier) Deprecated.since 2.0, useof(CharSequence)static CqlIdentifiercqlId(CharSequence identifier, boolean forceQuote) Deprecated.since 2.0, useof(CharSequence, boolean)booleanDeprecated.Compares thisCqlIdentifierto the given object.Deprecated.Returns the identifier without encasing quotes, regardless of the value ofisQuoted().inthashCode()Deprecated.booleanisQuoted()Deprecated.Whether or not this identifier is quoted.static booleanisQuotedIdentifier(CharSequence chars) Deprecated.Returnstrueif the givenCharSequenceis an identifier with quotes.static booleanisUnquotedIdentifier(CharSequence chars) Deprecated.Returnstrueif the givenCharSequenceis a legal unquoted identifier.static CqlIdentifierof(CharSequence identifier) Deprecated.Factory method forCqlIdentifier.static CqlIdentifierof(CharSequence identifier, boolean forceQuote) Deprecated.Factory method forCqlIdentifier.static CqlIdentifierquoted(CharSequence identifier) Deprecated.Factory method for a force-quotedCqlIdentifier.static CqlIdentifierquotedCqlId(CharSequence identifier) Deprecated.since 2.0, usequoted(CharSequence).static booleanrequiresQuoting(CharSequence chars) Deprecated.Returnstrueif the givenCharSequencerequires 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.CqlIdentifierDeprecated.Create a Cassandra driverCqlIdentifierfrom 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.Returnstrueif the givenCharSequenceis a legal unquoted identifier. -
isQuotedIdentifier
Deprecated.Returnstrueif the givenCharSequenceis an identifier with quotes. -
requiresQuoting
Deprecated.Returnstrueif the givenCharSequencerequires 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
TableMetadatafromKeyspaceMetadata.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 newStringBuilderis 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:
compareToin interfaceComparable<CqlIdentifier>
-
equals
Deprecated.Compares thisCqlIdentifierto the given object. Note that if aCharSequenceis given, a newCqlIdentifieris created from it and compared, such that aCharSequencecan 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 driverCqlIdentifierfrom thisCqlIdentifier.- Returns:
- the
CqlIdentifierfrom thisCqlIdentifier. - Since:
- 3.0
-
CqlIdentifierinstead.