Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools.model.query

public Class ObjectExpressionStateObject

extends EncapsulatedIdentificationVariableExpressionStateObject
Class Inheritance
Imports
java.util.List, org.eclipse.persistence.jpa.jpql.parser.ObjectExpression, org.eclipse.persistence.jpa.jpql.tools.model.Problem

Stand-alone identification variables in the SELECT clause may optionally be qualified by the OBJECT operator. The SELECT clause must not use the OBJECT operator to qualify path expressions.

BNF: expression ::= OBJECT(identification_variable)

Author
Pascal Filion
Since
2.4
Version
2.4
See Also
ObjectExpression

Field Summary

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.EncapsulatedIdentificationVariableExpressionStateObject:
IDENTIFICATION_VARIABLE_PROPERTY

Constructor Summary

AccessConstructor and Description
public
ObjectExpressionStateObject(StateObject
The parent of this state object, which cannot be null
parent
)

Creates a new ObjectExpressionStateObject.

public
ObjectExpressionStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
String
The name of the identification variable
identificationVariable
)

Creates a new ObjectExpressionStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
protected void
addProblems(List<Problem>
The list to which the problems are added
problems
)

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.addProblems.

Adds to the given list the problems that were found with the current state of this StateObject, which means there are validation issues.
public ObjectExpression
getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.EncapsulatedIdentificationVariableExpressionStateObject.getExpression.

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getExpression.

Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.
public String
public void
setExpression(ObjectExpression
The parsed object representing an OBJECT expression
expression
)

Keeps a reference of the parsed object object, which should only be done when this object is instantiated during the conversion of a parsed JPQL query into StateObjects.

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.EncapsulatedIdentificationVariableExpressionStateObject:
checkIntegrityclearResolvedObjectsgetIdentificationVariablegetManagedTypegetQueryBNFIdgetStateObjectgetTypegetTypeDeclarationhasIdentificationVariableinitializeresolveManagedTyperesolveTyperesolveTypeDeclarationsetIdentificationVariable

Constructor Detail

ObjectExpressionStateObjectback to summary
public ObjectExpressionStateObject(StateObject parent)

Creates a new ObjectExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
ObjectExpressionStateObjectback to summary
public ObjectExpressionStateObject(StateObject parent, String identificationVariable)

Creates a new ObjectExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

identificationVariable:String

The name of the identification variable

Exceptions
NullPointerException:
The given parent cannot be null

Method Detail

acceptback to summary
public void accept(StateObjectVisitor visitor)

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.accept.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.accept.

Visits this StateObject by the given visitor.

Parameters
visitor:StateObjectVisitor

The visitor to visit this object

Annotations
@Override
addProblemsback to summary
protected void addProblems(List<Problem> problems)

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.addProblems.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.addProblems.

Adds to the given list the problems that were found with the current state of this StateObject, which means there are validation issues.

Parameters
problems:List<Problem>

The list to which the problems are added

Annotations
@Override
getExpressionback to summary
public ObjectExpression getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.EncapsulatedIdentificationVariableExpressionStateObject.getExpression.

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getExpression.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getExpression.

Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.

Returns:ObjectExpression

The parsed object when a JPQL query is parsed and converted into a StateObject or null when the JPQL query is manually created (i.e. not from a string)

Annotations
@Override
getIdentifierback to summary
public String getIdentifier()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractEncapsulatedExpressionStateObject.getIdentifier.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractEncapsulatedExpressionStateObject.getIdentifier.

Returns the JPQL identifier of the expression represented by this AbstractSingleEncapsulatedExpressionStateObject.

Returns:String

The JPQL identifier that is shown before the left parenthesis

Annotations
@Override
setExpressionback to summary
public void setExpression(ObjectExpression expression)

Keeps a reference of the parsed object object, which should only be done when this object is instantiated during the conversion of a parsed JPQL query into StateObjects.

Parameters
expression:ObjectExpression

The parsed object representing an OBJECT expression