java.lang.Object
org.springframework.data.cassandra.core.query.ColumnName
Value object representing a column name. Column names can be expressed either through
CqlIdentifier or a
String literal. Using a String literal preserves case and is suitable to reference properties.
Equality and hash code are based on toCql() representation.
Implementing classes must provide either getColumnName() or getCqlIdentifier().
- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
CqlIdentifier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ColumnNamefrom(com.datastax.oss.driver.api.core.CqlIdentifier cqlIdentifier) Create aColumnNamegivenCqlIdentifier.static ColumnNameCreate aColumnNamegiven a stringcolumnName.abstract Optional<com.datastax.oss.driver.api.core.CqlIdentifier>inthashCode()abstract StringtoCql()Represent the column name as CQL.
-
Constructor Details
-
ColumnName
public ColumnName()
-
-
Method Details
-
from
Create aColumnNamegivenCqlIdentifier. The resulting instance uses CQL identifier rules to identify column names (quoting, case-sensitivity).- Parameters:
cqlIdentifier- must not be null.- Returns:
- the
ColumnNameforCqlIdentifier - See Also:
-
CqlIdentifier
-
from
Create aColumnNamegiven a stringcolumnName. The resulting instance uses String rules to identify column names (case-sensitivity).- Parameters:
columnName- must not be null or empty.- Returns:
- the
ColumnNameforCqlIdentifier
-
getColumnName
- Returns:
- the optional column name.
-
getCqlIdentifier
- Returns:
- the optional
CqlIdentifier.
-
toCql
Represent the column name as CQL.- Returns:
- CQL representation of the column name.
-
equals
-
hashCode
public int hashCode()
-