public class ObjectExpression extends SQLExpression
Let's take an example. We have classes A and B, and A contains a reference to B "b". If we do a JDOQL query for class A of "b == value" then "b" is interpreted first and an ObjectExpression is created to represent that object (of type B).
SQLExpression.ColumnExpressionList| Modifier and Type | Field and Description |
|---|---|
protected static org.datanucleus.util.Localiser |
LOCALISER_CORE
Localiser for messages
|
LOCALISER, lowestOperator, mapping, parameterName, st, stmt, subExprs, table| Constructor and Description |
|---|
ObjectExpression(SQLStatement stmt,
SQLTable table,
JavaTypeMapping mapping)
Constructor for an SQL expression for a (field) mapping in a specified table.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSubexpressionsToRelatedExpression(SQLExpression expr)
Updates the supplied expression with sub-expressions of consistent types to this expression.
|
SQLExpression |
cast(SQLExpression expr)
Cast operator.
|
BooleanExpression |
eq(SQLExpression expr)
Equals operator.
|
BooleanExpression |
in(SQLExpression expr,
boolean not)
In expression.
|
SQLExpression |
invoke(String methodName,
List args)
Invocation of a method on this expression.
|
BooleanExpression |
is(SQLExpression expr,
boolean not)
An "is" (instanceOf) expression, providing a BooleanExpression whether this expression
is an instanceof the provided type.
|
BooleanExpression |
ne(SQLExpression expr)
Not equals operator.
|
protected BooleanExpression |
processComparisonOfImplementationWithReference(SQLExpression refExpr,
SQLExpression implExpr,
boolean negate) |
void |
useFirstColumnOnly()
Method to change the expression to use only the first column.
|
add, and, com, distinct, div, encloseInParentheses, eor, ge, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, gt, ior, isParameter, le, lt, mod, mul, neg, not, setJavaTypeMapping, sub, toSQLTextprotected static final org.datanucleus.util.Localiser LOCALISER_CORE
public ObjectExpression(SQLStatement stmt, SQLTable table, JavaTypeMapping mapping)
stmt - The statementtable - The table in the statementmapping - The mapping for the fieldpublic void useFirstColumnOnly()
public BooleanExpression eq(SQLExpression expr)
eq in class SQLExpressionexpr - The expression we compare with (the right-hand-side in the query)protected BooleanExpression processComparisonOfImplementationWithReference(SQLExpression refExpr, SQLExpression implExpr, boolean negate)
public BooleanExpression ne(SQLExpression expr)
ne in class SQLExpressionexpr - The expression we compare with (the right-hand-side in the query)protected void addSubexpressionsToRelatedExpression(SQLExpression expr)
expr - The expressionpublic BooleanExpression in(SQLExpression expr, boolean not)
SQLExpressionexprin in class SQLExpressionexpr - the right-hand expressionnot - Whether we really want "not in"public SQLExpression cast(SQLExpression expr)
cast in class SQLExpressionexpr - Expression representing the type to cast topublic BooleanExpression is(SQLExpression expr, boolean not)
is in class SQLExpressionexpr - The expression representing the typenot - Whether the operator is "!instanceof"public SQLExpression invoke(String methodName, List args)
SQLExpressioninvoke in class SQLExpressionmethodName - name of the method to invokeargs - Args to this method (if any)Copyright © 2013. All Rights Reserved.