org.datanucleus.store.mapped.expression
Class ClassExpression
java.lang.Object
org.datanucleus.store.mapped.expression.ScalarExpression
org.datanucleus.store.mapped.expression.ClassExpression
public class ClassExpression
- extends ScalarExpression
An expression representing a class.
This is used as follows :-
- JDOQL : access public static final fields. Here we invoke accessField on the ClassExpression.
- JDOQL : use the "instanceof" operator. Here we invoke instanceOf on an ObjectExpression pass in a ClassExpression
- JPQL : process the FROM candidates so each candidate is a ClassExpression.
Here we set the join(s) for later processing
| 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 |
| 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 |
ClassExpression
public ClassExpression(QueryExpression qs,
java.lang.Class cls)
- Constructor.
- Parameters:
qs - The Query Statementcls - The class
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 fieldinnerJoin - 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.