QueryFilter (apache-cassandra API)
Date: 2012-05-04

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.db.filter
Class QueryFilter

    java.lang.Object
      org.apache.cassandra.db.filter.QueryFilter

    public class QueryFilter

extends java.lang.Object

Field Summary
`IFilter` | `filter`
`DecoratedKey<?>` | `key`
`QueryPath` | `path`

Constructor Summary
`QueryFilter(DecoratedKey<?> key, QueryPath path, IFilter filter)`

Method Summary
`void` | `collateColumns(ColumnFamily returnCF, java.util.List<? extends CloseableIterator<IColumn>> toCollate, AbstractType comparator, int gcBefore)`
`java.lang.String` | `getColumnFamilyName()`
`static IFilter` | `getFilter(SlicePredicate predicate, AbstractType comparator)`
`static QueryFilter` | `getIdentityFilter(DecoratedKey<?> key, QueryPath path)` return a QueryFilter object that includes every column in the row.
`IColumnIterator` | `getMemtableColumnIterator(ColumnFamily cf, DecoratedKey<?> key, AbstractType comparator)`
`IColumnIterator` | `getMemtableColumnIterator(Memtable memtable, AbstractType comparator)`
`static QueryFilter` | `getNamesFilter(DecoratedKey<?> key, QueryPath path, java.nio.ByteBuffer column)` convenience method for creating a name filter matching a single column
`static QueryFilter` | `getNamesFilter(DecoratedKey<?> key, QueryPath path, java.util.SortedSet<java.nio.ByteBuffer> columns)`
`static QueryFilter` | `getSliceFilter(DecoratedKey<?> key, QueryPath path, java.nio.ByteBuffer start, java.nio.ByteBuffer finish, boolean reversed, int limit)`
`IColumnIterator` | `getSSTableColumnIterator(SSTableReader sstable)`
`IColumnIterator` | `getSSTableColumnIterator(SSTableReader sstable, FileDataInput file, DecoratedKey<?> key)`
`static boolean` | `isRelevant(IColumn column, IColumnContainer container, int gcBefore)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### key

    public final DecoratedKey<?> key

### path

    public final QueryPath path

### filter

    public final IFilter filter

Constructor Detail

### QueryFilter

    public QueryFilter(DecoratedKey<?> key,
                       QueryPath path,
                       IFilter filter)

Method Detail

### getMemtableColumnIterator

    public IColumnIterator getMemtableColumnIterator(Memtable memtable,
                                                     AbstractType comparator)

### getMemtableColumnIterator

    public IColumnIterator getMemtableColumnIterator(ColumnFamily cf,
                                                     DecoratedKey<?> key,
                                                     AbstractType comparator)

### getSSTableColumnIterator

    public IColumnIterator getSSTableColumnIterator(SSTableReader sstable)

### getSSTableColumnIterator

    public IColumnIterator getSSTableColumnIterator(SSTableReader sstable,
                                                    FileDataInput file,
                                                    DecoratedKey<?> key)

### collateColumns

    public void collateColumns(ColumnFamily returnCF,
                               java.util.List<? extends CloseableIterator<IColumn>> toCollate,
                               AbstractType comparator,
                               int gcBefore)

### getColumnFamilyName

    public java.lang.String getColumnFamilyName()

### isRelevant

    public static boolean isRelevant(IColumn column,
                                     IColumnContainer container,
                                     int gcBefore)

### getSliceFilter

    public static QueryFilter getSliceFilter(DecoratedKey<?> key,
                                             QueryPath path,
                                             java.nio.ByteBuffer start,
                                             java.nio.ByteBuffer finish,
                                             boolean reversed,
                                             int limit)

  Parameters:
    `path` - path to the level to slice at (CF or SuperColumn)
    `start` - column to start slice at, inclusive; empty for "the first column"
    `finish` - column to stop slice at, inclusive; empty for "the last column"
    `reversed` - true to start with the largest column (as determined by configured sort order) instead of smallest
    `limit` - maximum number of non-deleted columns to return
  Returns:
    a QueryFilter object to satisfy the given slice criteria: @param key the row to slice

### getIdentityFilter

    public static QueryFilter getIdentityFilter(DecoratedKey<?> key,
                                                QueryPath path)

  return a QueryFilter object that includes every column in the row. This is dangerous on large rows; avoid except for test code.

### getNamesFilter

    public static QueryFilter getNamesFilter(DecoratedKey<?> key,
                                             QueryPath path,
                                             java.util.SortedSet<java.nio.ByteBuffer> columns)

  Parameters:
    `key` - the row to slice
    `path` - path to the level to slice at (CF or SuperColumn)
    `columns` - the column names to restrict the results to
  Returns:
    a QueryFilter object that will return columns matching the given names

### getFilter

    public static IFilter getFilter(SlicePredicate predicate,
                                    AbstractType comparator)

### getNamesFilter

    public static QueryFilter getNamesFilter(DecoratedKey<?> key,
                                             QueryPath path,
                                             java.nio.ByteBuffer column)

  convenience method for creating a name filter matching a single column

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation