org.datanucleus.store.db4o.query
Class QueryToSODAMapper

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

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

Class which maps a compiled query to a db4o SODA query. Utilises the filter and ordering components of the java query and adds them to the underlying SODA query. All other components are not handled here and instead processed by in-memory evaluator.


Field Summary
protected static org.datanucleus.util.Localiser LOCALISER_DB4O
          Localiser for messages.
 
Constructor Summary
QueryToSODAMapper(com.db4o.query.Query query, org.datanucleus.query.compiler.QueryCompilation compilation, java.util.Map parameters)
          Constructor.
 
Method Summary
 void compile()
           
protected  java.lang.Object processAndExpression(org.datanucleus.query.expression.Expression expr)
          Method to process the supplied AND expression.
protected  java.lang.Object processEqExpression(org.datanucleus.query.expression.Expression expr)
          Method to process the supplied EQ expression.
protected  java.lang.Object processGteqExpression(org.datanucleus.query.expression.Expression expr)
          Method to process the supplied GTEQ expression.
protected  java.lang.Object processGtExpression(org.datanucleus.query.expression.Expression expr)
          Method to process the supplied GT expression.
protected  java.lang.Object processInvokeExpression(org.datanucleus.query.expression.InvokeExpression expr)
          Method to process the supplied invoke expression.
protected  java.lang.Object processLiteral(org.datanucleus.query.expression.Literal expr)
          Method to process the supplied invoke expression.
protected  java.lang.Object processLteqExpression(org.datanucleus.query.expression.Expression expr)
          Method to process the supplied LTEQ expression.
protected  java.lang.Object processLtExpression(org.datanucleus.query.expression.Expression expr)
          Method to process the supplied LT expression.
protected  java.lang.Object processNoteqExpression(org.datanucleus.query.expression.Expression expr)
          Method to process the supplied NOTEQ expression.
protected  java.lang.Object processOrExpression(org.datanucleus.query.expression.Expression expr)
          Method to process the supplied OR expression.
protected  java.lang.Object processParameterExpression(org.datanucleus.query.expression.ParameterExpression expr)
          Method to process the supplied parameter expression.
protected  java.lang.Object processPrimaryExpression(org.datanucleus.query.expression.PrimaryExpression expr)
          Method to process the supplied primary expression.
 
Methods inherited from class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
compileAdditiveMultiplicativeExpression, compileOrAndExpression, compilePrimaryExpression, compileRelationalExpression, compileUnaryExpression, evaluate, processAddExpression, processCastExpression, processComExpression, processCreatorExpression, processDistinctExpression, processDivExpression, processInExpression, processIsExpression, processIsnotExpression, processLikeExpression, processModExpression, processMulExpression, processNegExpression, processNotExpression, processSubExpression, processSubqueryExpression, processVariableExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER_DB4O

protected static final org.datanucleus.util.Localiser LOCALISER_DB4O
Localiser for messages.

Constructor Detail

QueryToSODAMapper

public QueryToSODAMapper(com.db4o.query.Query query,
                         org.datanucleus.query.compiler.QueryCompilation compilation,
                         java.util.Map parameters)
Constructor.

Parameters:
query - SODA query to be updated with the filter/ordering
compilation - The generic query compilation
parameters - Parameters needed
Method Detail

compile

public void compile()

processOrExpression

protected java.lang.Object processOrExpression(org.datanucleus.query.expression.Expression expr)
Method to process the supplied OR expression.

Overrides:
processOrExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processAndExpression

protected java.lang.Object processAndExpression(org.datanucleus.query.expression.Expression expr)
Method to process the supplied AND expression.

Overrides:
processAndExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processEqExpression

protected java.lang.Object processEqExpression(org.datanucleus.query.expression.Expression expr)
Method to process the supplied EQ expression.

Overrides:
processEqExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processNoteqExpression

protected java.lang.Object processNoteqExpression(org.datanucleus.query.expression.Expression expr)
Method to process the supplied NOTEQ expression.

Overrides:
processNoteqExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processGtExpression

protected java.lang.Object processGtExpression(org.datanucleus.query.expression.Expression expr)
Method to process the supplied GT expression.

Overrides:
processGtExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processLtExpression

protected java.lang.Object processLtExpression(org.datanucleus.query.expression.Expression expr)
Method to process the supplied LT expression.

Overrides:
processLtExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processGteqExpression

protected java.lang.Object processGteqExpression(org.datanucleus.query.expression.Expression expr)
Method to process the supplied GTEQ expression.

Overrides:
processGteqExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processLteqExpression

protected java.lang.Object processLteqExpression(org.datanucleus.query.expression.Expression expr)
Method to process the supplied LTEQ expression.

Overrides:
processLteqExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processPrimaryExpression

protected java.lang.Object processPrimaryExpression(org.datanucleus.query.expression.PrimaryExpression expr)
Method to process the supplied primary expression.

Overrides:
processPrimaryExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processParameterExpression

protected java.lang.Object processParameterExpression(org.datanucleus.query.expression.ParameterExpression expr)
Method to process the supplied parameter expression.

Overrides:
processParameterExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processInvokeExpression

protected java.lang.Object processInvokeExpression(org.datanucleus.query.expression.InvokeExpression expr)
Method to process the supplied invoke expression.

Overrides:
processInvokeExpression in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result

processLiteral

protected java.lang.Object processLiteral(org.datanucleus.query.expression.Literal expr)
Method to process the supplied invoke expression.

Overrides:
processLiteral in class org.datanucleus.query.evaluator.AbstractExpressionEvaluator
Parameters:
expr - The expression
Returns:
The result


Copyright © 2010. All Rights Reserved.