org.apache.cassandra.cql3
Interface ColumnNameBuilder

All Known Implementing Classes:
CompositeType.Builder

public interface ColumnNameBuilder

Build a potentially composite column name.


Method Summary
 ColumnNameBuilder add(java.nio.ByteBuffer bb)
          Add a new ByteBuffer as the next component for this name.
 ColumnNameBuilder add(Term t, Relation.Type op, java.util.List<java.nio.ByteBuffer> variables)
          Add a new Term as the next component for this name.
 java.nio.ByteBuffer build()
          Build the column name.
 java.nio.ByteBuffer buildAsEndOfRange()
          Build the column name so that the result sorts at the end of the range represented by this (uncomplete) column name.
 int componentCount()
          Returns the number of component already added to this builder.
 ColumnNameBuilder copy()
          Clone this builder.
 int remainingCount()
           
 

Method Detail

add

ColumnNameBuilder add(java.nio.ByteBuffer bb)
Add a new ByteBuffer as the next component for this name.

Parameters:
bb - the ByteBuffer to add
Returns:
this builder
Throws:
java.lang.IllegalStateException - if the builder if full, i.e. if enough component has been added.

add

ColumnNameBuilder add(Term t,
                      Relation.Type op,
                      java.util.List<java.nio.ByteBuffer> variables)
                      throws InvalidRequestException
Add a new Term as the next component for this name.

Parameters:
t - the Term to add
op - the relationship this component should respect.
variables - the variables corresponding to prepared markers
Returns:
this builder
Throws:
java.lang.IllegalStateException - if the builder if full, i.e. if enough component has been added.
InvalidRequestException

componentCount

int componentCount()
Returns the number of component already added to this builder.

Returns:
the number of component in this Builder

remainingCount

int remainingCount()
Returns:
the maximum number of component that can still be added to this Builder

build

java.nio.ByteBuffer build()
Build the column name.

Returns:
the built column name

buildAsEndOfRange

java.nio.ByteBuffer buildAsEndOfRange()
Build the column name so that the result sorts at the end of the range represented by this (uncomplete) column name.

Throws:
java.lang.IllegalStateException - if the builder is empty or full.

copy

ColumnNameBuilder copy()
Clone this builder.

Returns:
the cloned builder.


Copyright © 2012 The Apache Software Foundation