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

public Class KeyExpressionStateObject

extends EncapsulatedIdentificationVariableExpressionStateObject
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.parser.KeyExpression, org.eclipse.persistence.jpa.jpql.tools.spi.IType, .ITypeDeclaration

This object represents an identification variable that maps the keys of a java.util.Map.

This is part of JPA 2.0.

BNF: KEY(identification_variable)

Author
Pascal Filion
Since
2.4
Version
2.4
See Also
KeyExpression

Field Summary

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

Constructor Summary

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

Creates a new KeyExpressionStateObject.

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

Creates a new KeyExpressionStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
public KeyExpression
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
protected IType
public void
setExpression(KeyExpression
The parsed object representing a KEY 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:
checkIntegrityclearResolvedObjectsgetIdentificationVariablegetManagedTypegetQueryBNFIdgetStateObjectgetTypegetTypeDeclarationhasIdentificationVariableinitializeresolveManagedTyperesolveTypeDeclarationsetIdentificationVariable

Constructor Detail

KeyExpressionStateObjectback to summary
public KeyExpressionStateObject(StateObject parent)

Creates a new KeyExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

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

Creates a new KeyExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

identificationVariable:String

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
getExpressionback to summary
public KeyExpression 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:KeyExpression

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
resolveTypeback to summary
protected IType resolveType()

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

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.EncapsulatedIdentificationVariableExpressionStateObject.resolveType.

Resolves the IType of the property handled by this object.

Returns:IType

Either the IType that was resolved by this object or the IType for IType#UNRESOLVABLE_TYPE if it could not be resolved

Annotations
@Override
setExpressionback to summary
public void setExpression(KeyExpression 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:KeyExpression

The parsed object representing a KEY expression