|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.sql.expression.SQLExpression
org.datanucleus.store.rdbms.sql.expression.ObjectExpression
public class ObjectExpression
Representation of an Object expression in a Query. Typically represents a persistable object, and so its identity, though could be used to represent any Object.
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).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression |
|---|
SQLExpression.ColumnExpressionList |
| Field Summary | |
|---|---|
protected static org.datanucleus.util.Localiser |
LOCALISER_CORE
Localiser for messages |
| Fields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression |
|---|
LOCALISER, lowestOperator, mapping, parameterName, st, stmt, subExprs, table |
| Constructor Summary | |
|---|---|
ObjectExpression(SQLStatement stmt,
SQLTable table,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Constructor for an SQL expression for a (field) mapping in a specified table. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression |
|---|
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, toSQLText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER_CORE
| Constructor Detail |
|---|
public ObjectExpression(SQLStatement stmt,
SQLTable table,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
stmt - The statementtable - The table in the statementmapping - The mapping for the field| Method Detail |
|---|
public 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 expression
public BooleanExpression in(SQLExpression expr,
boolean not)
SQLExpressionexpr
in 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 to
public 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)
SQLExpression
invoke in class SQLExpressionmethodName - name of the method to invokeargs - Args to this method (if any)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||