public class SingleColumnRelation extends Relation
<key> > "start" or "colname1" = "somevalue".relationType| Constructor and Description |
|---|
SingleColumnRelation(ColumnDefinition.Raw entity,
Operator type,
Term.Raw value)
Creates a new relation.
|
SingleColumnRelation(ColumnDefinition.Raw entity,
Term.Raw mapKey,
Operator type,
Term.Raw value)
Creates a new relation.
|
| Modifier and Type | Method and Description |
|---|---|
static SingleColumnRelation |
createInRelation(ColumnDefinition.Raw entity,
java.util.List<Term.Raw> inValues) |
ColumnDefinition.Raw |
getEntity() |
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 |
getMapKey() |
Term.Raw |
getValue()
Returns the raw value for this relation, or null if this is an IN relation.
|
protected Restriction |
newContainsRestriction(CFMetaData cfm,
VariableSpecifications boundNames,
boolean isKey)
Creates a new Contains restriction instance.
|
protected Restriction |
newEQRestriction(CFMetaData cfm,
VariableSpecifications boundNames)
Creates a new EQ restriction instance.
|
protected Restriction |
newINRestriction(CFMetaData cfm,
VariableSpecifications boundNames)
Creates a new IN restriction instance.
|
protected Restriction |
newIsNotRestriction(CFMetaData cfm,
VariableSpecifications boundNames) |
protected Restriction |
newLikeRestriction(CFMetaData cfm,
VariableSpecifications boundNames,
Operator operator) |
protected Restriction |
newSliceRestriction(CFMetaData cfm,
VariableSpecifications boundNames,
Bound bound,
boolean inclusive)
Creates a new Slice restriction instance.
|
Relation |
renameIdentifier(ColumnDefinition.Raw from,
ColumnDefinition.Raw to)
Renames an identifier in this Relation, if applicable.
|
java.lang.String |
toString() |
Relation |
toSuperColumnAdapter()
Required for SuperColumn compatibility, creates an adapter Relation that remaps all restrictions required for
SuperColumn tables.
|
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. |
SingleColumnRelation |
withNonStrictOperator() |
isContains, isContainsKey, isEQ, isIN, isLIKE, isMultiColumn, isSlice, onToken, operator, toRestriction, toTermspublic SingleColumnRelation(ColumnDefinition.Raw entity, Term.Raw mapKey, Operator type, Term.Raw value)
entity - the kind of relation this is; what the term is being compared to.mapKey - the key into the entity identifying the value the term is being compared to.type - the type that describes how this entity relates to the value.value - the value being compared.public SingleColumnRelation(ColumnDefinition.Raw entity, Operator type, Term.Raw value)
entity - the kind of relation this is; what the term is being compared to.type - the type that describes how this entity relates to the value.value - the value being compared.public Term.Raw getValue()
Relationpublic java.util.List<? extends Term.Raw> getInValues()
RelationgetInValues in class Relationpublic static SingleColumnRelation createInRelation(ColumnDefinition.Raw entity, java.util.List<Term.Raw> inValues)
public ColumnDefinition.Raw getEntity()
public Term.Raw getMapKey()
protected 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 SingleColumnRelation withNonStrictOperator()
public Relation renameIdentifier(ColumnDefinition.Raw from, ColumnDefinition.Raw to)
RelationrenameIdentifier in class Relationfrom - the old identifierto - the new identifierpublic java.lang.String toString()
toString in class java.lang.Objectprotected Restriction newEQRestriction(CFMetaData cfm, VariableSpecifications boundNames) throws InvalidRequestException
RelationnewEQRestriction in class Relationcfm - the Column Family meta databoundNames - the variables specification where to collect the bind variablesInvalidRequestException - if the relation cannot be converted into an EQ restriction.protected Restriction newINRestriction(CFMetaData cfm, VariableSpecifications boundNames) throws InvalidRequestException
RelationnewINRestriction in class Relationcfm - the Column Family meta databoundNames - the variables specification where to collect the bind variablesInvalidRequestException - if the relation cannot be converted into an IN restriction.protected Restriction newSliceRestriction(CFMetaData cfm, VariableSpecifications boundNames, Bound bound, boolean inclusive) throws InvalidRequestException
RelationnewSliceRestriction in class Relationcfm - the Column Family meta databoundNames - the variables specification where to collect the bind variablesbound - the slice boundinclusive - true if the bound is included.InvalidRequestException - if the Relation is not validprotected Restriction newContainsRestriction(CFMetaData cfm, VariableSpecifications boundNames, boolean isKey) throws InvalidRequestException
RelationnewContainsRestriction in class Relationcfm - the Column Family meta databoundNames - the variables specification where to collect the bind variablesisKey - true if the restriction to create is a CONTAINS KEYRestriction instanceInvalidRequestException - if the Relation is not validprotected Restriction newIsNotRestriction(CFMetaData cfm, VariableSpecifications boundNames) throws InvalidRequestException
newIsNotRestriction in class RelationInvalidRequestExceptionprotected Restriction newLikeRestriction(CFMetaData cfm, VariableSpecifications boundNames, Operator operator) throws InvalidRequestException
newLikeRestriction in class RelationInvalidRequestExceptionpublic Relation toSuperColumnAdapter()
RelationtoSuperColumnAdapter in class RelationCopyright © 2018 The Apache Software Foundation