|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.cql3.Term
public class Term
A term parsed from a CQL statement.
Field Summary | |
---|---|
int |
bindIndex
|
boolean |
isToken
|
Constructor Summary | |
---|---|
Term(long value,
org.apache.cassandra.cql3.TermType type)
|
|
Term(java.lang.String text,
int type)
Create new Term instance from a string, and an integer that corresponds with the token ID from CQLParser. |
|
Term(java.lang.String text,
int type,
int index)
|
|
Term(java.lang.String text,
org.apache.cassandra.cql3.TermType type)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
Token |
getAsToken(AbstractType<?> validator,
java.util.List<java.nio.ByteBuffer> variables,
IPartitioner<?> p)
|
java.nio.ByteBuffer |
getByteBuffer(AbstractType<?> validator,
java.util.List<java.nio.ByteBuffer> variables)
Returns the typed value, serialized to a ByteBuffer according to a comparator/validator. |
java.lang.String |
getText()
Returns the text parsed to create this term. |
org.apache.cassandra.cql3.TermType |
getType()
Obtain the term's type. |
int |
hashCode()
|
boolean |
isBindMarker()
|
static Term |
tokenOf(Term t)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final int bindIndex
public final boolean isToken
Constructor Detail |
---|
public Term(java.lang.String text, org.apache.cassandra.cql3.TermType type)
public Term(java.lang.String text, int type)
text
- the text representation of the term.type
- the term's type as an integer token ID.public Term(long value, org.apache.cassandra.cql3.TermType type)
public Term(java.lang.String text, int type, int index)
Method Detail |
---|
public static Term tokenOf(Term t)
public java.lang.String getText()
public java.nio.ByteBuffer getByteBuffer(AbstractType<?> validator, java.util.List<java.nio.ByteBuffer> variables) throws org.apache.cassandra.thrift.InvalidRequestException
org.apache.cassandra.thrift.InvalidRequestException
- if unable to coerce the string to its type.public Token getAsToken(AbstractType<?> validator, java.util.List<java.nio.ByteBuffer> variables, IPartitioner<?> p) throws org.apache.cassandra.thrift.InvalidRequestException
org.apache.cassandra.thrift.InvalidRequestException
public org.apache.cassandra.cql3.TermType getType()
public boolean isBindMarker()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |