org.datanucleus.store.mapped.expression
Class ClassExpression

java.lang.Object
  extended by org.datanucleus.store.mapped.expression.ScalarExpression
      extended by org.datanucleus.store.mapped.expression.ClassExpression

public class ClassExpression
extends ScalarExpression

An expression representing a class. This is used as follows :-


Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
ScalarExpression.DatastoreFieldExpression, ScalarExpression.DyadicOperator, ScalarExpression.ExpressionList, ScalarExpression.IllegalArgumentTypeException, ScalarExpression.IllegalOperationException, ScalarExpression.MethodInvocationException, ScalarExpression.MonadicOperator, ScalarExpression.Operator
 
Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
aliasIdentifier, checkForTypeAssignability, expressionList, FILTER, LOCALISER, lowestOperator, mapping, OP_ADD, OP_AND, OP_BETWEEN, OP_COM, OP_CONCAT, OP_DIV, OP_EQ, OP_GT, OP_GTEQ, OP_IN, OP_IS, OP_ISNOT, OP_LIKE, OP_LT, OP_LTEQ, OP_MOD, OP_MUL, OP_NEG, OP_NOT, OP_NOTEQ, OP_NOTIN, OP_NOTLIKE, OP_OR, OP_SUB, parameterName, PROJECTION, qs, st, te
 
Constructor Summary
ClassExpression(QueryExpression qs, java.lang.Class cls)
          Constructor.
 
Method Summary
 ScalarExpression accessField(java.lang.String fieldName, boolean innerJoin)
          Method called when wanting to call public static final methods on the class.
 java.lang.Class getCls()
          Accessor for the class being represented.
 JoinExpression[] getJoins()
          Accessor for the join expression(s) for this class.
 ScalarExpression join(JoinExpression expr)
          Method to add a join expression for this class.
 
Methods inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
add, and, as, assertValidTypeForParameterComparison, callMethod, cast, checkForTypeAssignability, com, div, encloseWithInParentheses, eor, eq, equals, getAlias, getConsistentTypeForParameterComparison, getExpressionList, getLogicSetExpression, getMapping, getNonAliasExpression, getQueryExpression, gt, gteq, in, instanceOf, ior, lt, lteq, mod, mul, neg, not, noteq, setParameterName, sub, toStatementText, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassExpression

public ClassExpression(QueryExpression qs,
                       java.lang.Class cls)
Constructor.

Parameters:
qs - The Query Statement
cls - The class
Method Detail

getCls

public java.lang.Class getCls()
Accessor for the class being represented.

Returns:
The class

accessField

public ScalarExpression accessField(java.lang.String fieldName,
                                    boolean innerJoin)
Method called when wanting to call public static final methods on the class.

Overrides:
accessField in class ScalarExpression
Parameters:
fieldName - Name of the public static final field
innerJoin - Not used
Returns:
Expression for the field access

join

public ScalarExpression join(JoinExpression expr)
Method to add a join expression for this class.

Parameters:
expr - Expression to join to
Returns:
This expression

getJoins

public JoinExpression[] getJoins()
Accessor for the join expression(s) for this class.

Returns:
Join expressions


Copyright © 2010. All Rights Reserved.