Class EncapsulatedIdentificationVariableExpressionStateObject
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractEncapsulatedExpressionStateObject
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractSingleEncapsulatedExpressionStateObject
-
- org.eclipse.persistence.jpa.jpql.tools.model.query.EncapsulatedIdentificationVariableExpressionStateObject
-
- All Implemented Interfaces:
StateObject
- Direct Known Subclasses:
EntryExpressionStateObject,IndexExpressionStateObject,KeyExpressionStateObject,ObjectExpressionStateObject,ValueExpressionStateObject
public abstract class EncapsulatedIdentificationVariableExpressionStateObject extends AbstractSingleEncapsulatedExpressionStateObject
This object represents an identification variable that is wrapped by a function.BNF:<identifier>(identification_variable)- Since:
- 2.4
- Version:
- 2.4
- Author:
- Pascal Filion
- See Also:
EncapsulatedIdentificationVariableExpression
-
-
Field Summary
Fields Modifier and Type Field Description static StringIDENTIFICATION_VARIABLE_PROPERTYNotifies the identification variable property has changed.-
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractSingleEncapsulatedExpressionStateObject
STATE_OBJECT_PROPERTY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EncapsulatedIdentificationVariableExpressiongetExpression()Returns the actual parsed object if thisStateObjectrepresentation of the JPQL query was created by parsing an existing JPQL query.StringgetIdentificationVariable()Returns the identification variable.IManagedTypegetManagedType()Returns theIManagedTypeassociated with the field handled by this object.IdentificationVariableStateObjectgetStateObject()Returns the encapsulatedStateObject.ITypegetType()Returns theITypeof the field handled by this object.ITypeDeclarationgetTypeDeclaration()Returns theITypeDeclarationof the field handled by this object.booleanhasIdentificationVariable()Determines whether the identification variable has been defined or not.voidsetIdentificationVariable(String identificationVariable)Sets the identification variable of this encapsulated expression.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractSingleEncapsulatedExpressionStateObject
hasStateObject, isEquivalent, parse
-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractEncapsulatedExpressionStateObject
getIdentifier
-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
addPropertyChangeListener, children, decorate, equals, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, removePropertyChangeListener, setExpression, setParent, toString, toString, toText
-
Methods inherited from interface org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject
accept
-
-
-
-
Field Detail
-
IDENTIFICATION_VARIABLE_PROPERTY
public static final String IDENTIFICATION_VARIABLE_PROPERTY
Notifies the identification variable property has changed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getExpression
public EncapsulatedIdentificationVariableExpression getExpression()
Returns the actual parsed object if thisStateObjectrepresentation of the JPQL query was created by parsing an existing JPQL query.- Specified by:
getExpressionin interfaceStateObject- Overrides:
getExpressionin classAbstractSingleEncapsulatedExpressionStateObject- Returns:
- The parsed object when a JPQL query is parsed and converted into a
StateObjectornullwhen the JPQL query is manually created (i.e. not from a string)
-
getIdentificationVariable
public String getIdentificationVariable()
Returns the identification variable.- Returns:
- The name of the identification variable
-
getManagedType
public IManagedType getManagedType()
Returns theIManagedTypeassociated with the field handled by this object. If this object does not handle a field that has aIManagedType, thennullshould be returned.For example: "
SELECT e FROM Employee e", the object for e would be returning theIManagedTypefor Employee.- Returns:
- Either the
IManagedType, if it could be resolved;nullotherwise
-
getStateObject
public IdentificationVariableStateObject getStateObject()
Returns the encapsulatedStateObject.- Overrides:
getStateObjectin classAbstractSingleEncapsulatedExpressionStateObject- Returns:
- The encapsulated
StateObject
-
getType
public IType getType()
Returns theITypeof the field handled by this object.- Returns:
- Either the
ITypeof the identification variable or theITypeforIType.UNRESOLVABLE_TYPEif it could not be resolved
-
getTypeDeclaration
public ITypeDeclaration getTypeDeclaration()
Returns theITypeDeclarationof the field handled by this object.- Returns:
- Either the
ITypeDeclarationthat was resolved by this object or theITypeDeclarationforIType.UNRESOLVABLE_TYPEif it could not be resolved
-
hasIdentificationVariable
public boolean hasIdentificationVariable()
Determines whether the identification variable has been defined or not.- Returns:
trueif the identification variable has been defined;falseotherwise
-
setIdentificationVariable
public void setIdentificationVariable(String identificationVariable)
Sets the identification variable of this encapsulated expression.- Parameters:
identificationVariable- The name of the identification variable
-
-