org.jpox.store.expression
Class ObjectLiteral

java.lang.Object
  extended byorg.jpox.store.expression.ScalarExpression
      extended byorg.jpox.store.expression.ObjectExpression
          extended byorg.jpox.store.expression.ObjectLiteral
All Implemented Interfaces:
Literal

public class ObjectLiteral
extends ObjectExpression
implements Literal

Representation of an Object literal in a query.

Version:
$Revision: 1.25 $

Nested Class Summary
 
Nested classes inherited from class org.jpox.store.expression.ScalarExpression
ScalarExpression.DyadicOperator, ScalarExpression.ExpressionList, ScalarExpression.FieldExpression, ScalarExpression.IllegalArgumentTypeException, ScalarExpression.IllegalOperationException, ScalarExpression.MethodInvocationException, ScalarExpression.MonadicOperator, ScalarExpression.Operator
 
Field Summary
 
Fields inherited from class org.jpox.store.expression.ObjectExpression
conditionExpr
 
Fields inherited from class org.jpox.store.expression.ScalarExpression
aliasIdentifier, 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_OR, OP_SUB, PROJECTION, qs, st, te
 
Constructor Summary
ObjectLiteral(QueryExpression qs, JavaTypeMapping mapping, java.lang.Object value)
          Creates an Object literal
ObjectLiteral(QueryExpression qs, JavaTypeMapping mapping, java.lang.Object value, java.lang.String mappingClass)
          Creates an Object literal
 
Method Summary
 ScalarExpression accessField(java.lang.String subfieldName, boolean innerJoin)
          Reads a field of an object passed by parameter to the query
 BooleanExpression eq(ScalarExpression expr)
          Method called when the query contains "object == value".
 java.lang.Object getValue()
          Accessor to the literal value
 BooleanExpression noteq(ScalarExpression expr)
          Method called when the query contains "object NOTEQUALS value".
 java.lang.String toString()
           
 
Methods inherited from class org.jpox.store.expression.ObjectExpression
addOuterJoinSuffix, cast, in, instanceOf, setFieldDefinition, useIdentityFormOfPCMapping
 
Methods inherited from class org.jpox.store.expression.ScalarExpression
add, and, as, callMethod, com, div, encloseWithInParentheses, eor, equals, getAlias, getExpressionList, getLogicSetExpression, getMapping, getNonAliasExpression, getQueryExpression, gt, gteq, ior, lt, lteq, mod, mul, neg, not, sub, toStatementText
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectLiteral

public ObjectLiteral(QueryExpression qs,
                     JavaTypeMapping mapping,
                     java.lang.Object value)
Creates an Object literal

Parameters:
qs - the QueryExpression
mapping - the mapping
value - the Object value

ObjectLiteral

public ObjectLiteral(QueryExpression qs,
                     JavaTypeMapping mapping,
                     java.lang.Object value,
                     java.lang.String mappingClass)
Creates an Object literal

Parameters:
qs - the QueryExpression
mapping - the mapping
value - the Object value
mappingClass - the declared mapped class
Method Detail

getValue

public java.lang.Object getValue()
Description copied from interface: Literal
Accessor to the literal value

Specified by:
getValue in interface Literal
Returns:
the value of the literal

eq

public BooleanExpression eq(ScalarExpression expr)
Method called when the query contains "object == value".

Overrides:
eq in class ObjectExpression
Parameters:
expr - The expression
Returns:
The resultant expression for this query relation

noteq

public BooleanExpression noteq(ScalarExpression expr)
Method called when the query contains "object NOTEQUALS value".

Overrides:
noteq in class ObjectExpression
Parameters:
expr - The expression
Returns:
The resultant expression for this query relation

accessField

public ScalarExpression accessField(java.lang.String subfieldName,
                                    boolean innerJoin)
Reads a field of an object passed by parameter to the query

Overrides:
accessField in class ObjectExpression
Parameters:
subfieldName - Name of the subfield
innerJoin - whether to inner join
Returns:
a new ScalarExpression from the field value

toString

public java.lang.String toString()
Overrides:
toString in class ScalarExpression


Copyright © -2007 . All Rights Reserved.