org.datanucleus.store.mapped.expression
Class NewObjectExpression

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

public class NewObjectExpression
extends ScalarExpression

Representation of an expression "new MyObject(param1, param2)" as the result in a JDOQL query.

Version:
$Revision: 1.7 $

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
NewObjectExpression(QueryExpression qs, java.lang.Class cls, java.util.List args)
          Constructor.
 
Method Summary
 java.lang.Object createNewObject(java.lang.Object[] values)
          Method to return the new object using the passed values for the arguments.
 java.util.List getArgumentExpressions()
          Accessor for the constructor argument expressions.
 java.lang.Class getNewClass()
          Accessor for the class of which we should create a new instance.
 
Methods inherited from class org.datanucleus.store.mapped.expression.ScalarExpression
accessField, 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

NewObjectExpression

public NewObjectExpression(QueryExpression qs,
                           java.lang.Class cls,
                           java.util.List args)
Constructor.

Parameters:
qs - The query expression
cls - The class to construct an instance of
args - the constructor args
Method Detail

getNewClass

public java.lang.Class getNewClass()
Accessor for the class of which we should create a new instance.

Returns:
The class

getArgumentExpressions

public java.util.List getArgumentExpressions()
Accessor for the constructor argument expressions.

Returns:
List of constructor argument expressions

createNewObject

public java.lang.Object createNewObject(java.lang.Object[] values)
Method to return the new object using the passed values for the arguments.

Parameters:
values - The values of the arguments
Returns:
The new object


Copyright © 2010. All Rights Reserved.