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

public abstract Class AbstractEncapsulatedExpressionStateObject

extends AbstractStateObject
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractSingleEncapsulatedExpressionStateObject, org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractTripleEncapsulatedExpressionStateObject, org.eclipse.persistence.jpa.jpql.tools.model.query.CoalesceExpressionStateObject, org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractDoubleEncapsulatedExpressionStateObject
Imports
java.io.IOException, org.eclipse.persistence.jpa.jpql.parser.AbstractEncapsulatedExpression

This expression handles parsing the identifier followed by an expression encapsulated within parenthesis.

BNF: expression ::= <identifier>(expression)

Author
Pascal Filion
Since
2.4
Version
2.4
See Also
AbstractEncapsulatedExpression

Constructor Summary

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

Creates a new AbstractEncapsulatedExpressionStateObject.

Method Summary

Modifier and TypeMethod and Description
public AbstractEncapsulatedExpression
getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.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 abstract String

Returns:

The JPQL identifier that is shown before the left parenthesis
getIdentifier
()

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

protected abstract void
toTextEncapsulatedExpression(Appendable
The writer used to print out the string representation of the encapsulated information
writer
)

Prints out a string representation of this encapsulated information, which should not be used to define a true string representation of a JPQL query but should be used for debugging purposes.

protected void
toTextInternal(Appendable
The writer used to print out the string representation
writer
)

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.toTextInternal.

Prints out a string representation of this StateObject, which should not be used to define a true string representation of a JPQL query but should be used for debugging purposes.
Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject:
acceptUnknownVisitoracceptUnknownVisitoraddChildrenaddProblemsaddPropertyChangeListenerareEquivalentbuildProblembuildProblembuildStateObjectbuildStateObjectscheckParentchildrendecorateequalsfindIdentificationVariablefirePropertyChangedgetChangeSupportgetDeclarationgetDecoratorgetGrammargetManagedTypeProvidergetParentgetQueryBuildergetRootgetTypegetTypegetTypeHelpergetTypeRepositoryhashCodeinitializeisDecoratedisEquivalentparentparentparentremovePropertyChangeListenersetExpressionsetParenttoStringtoStringtoStringInternaltoStringItemstoText

Constructor Detail

AbstractEncapsulatedExpressionStateObjectback to summary
protected AbstractEncapsulatedExpressionStateObject(StateObject parent)

Creates a new AbstractEncapsulatedExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null

Method Detail

getExpressionback to summary
public AbstractEncapsulatedExpression getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.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:AbstractEncapsulatedExpression

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 abstract String getIdentifier()

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

Returns:String

The JPQL identifier that is shown before the left parenthesis

toTextEncapsulatedExpressionback to summary
protected abstract void toTextEncapsulatedExpression(Appendable writer) throws IOException

Prints out a string representation of this encapsulated information, which should not be used to define a true string representation of a JPQL query but should be used for debugging purposes.

Parameters
writer:Appendable

The writer used to print out the string representation of the encapsulated information

Exceptions
IOException:
This should never happens, only required because Appendable is used instead of StringBuilder for instance
toTextInternalback to summary
protected void toTextInternal(Appendable writer) throws IOException

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.toTextInternal.

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

Prints out a string representation of this StateObject, which should not be used to define a true string representation of a JPQL query but should be used for debugging purposes.

Parameters
writer:Appendable

The writer used to print out the string representation

Annotations
@Override
Exceptions
IOException:
This should never happens, it is only required because Appendable is used instead of any concrete class