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

public Class KeywordExpressionStateObject

extends SimpleStateObject
Class Inheritance
Annotations
@SuppressWarnings:nls
Imports
org.eclipse.persistence.jpa.jpql.Assert, org.eclipse.persistence.jpa.jpql.parser.KeywordExpression

The expression representing some keywords: TRUE, FALSE or NULL.
Author
Pascal Filion
Since
2.4
Version
2.4
See Also
KeywordExpression

Field Summary

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject:
TEXT_PROPERTY

Constructor Summary

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

Creates a new KeywordExpressionStateObject.

public
KeywordExpressionStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
String
Either TRUE, FALSE or NULL
text
)

Creates a new KeywordExpressionStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
public KeywordExpression
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 void
setExpression(KeywordExpression
The parsed object representing one of the three possible keyword: TRUE, FALSE or NULL
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.

public void
setText(String
This model's text value
text
)

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject.setText.

Sets the text held by this state object.
protected void
Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject:
getTexthasTextisEquivalentsetTextInternallytoTextInternal

Constructor Detail

KeywordExpressionStateObjectback to summary
public KeywordExpressionStateObject(StateObject parent)

Creates a new KeywordExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
KeywordExpressionStateObjectback to summary
public KeywordExpressionStateObject(StateObject parent, String text)

Creates a new KeywordExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

text:String

Either TRUE, FALSE or NULL

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 KeywordExpression 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:KeywordExpression

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
setExpressionback to summary
public void setExpression(KeywordExpression 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:KeywordExpression

The parsed object representing one of the three possible keyword: TRUE, FALSE or NULL

setTextback to summary
public void setText(String text)

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject.setText.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject.setText.

Sets the text held by this state object.

Parameters
text:String

This model's text value

Annotations
@Override
validateIdentifierback to summary
protected void validateIdentifier(String text)