com.nhncorp.neptune.client
Class RowFilter

java.lang.Object
  extended by com.nhncorp.neptune.client.RowFilter
All Implemented Interfaces:
com.nhncorp.neptune.common.io.NWritable

public class RowFilter
extends java.lang.Object
implements com.nhncorp.neptune.common.io.NWritable

RowFilter and CellFilter are normally used to get or scan for complex search condition

 NTable ntable = NTable.openTable(...);
 RowFilter rowFilter = new RowFilter(new Row.Key("rk1"), OP_LIKE);
 CellFilter cellFilter = new CellFilter("Column1");
 cellFilter.setStartTimestamp(Long.MIN_VALUE);
 cellFilter.setEndTimestamp(Long.MAX_VALUE);
 rowFilter.addCellFilter(cellFilter);

 Row[] rows = ntable.gets(rowFilter);
 


Field Summary
static int OP_BETWEEN
           
static int OP_EQ
           
static int OP_LIKE
           
 
Constructor Summary
RowFilter()
           
RowFilter(Row.Key rowKey)
           
RowFilter(Row.Key rowKey, int operation)
           
RowFilter(Row.Key startRowKey, Row.Key endRowKey)
           
RowFilter(Row.Key startRowKey, Row.Key endRowKey, int operation)
           
 
Method Summary
 void addCellFilter(CellFilter cellFilter)
           
 void clearCellFilter()
           
 RowFilter copyRowFilter(java.lang.String columnName)
           
 CellFilter getCellFilterInfo(java.lang.String columnName)
           
 java.util.List<CellFilter> getCellFilters()
           
 java.lang.String[] getColumns()
           
 Row.Key getEndRowKey()
           
 int getOperation()
           
 Row.Key getRowKey()
           
 Row.Key getStartRowKey()
           
static void main(java.lang.String[] args)
           
 void readFields(java.io.DataInput in)
          Reads the fields of this object from in.
 void setEndRowKey(Row.Key endRowKey)
           
 void setRowKey(Row.Key rowKey)
           
 void setStartRowKey(Row.Key startRowKey)
           
 java.lang.String toString()
           
 void write(java.io.DataOutput out)
          Writes the fields of this object to out.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OP_EQ

public static final int OP_EQ
See Also:
Constant Field Values

OP_LIKE

public static final int OP_LIKE
See Also:
Constant Field Values

OP_BETWEEN

public static final int OP_BETWEEN
See Also:
Constant Field Values
Constructor Detail

RowFilter

public RowFilter()

RowFilter

public RowFilter(Row.Key rowKey)

RowFilter

public RowFilter(Row.Key rowKey,
                 int operation)

RowFilter

public RowFilter(Row.Key startRowKey,
                 Row.Key endRowKey)

RowFilter

public RowFilter(Row.Key startRowKey,
                 Row.Key endRowKey,
                 int operation)
Method Detail

getCellFilters

public java.util.List<CellFilter> getCellFilters()
Returns:
the columnFilterInfos

addCellFilter

public void addCellFilter(CellFilter cellFilter)
Parameters:
columnFilter -

getStartRowKey

public Row.Key getStartRowKey()
Returns:
the rowkey

getEndRowKey

public Row.Key getEndRowKey()
Returns:
the rowkey

setStartRowKey

public void setStartRowKey(Row.Key startRowKey)
Parameters:
rowKey -

setEndRowKey

public void setEndRowKey(Row.Key endRowKey)
Parameters:
rowKey -

setRowKey

public void setRowKey(Row.Key rowKey)

getRowKey

public Row.Key getRowKey()

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Description copied from interface: com.nhncorp.neptune.common.io.NWritable
Reads the fields of this object from in. For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface com.nhncorp.neptune.common.io.NWritable
Throws:
java.io.IOException

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Description copied from interface: com.nhncorp.neptune.common.io.NWritable
Writes the fields of this object to out.

Specified by:
write in interface com.nhncorp.neptune.common.io.NWritable
Throws:
java.io.IOException

getColumns

public java.lang.String[] getColumns()

getCellFilterInfo

public CellFilter getCellFilterInfo(java.lang.String columnName)

clearCellFilter

public void clearCellFilter()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

copyRowFilter

public RowFilter copyRowFilter(java.lang.String columnName)

getOperation

public int getOperation()

main

public static void main(java.lang.String[] args)