public class SimpleSelectClauseStateObject extends AbstractSelectClauseStateObject
simple_select_clause ::= SELECT [DISTINCT] simple_select_expression
SimpleSelectClause
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SELECT_ITEM_PROPERTY
Notifies the select expression property has changed.
|
DISTINCT_PROPERTY
Constructor and Description |
---|
SimpleSelectClauseStateObject(SimpleSelectStatementStateObject parent)
Creates a new
SubQuerySelectClauseStateObject . |
Modifier and Type | Method and Description |
---|---|
void |
accept(StateObjectVisitor visitor)
Visits this
StateObject by the given visitor . |
ISimpleSelectExpressionStateObjectBuilder |
getBuilder()
Creates and returns a new
ISimpleSelectExpressionStateObjectBuilder that can be used
to programmatically create a single select expression and once the expression is complete,
ISimpleSelectExpressionStateObjectBuilder.commit() will push the StateObject
representation of that expression as this clause's select expression. |
SimpleSelectClause |
getExpression()
Returns the actual parsed object if this
StateObject representation of the JPQL query
was created by parsing an existing JPQL query. |
SimpleFromClauseStateObject |
getFromClause()
Returns the
AbstractFromClauseStateObject representing the FROM clause. |
SimpleSelectStatementStateObject |
getParent()
Returns the parent of this
StateObject . |
StateObject |
getSelectItem()
Returns
|
boolean |
hasSelectItem()
Determines whether this
SELECT clause has a select item defined (only one
can be set for a subquery's SELECT clause and many for a top-level query). |
boolean |
isEquivalent(StateObject stateObject)
Determines whether the given
StateObject is equivalent to this one, i.e. |
void |
parse(java.lang.String jpqlFragment)
Parses the given JPQL fragment and create the select item.
|
void |
setExpression(SimpleSelectClause 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 . |
void |
setSelectItem(StateObject stateObject)
Sets the given
StateObject as this clause's select item. |
hasDistinct, setDistinct, toggleDistinct
addPropertyChangeListener, children, decorate, equals, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, removePropertyChangeListener, setExpression, setParent, toString, toString, toText
public static final java.lang.String SELECT_ITEM_PROPERTY
public SimpleSelectClauseStateObject(SimpleSelectStatementStateObject parent)
SubQuerySelectClauseStateObject
.parent
- The parent of this state object, which cannot be null
java.lang.NullPointerException
- The given parent cannot be null
public void accept(StateObjectVisitor visitor)
StateObject
by the given visitor
.visitor
- The visitor
to visit this objectpublic ISimpleSelectExpressionStateObjectBuilder getBuilder()
ISimpleSelectExpressionStateObjectBuilder
that can be used
to programmatically create a single select expression and once the expression is complete,
ISimpleSelectExpressionStateObjectBuilder.commit()
will push the StateObject
representation of that expression as this clause's select expression.public SimpleSelectClause getExpression()
StateObject
representation of the JPQL query
was created by parsing an existing JPQL query.getExpression
in interface StateObject
getExpression
in class AbstractSelectClauseStateObject
StateObject
or null
when the JPQL query is manually created (i.e. not from a string)public SimpleFromClauseStateObject getFromClause()
AbstractFromClauseStateObject
representing the FROM clause.getFromClause
in class AbstractSelectClauseStateObject
public SimpleSelectStatementStateObject getParent()
StateObject
.getParent
in interface StateObject
getParent
in class AbstractSelectClauseStateObject
StateObject
, which is null
only when
this is the root of the hierarchypublic StateObject getSelectItem()
public boolean hasSelectItem()
SELECT
clause has a select item defined (only one
can be set for a subquery's SELECT
clause and many for a top-level query).hasSelectItem
in class AbstractSelectClauseStateObject
true
if this state object has children; false
otherwisepublic boolean isEquivalent(StateObject stateObject)
StateObject
is equivalent to this one, i.e. the
information of both StateObject
is the same.isEquivalent
in interface StateObject
isEquivalent
in class AbstractSelectClauseStateObject
stateObject
- The StateObject
to compare its content to this onetrue
if both object are equivalent; false
otherwisepublic void parse(java.lang.String jpqlFragment)
parse
in class AbstractSelectClauseStateObject
jpqlFragment
- The portion of the query representing one or several select itemspublic void setExpression(SimpleSelectClause expression)
parsed object
object, which should only be
done when this object is instantiated during the conversion of a parsed JPQL query into
StateObjects
.expression
- The parsed object
representing a subquery
SELECT
clausepublic void setSelectItem(StateObject stateObject)
StateObject
as this clause's select item.stateObject
- The StateObject
representing the single select itemEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference