org.apache.hadoop.hbase.rest.filter
Class RowFilterSetFactory

java.lang.Object
  extended by org.apache.hadoop.hbase.rest.filter.RowFilterSetFactory
All Implemented Interfaces:
FilterFactory, FilterFactoryConstants

public class RowFilterSetFactory
extends Object
implements FilterFactory

Constructs a RowFilterSet from a JSON argument String. Assumes that the input is a JSONArray consisting of JSON Object version of the filters that you wish to mash together in an AND statement. The Syntax for the individual inner filters are defined by their respective FilterFactory. If a filter factory for said Factory does not exist, a MalformedFilterJSONException will be thrown. Currently OR Statements are not supported even though at a later iteration they could be supported easily.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.rest.filter.FilterFactoryConstants
FilterFactoryConstants.MalformedFilterException
 
Field Summary
 
Fields inherited from interface org.apache.hadoop.hbase.rest.filter.FilterFactoryConstants
ARGUMENTS, COLUMN_NAME, COMPARE_OP, TYPE, VALUE
 
Constructor Summary
RowFilterSetFactory()
           
 
Method Summary
 RowFilterInterface getFilterFromJSON(String args)
           
protected  RowFilterInterface getRowFilter(org.json.JSONObject filter)
          A refactored method that encapsulates the creation of a RowFilter given a JSONObject with a correct form of: { "type" : "MY_TYPE", "args" : MY_ARGS, }
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowFilterSetFactory

public RowFilterSetFactory()
Method Detail

getFilterFromJSON

public RowFilterInterface getFilterFromJSON(String args)
                                     throws HBaseRestException
Specified by:
getFilterFromJSON in interface FilterFactory
Throws:
HBaseRestException

getRowFilter

protected RowFilterInterface getRowFilter(org.json.JSONObject filter)
                                   throws HBaseRestException
A refactored method that encapsulates the creation of a RowFilter given a JSONObject with a correct form of: { "type" : "MY_TYPE", "args" : MY_ARGS, }

Parameters:
filter -
Returns:
RowFilter
Throws:
HBaseRestException


Copyright © 2009 The Apache Software Foundation