com.netflix.astyanax.thrift
Class AbstractRowQueryImpl<K,C>

java.lang.Object
  extended by com.netflix.astyanax.thrift.AbstractRowQueryImpl<K,C>
All Implemented Interfaces:
Execution<ColumnList<C>>, RowQuery<K,C>

public abstract class AbstractRowQueryImpl<K,C>
extends Object
implements RowQuery<K,C>


Field Summary
protected  boolean isPaginating
           
protected  boolean paginateNoMore
           
protected  org.apache.cassandra.thrift.SlicePredicate predicate
           
protected  Serializer<C> serializer
           
 
Constructor Summary
AbstractRowQueryImpl(Serializer<C> serializer)
           
 
Method Summary
 RowQuery<K,C> autoPaginate(boolean enabled)
          When used in conjunction with a column range this will call subsequent calls to execute() to get the next block of columns.
 RowQuery<K,C> setIsPaginating()
           
 RowQuery<K,C> withColumnRange(ByteBuffer startColumn, ByteBuffer endColumn, boolean reversed, int count)
          Specify a range and provide pre-constructed start and end columns.
 RowQuery<K,C> withColumnRange(ByteBufferRange range)
          Specify a range of composite columns.
 RowQuery<K,C> withColumnRange(C startColumn, C endColumn, boolean reversed, int count)
          Specify a range of columns to return.
 RowQuery<K,C> withColumnSlice(C... columns)
          Specify a non-contiguous set of columns to retrieve.
 RowQuery<K,C> withColumnSlice(Collection<C> columns)
          Specify a non-contiguous set of columns to retrieve.
 RowQuery<K,C> withColumnSlice(ColumnSlice<C> slice)
          Use this when your application caches the column slice.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.netflix.astyanax.query.RowQuery
copyTo, getColumn, getCount
 
Methods inherited from interface com.netflix.astyanax.Execution
execute, executeAsync
 

Field Detail

predicate

protected final org.apache.cassandra.thrift.SlicePredicate predicate

serializer

protected final Serializer<C> serializer

isPaginating

protected boolean isPaginating

paginateNoMore

protected boolean paginateNoMore
Constructor Detail

AbstractRowQueryImpl

public AbstractRowQueryImpl(Serializer<C> serializer)
Method Detail

withColumnSlice

public RowQuery<K,C> withColumnSlice(C... columns)
Description copied from interface: RowQuery
Specify a non-contiguous set of columns to retrieve.

Specified by:
withColumnSlice in interface RowQuery<K,C>
Returns:

withColumnSlice

public RowQuery<K,C> withColumnSlice(Collection<C> columns)
Description copied from interface: RowQuery
Specify a non-contiguous set of columns to retrieve.

Specified by:
withColumnSlice in interface RowQuery<K,C>
Returns:

withColumnSlice

public RowQuery<K,C> withColumnSlice(ColumnSlice<C> slice)
Description copied from interface: RowQuery
Use this when your application caches the column slice.

Specified by:
withColumnSlice in interface RowQuery<K,C>
Returns:

withColumnRange

public RowQuery<K,C> withColumnRange(C startColumn,
                                     C endColumn,
                                     boolean reversed,
                                     int count)
Description copied from interface: RowQuery
Specify a range of columns to return. Use this for simple ranges for non-composite column names. For Composite column names use withColumnRange(ByteBufferRange range) and the AnnotatedCompositeSerializer.buildRange()

Specified by:
withColumnRange in interface RowQuery<K,C>
Parameters:
startColumn - First column in the range
endColumn - Last column in the range
reversed - True if the order should be reversed. Note that for reversed, startColumn should be greater than endColumn.
count - Maximum number of columns to return (similar to SQL LIMIT)
Returns:

withColumnRange

public RowQuery<K,C> withColumnRange(ByteBuffer startColumn,
                                     ByteBuffer endColumn,
                                     boolean reversed,
                                     int count)
Description copied from interface: RowQuery
Specify a range and provide pre-constructed start and end columns. Use this with Composite columns

Specified by:
withColumnRange in interface RowQuery<K,C>
Returns:

setIsPaginating

public RowQuery<K,C> setIsPaginating()
Specified by:
setIsPaginating in interface RowQuery<K,C>

autoPaginate

public RowQuery<K,C> autoPaginate(boolean enabled)
Description copied from interface: RowQuery
When used in conjunction with a column range this will call subsequent calls to execute() to get the next block of columns.

Specified by:
autoPaginate in interface RowQuery<K,C>
Returns:

withColumnRange

public RowQuery<K,C> withColumnRange(ByteBufferRange range)
Description copied from interface: RowQuery
Specify a range of composite columns. Use this in conjunction with the AnnotatedCompositeSerializer.buildRange().

Specified by:
withColumnRange in interface RowQuery<K,C>
Returns:


Copyright © 2012. All Rights Reserved.