public final class TokenRelation extends Relation
relationType| Constructor and Description |
|---|
TokenRelation(java.util.List<ColumnIdentifier> entities,
Operator type,
Term.Raw value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.List<? extends Term.Raw> |
getInValues()
Returns the list of raw IN values for this relation, or null if this is not an IN relation.
|
Term.Raw |
getValue()
Returns the raw value for this relation, or null if this is an IN relation.
|
int |
hashCode() |
protected Restriction |
newContainsRestriction(TableMetadata table,
VariableSpecifications boundNames,
boolean isKey)
Creates a new Contains restriction instance.
|
protected Restriction |
newEQRestriction(TableMetadata table,
VariableSpecifications boundNames)
Creates a new EQ restriction instance.
|
protected Restriction |
newINRestriction(TableMetadata table,
VariableSpecifications boundNames)
Creates a new IN restriction instance.
|
protected Restriction |
newIsNotRestriction(TableMetadata table,
VariableSpecifications boundNames) |
protected Restriction |
newLikeRestriction(TableMetadata table,
VariableSpecifications boundNames,
Operator operator) |
protected Restriction |
newSliceRestriction(TableMetadata table,
VariableSpecifications boundNames,
Bound bound,
boolean inclusive)
Creates a new Slice restriction instance.
|
boolean |
onToken()
Checks if this relation is a token relation (e.g.
|
Relation |
renameIdentifier(ColumnIdentifier from,
ColumnIdentifier to)
Renames an identifier in this Relation, if applicable.
|
java.lang.String |
toCQLString()
Returns a CQL representation of this relation.
|
protected Term |
toTerm(java.util.List<? extends ColumnSpecification> receivers,
Term.Raw raw,
java.lang.String keyspace,
VariableSpecifications boundNames)
Converts the specified
Raw into a Term. |
isContains, isContainsKey, isEQ, isIN, isLIKE, isMultiColumn, isSlice, operator, toRestriction, toString, toTermspublic TokenRelation(java.util.List<ColumnIdentifier> entities, Operator type, Term.Raw value)
public boolean onToken()
Relationtoken(a) = token(1)).
public Term.Raw getValue()
Relationpublic java.util.List<? extends Term.Raw> getInValues()
RelationgetInValues in class Relationprotected Restriction newEQRestriction(TableMetadata table, VariableSpecifications boundNames)
RelationnewEQRestriction in class Relationtable - the table meta databoundNames - the variables specification where to collect the bind variablesprotected Restriction newINRestriction(TableMetadata table, VariableSpecifications boundNames)
RelationnewINRestriction in class Relationtable - the table meta databoundNames - the variables specification where to collect the bind variablesprotected Restriction newSliceRestriction(TableMetadata table, VariableSpecifications boundNames, Bound bound, boolean inclusive)
RelationnewSliceRestriction in class Relationtable - the table meta databoundNames - the variables specification where to collect the bind variablesbound - the slice boundinclusive - true if the bound is included.protected Restriction newContainsRestriction(TableMetadata table, VariableSpecifications boundNames, boolean isKey)
RelationnewContainsRestriction in class Relationtable - the table meta databoundNames - the variables specification where to collect the bind variablesisKey - true if the restriction to create is a CONTAINS KEYRestriction instanceprotected Restriction newIsNotRestriction(TableMetadata table, VariableSpecifications boundNames)
newIsNotRestriction in class Relationprotected Restriction newLikeRestriction(TableMetadata table, VariableSpecifications boundNames, Operator operator)
newLikeRestriction in class Relationprotected Term toTerm(java.util.List<? extends ColumnSpecification> receivers, Term.Raw raw, java.lang.String keyspace, VariableSpecifications boundNames) throws InvalidRequestException
RelationRaw into a Term.toTerm in class Relationreceivers - the columns to which the values must be associated atraw - the raw term to convertkeyspace - the keyspace nameboundNames - the variables specification where to collect the bind variablesTerm corresponding to the specified RawInvalidRequestException - if the Raw term is not validpublic Relation renameIdentifier(ColumnIdentifier from, ColumnIdentifier to)
RelationrenameIdentifier in class Relationfrom - the old identifierto - the new identifierpublic java.lang.String toCQLString()
RelationtoCQLString in class Relationpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.ObjectCopyright © 2009-2022 The Apache Software Foundation