Class Columns
java.lang.Object
org.springframework.data.cassandra.core.query.Columns
- All Implemented Interfaces:
Iterable<ColumnName>
Value object to abstract column names involved in a CQL query. Columns can be constructed from an array of names and
included using a
Columns.Selector.- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classColumn selection.static classFunction call selector with alias support.static interfaceStrategy interface to render a column or function selection.static interfaceEntrypoint to build aColumns.Selector.static interfaceBuilder for similarity functions. -
Method Summary
Modifier and TypeMethodDescriptionReturns a newColumnsconsisting of theColumnNames of the currentColumnscombined with the given ones.static Columnsempty()Create an emptyColumnsinstance without any columns.booleanstatic Columnsfrom(com.datastax.oss.driver.api.core.CqlIdentifier... columnNames) Create aColumnsgivencolumnNames.static ColumnsCreate aColumnsgivencolumnNames.getSelector(ColumnName columnName) inthashCode()include(com.datastax.oss.driver.api.core.CqlIdentifier columnName) Include columncolumnNameto the selection.Include columncolumnNameto the selection.booleanisEmpty()iterator()select(com.datastax.oss.driver.api.core.CqlIdentifier columnName, Function<Columns.SelectorBuilder, Columns.Selector> builder) Include columncolumnNamewith a builtColumns.Selector.select(com.datastax.oss.driver.api.core.CqlIdentifier columnName, Columns.Selector selector) Include columncolumnNamewithColumns.Selector.select(String columnName, Function<Columns.SelectorBuilder, Columns.Selector> builder) Include columncolumnNamewith a builtColumns.Selector.select(String columnName, Columns.Selector selector) Include columncolumnNamewithColumns.Selector.toString()ttl(com.datastax.oss.driver.api.core.CqlIdentifier columnName) Include columncolumnNameas TTL value in the selection.Include columncolumnNameas TTL value in the selection.Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
empty
-
from
-
from
-
include
Include columncolumnNameto the selection. Column inclusion overrides an existing selection for the column name.- Parameters:
columnName- must not be null.- Returns:
- a new
Columnsobject containing all column definitions and the includedcolumnName.
-
include
Include columncolumnNameto the selection. Column inclusion overrides an existing selection for the column name.- Parameters:
columnName- must not be null.- Returns:
- a new
Columnsobject containing all column definitions and the includedcolumnName.
-
ttl
Include columncolumnNameas TTL value in the selection. This column selection overrides an existing selection for the column name.- Parameters:
columnName- must not be null.- Returns:
- a new
Columnsobject containing all column definitions and the TTL forcolumnName.
-
ttl
Include columncolumnNameas TTL value in the selection. This column selection overrides an existing selection for the column name.- Parameters:
columnName- must not be null.- Returns:
- a new
Columnsobject containing all column definitions and the TTL forcolumnName.
-
select
Include columncolumnNamewithColumns.Selector. This column selection overrides an existing selection for the column name.- Parameters:
columnName- must not be null.- Returns:
- a new
Columnsobject containing all column definitions and the selectedcolumnName.
-
select
@CheckReturnValue public Columns select(com.datastax.oss.driver.api.core.CqlIdentifier columnName, Function<Columns.SelectorBuilder, Columns.Selector> builder) Include columncolumnNamewith a builtColumns.Selector. This column selection overrides an existing selection for the column name.Columns.SelectorBuilderuses the givencolumnNameas column alias to represent the selection in the result.- Parameters:
columnName- must not be null.- Returns:
- a new
Columnsobject containing all column definitions and the selectedcolumnName. - Since:
- 4.5
-
select
@CheckReturnValue public Columns select(String columnName, Function<Columns.SelectorBuilder, Columns.Selector> builder) Include columncolumnNamewith a builtColumns.Selector. This column selection overrides an existing selection for the column name.Columns.SelectorBuilderuses the givencolumnNameas column alias to represent the selection in the result.- Parameters:
columnName- must not be null.- Returns:
- a new
Columnsobject containing all column definitions and the selectedcolumnName. - Since:
- 4.5
-
select
@CheckReturnValue public Columns select(com.datastax.oss.driver.api.core.CqlIdentifier columnName, Columns.Selector selector) Include columncolumnNamewithColumns.Selector. This column selection overrides an existing selection for the column name.- Parameters:
columnName- must not be null.- Returns:
- a new
Columnsobject containing all column definitions and the selectedcolumnName.
-
isEmpty
public boolean isEmpty()- Returns:
- true if no columns were specified and this
Columnsobject is empty.
-
and
Returns a newColumnsconsisting of theColumnNames of the currentColumnscombined with the given ones. ExistingColumnNames are overwritten if specified withincolumns. -
iterator
- Specified by:
iteratorin interfaceIterable<ColumnName>
-
getSelector
- Parameters:
columnName- must not be null.- Returns:
- the
OptionalColumns.SelectorforColumnName.
-
equals
-
hashCode
-
toString
-