com.nhncorp.neptune.client
Class RowFilter
java.lang.Object
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);
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
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)
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)