Class ColumnConditions
- java.lang.Object
-
- org.apache.cassandra.cql3.conditions.ColumnConditions
-
- All Implemented Interfaces:
Conditions
public final class ColumnConditions extends java.lang.Object
A set ofColumnCondition
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ColumnConditions.Builder
ABuilder
forColumnConditions
.
-
Field Summary
-
Fields inherited from interface org.apache.cassandra.cql3.conditions.Conditions
EMPTY_CONDITION, IF_EXISTS_CONDITION, IF_NOT_EXISTS_CONDITION
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConditionsTo(CQL3CasRequest request, Clustering<?> clustering, QueryOptions options)
Adds the conditions to the specified CAS request.void
addFunctionsTo(java.util.List<Function> functions)
Adds the functions used by the conditions to the specified list.boolean
appliesToRegularColumns()
Checks if some of the conditions apply to regular columns.boolean
appliesToStaticColumns()
Checks if some of the conditions apply to static columns.java.util.Collection<ColumnMetadata>
getColumns()
Returns the column definitions to which apply the conditions.boolean
isEmpty()
Checks if thisConditions
is empty.boolean
isIfExists()
Checks if this is a IF EXIST condition.boolean
isIfNotExists()
Checks if this is a IF NOT EXIST condition.static ColumnConditions.Builder
newBuilder()
Creates a newBuilder
forColumnConditions
.java.lang.String
toString()
-
-
-
Method Detail
-
appliesToStaticColumns
public boolean appliesToStaticColumns()
Description copied from interface:Conditions
Checks if some of the conditions apply to static columns.- Specified by:
appliesToStaticColumns
in interfaceConditions
- Returns:
true
if some of the conditions apply to static columns,false
otherwise.
-
appliesToRegularColumns
public boolean appliesToRegularColumns()
Description copied from interface:Conditions
Checks if some of the conditions apply to regular columns.- Specified by:
appliesToRegularColumns
in interfaceConditions
- Returns:
true
if some of the conditions apply to regular columns,false
otherwise.
-
getColumns
public java.util.Collection<ColumnMetadata> getColumns()
Description copied from interface:Conditions
Returns the column definitions to which apply the conditions.- Specified by:
getColumns
in interfaceConditions
- Returns:
- the column definitions to which apply the conditions.
-
isEmpty
public boolean isEmpty()
Description copied from interface:Conditions
Checks if thisConditions
is empty.- Specified by:
isEmpty
in interfaceConditions
- Returns:
true
if thisConditions
is empty,false
otherwise.
-
addConditionsTo
public void addConditionsTo(CQL3CasRequest request, Clustering<?> clustering, QueryOptions options)
Adds the conditions to the specified CAS request.- Parameters:
request
- the requestclustering
- the clustering prefixoptions
- the query options
-
addFunctionsTo
public void addFunctionsTo(java.util.List<Function> functions)
Description copied from interface:Conditions
Adds the functions used by the conditions to the specified list.- Specified by:
addFunctionsTo
in interfaceConditions
- Parameters:
functions
- the list to add to
-
newBuilder
public static ColumnConditions.Builder newBuilder()
Creates a newBuilder
forColumnConditions
.- Returns:
- a new
Builder
forColumnConditions
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isIfExists
public boolean isIfExists()
Description copied from interface:Conditions
Checks if this is a IF EXIST condition.- Specified by:
isIfExists
in interfaceConditions
- Returns:
true
if this is a IF EXIST condition,false
otherwise.
-
isIfNotExists
public boolean isIfNotExists()
Description copied from interface:Conditions
Checks if this is a IF NOT EXIST condition.- Specified by:
isIfNotExists
in interfaceConditions
- Returns:
true
if this is a IF NOT EXIST condition,false
otherwise.
-
-