org.apache.cassandra.cql3
Class Term.Terminal
java.lang.Object
org.apache.cassandra.cql3.Term.Terminal
- All Implemented Interfaces:
- Term
- Direct Known Subclasses:
- Constants.Value, Lists.Value, Maps.Value, Sets.Value
- Enclosing interface:
- Term
public abstract static class Term.Terminal
- extends java.lang.Object
- implements Term
A terminal term, i.e. one without any bind marker.
This can be only one of:
- a constant value
- a collection value
Note that a terminal term will always have been type checked, and thus
consumer can (and should) assume so.
Method Summary |
Term.Terminal |
bind(java.util.List<java.nio.ByteBuffer> values)
Bind the values in this term to the values contained in values . |
java.nio.ByteBuffer |
bindAndGet(java.util.List<java.nio.ByteBuffer> values)
A shorter for bind(values).get(). |
void |
collectMarkerSpecification(ColumnSpecification[] boundNames)
Collects the column specification for the bind variables in this Term. |
abstract java.nio.ByteBuffer |
get()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Term.Terminal
public Term.Terminal()
collectMarkerSpecification
public void collectMarkerSpecification(ColumnSpecification[] boundNames)
- Description copied from interface:
Term
- Collects the column specification for the bind variables in this Term.
This is obviously a no-op if the term is Terminal.
- Specified by:
collectMarkerSpecification
in interface Term
- Parameters:
boundNames
- the list of column specification where to collect the
bind variables of this term in.
bind
public Term.Terminal bind(java.util.List<java.nio.ByteBuffer> values)
- Description copied from interface:
Term
- Bind the values in this term to the values contained in
values
.
This is obviously a no-op if the term is Terminal.
- Specified by:
bind
in interface Term
- Parameters:
values
- the values to bind markers to.
- Returns:
- the result of binding all the variables of this NonTerminal (or
'this' if the term is terminal).
get
public abstract java.nio.ByteBuffer get()
- Returns:
- the serialized value of this terminal.
bindAndGet
public java.nio.ByteBuffer bindAndGet(java.util.List<java.nio.ByteBuffer> values)
throws InvalidRequestException
- Description copied from interface:
Term
- A shorter for bind(values).get().
We expose it mainly because for constants it can avoids allocating a temporary
object between the bind and the get (note that we still want to be able
to separate bind and get for collections).
- Specified by:
bindAndGet
in interface Term
- Throws:
InvalidRequestException
Copyright © 2013 The Apache Software Foundation