org.datanucleus.store.hbase.query
Class QueryToHBaseMapper

java.lang.Object
  extended by org.datanucleus.query.evaluator.AbstractExpressionEvaluator
      extended by org.datanucleus.store.hbase.query.QueryToHBaseMapper
All Implemented Interfaces:
org.datanucleus.query.expression.ExpressionEvaluator

public class QueryToHBaseMapper
extends org.datanucleus.query.evaluator.AbstractExpressionEvaluator

Class which maps a compiled (generic) query to a HBase query.


Constructor Summary
QueryToHBaseMapper(org.datanucleus.query.compiler.QueryCompilation compilation, java.util.Map parameters, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.store.ExecutionContext ec, org.datanucleus.store.query.Query q)
           
 
Method Summary
 void compile()
           
protected  void compileFilter()
          Method to compile the WHERE clause of the query
protected  java.lang.String getFamilyColumnNameForPrimary(java.util.List<java.lang.String> tuples)
          Convenience method to return the "{familyName}###{columnName}" in candidate for this primary.
 org.apache.hadoop.hbase.filter.Filter getFilter()
           
 boolean isFilterComplete()
           
 boolean isPrecompilable()
          Accessor for whether the query is precompilable (doesn't need to know parameter values to be able to compile it).
protected  java.lang.Object processAndExpression(org.datanucleus.query.expression.Expression expr)
           
protected  java.lang.Object processEqExpression(org.datanucleus.query.expression.Expression expr)
           
protected  java.lang.Object processGteqExpression(org.datanucleus.query.expression.Expression expr)
           
protected  java.lang.Object processGtExpression(org.datanucleus.query.expression.Expression expr)
           
protected  java.lang.Object processLiteral(org.datanucleus.query.expression.Literal expr)
           
protected  java.lang.Object processLteqExpression(org.datanucleus.query.expression.Expression expr)
           
protected  java.lang.Object processLtExpression(org.datanucleus.query.expression.Expression expr)
           
protected  java.lang.Object processNoteqExpression(org.datanucleus.query.expression.Expression expr)
           
protected  java.lang.Object processOrExpression(org.datanucleus.query.expression.Expression expr)
           
protected  java.lang.Object processParameterExpression(org.datanucleus.query.expression.ParameterExpression expr)
           
protected  java.lang.Object processPrimaryExpression(org.datanucleus.query.expression.PrimaryExpression expr)
           
 
Methods inherited from class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
compileAdditiveMultiplicativeExpression, compileOrAndExpression, compilePrimaryExpression, compileRelationalExpression, compileUnaryExpression, evaluate, processAddExpression, processCaseExpression, processCastExpression, processComExpression, processCreatorExpression, processDistinctExpression, processDivExpression, processInExpression, processInvokeExpression, processIsExpression, processIsnotExpression, processLikeExpression, processModExpression, processMulExpression, processNegExpression, processNotExpression, processNotInExpression, processSubExpression, processSubqueryExpression, processVariableExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryToHBaseMapper

public QueryToHBaseMapper(org.datanucleus.query.compiler.QueryCompilation compilation,
                          java.util.Map parameters,
                          org.datanucleus.metadata.AbstractClassMetaData cmd,
                          org.datanucleus.store.ExecutionContext ec,
                          org.datanucleus.store.query.Query q)
Method Detail

isFilterComplete

public boolean isFilterComplete()

getFilter

public org.apache.hadoop.hbase.filter.Filter getFilter()

compile

public void compile()

isPrecompilable

public boolean isPrecompilable()
Accessor for whether the query is precompilable (doesn't need to know parameter values to be able to compile it).

Returns:
Whether the query is precompilable and hence cacheable

compileFilter

protected void compileFilter()
Method to compile the WHERE clause of the query


processOrExpression

protected java.lang.Object processOrExpression(org.datanucleus.query.expression.Expression expr)
Overrides:
processOrExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processAndExpression

protected java.lang.Object processAndExpression(org.datanucleus.query.expression.Expression expr)
Overrides:
processAndExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processEqExpression

protected java.lang.Object processEqExpression(org.datanucleus.query.expression.Expression expr)
Overrides:
processEqExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processNoteqExpression

protected java.lang.Object processNoteqExpression(org.datanucleus.query.expression.Expression expr)
Overrides:
processNoteqExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processGtExpression

protected java.lang.Object processGtExpression(org.datanucleus.query.expression.Expression expr)
Overrides:
processGtExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processLtExpression

protected java.lang.Object processLtExpression(org.datanucleus.query.expression.Expression expr)
Overrides:
processLtExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processGteqExpression

protected java.lang.Object processGteqExpression(org.datanucleus.query.expression.Expression expr)
Overrides:
processGteqExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processLteqExpression

protected java.lang.Object processLteqExpression(org.datanucleus.query.expression.Expression expr)
Overrides:
processLteqExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processPrimaryExpression

protected java.lang.Object processPrimaryExpression(org.datanucleus.query.expression.PrimaryExpression expr)
Overrides:
processPrimaryExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processParameterExpression

protected java.lang.Object processParameterExpression(org.datanucleus.query.expression.ParameterExpression expr)
Overrides:
processParameterExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

processLiteral

protected java.lang.Object processLiteral(org.datanucleus.query.expression.Literal expr)
Overrides:
processLiteral in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator

getFamilyColumnNameForPrimary

protected java.lang.String getFamilyColumnNameForPrimary(java.util.List<java.lang.String> tuples)
Convenience method to return the "{familyName}###{columnName}" in candidate for this primary. Allows for non-relation fields, and (nested) embedded PC fields - i.e all fields that are present in the table.

Parameters:
tuples - Tuples for the primary
Returns:
The family+column name for this primary (or null if not resolvable in this document)


Copyright © 2012. All Rights Reserved.