|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject org.eclipse.persistence.jpa.jpql.model.query.AbstractSelectClauseStateObject
public abstract class AbstractSelectClauseStateObject
This state object represents the abstract definition of a SELECT
clause,
which is either the SELECT
clause of the top-level query or of a subquery.
AbstractSelectStatementStateObject
,
SelectClauseStateObject
,
SubQuerySelectClauseStateObject
,
AbstractSelectClause
Field Summary | |
---|---|
static java.lang.String |
DISTINCT_PROPERTY
Notifies the distinct property has changed. |
Constructor Summary | |
---|---|
protected |
AbstractSelectClauseStateObject(AbstractSelectStatementStateObject parent)
Creates a new AbstractSelectClauseStateObject . |
Method Summary | |
---|---|
AbstractSelectClause |
getExpression()
Returns the actual parsed object if this StateObject representation of the JPQL query
was created by parsing an existing JPQL query. |
AbstractFromClauseStateObject |
getFromClause()
Returns the AbstractFromClauseStateObject representing the FROM clause. |
AbstractSelectStatementStateObject |
getParent()
Returns the parent of this StateObject . |
boolean |
hasDistinct()
Sets whether the DISTINCT keyword should be part of the query, which is used to
return only distinct (different) values |
abstract 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. the
information of both StateObject is the same. |
abstract void |
parse(java.lang.String jpqlFragment)
Parses the given JPQL fragment and create the select item. |
void |
setDistinct(boolean distinct)
Sets whether the DISTINCT keyword should be part of the query, which is used to
return only distinct (different) values |
void |
toggleDistinct()
Changes the state of the DISTINCT identifier; either adds it if it's not
present or removes it if it's present. |
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject |
---|
acceptUnknownVisitor, acceptUnknownVisitor, addChildren, addProblems, addPropertyChangeListener, areEquivalent, buildProblem, buildProblem, buildStateObject, buildStateObjects, checkParent, children, decorate, equals, findIdentificationVariable, firePropertyChanged, getChangeSupport, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, initialize, isDecorated, parent, parent, parent, removePropertyChangeListener, setExpression, setParent, toString, toString, toStringInternal, toStringItems, toText, toTextInternal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.persistence.jpa.jpql.model.query.StateObject |
---|
accept |
Field Detail |
---|
public static final java.lang.String DISTINCT_PROPERTY
Constructor Detail |
---|
protected AbstractSelectClauseStateObject(AbstractSelectStatementStateObject parent)
AbstractSelectClauseStateObject
.
parent
- The parent of this state object, which cannot be null
java.lang.NullPointerException
- The given parent cannot be null
Method Detail |
---|
public AbstractSelectClause getExpression()
StateObject
representation of the JPQL query
was created by parsing an existing JPQL query.
getExpression
in interface StateObject
getExpression
in class AbstractStateObject
StateObject
or null
when the JPQL query is manually created (i.e. not from a string)public AbstractFromClauseStateObject getFromClause()
AbstractFromClauseStateObject
representing the FROM clause.
public AbstractSelectStatementStateObject getParent()
StateObject
.
getParent
in interface StateObject
getParent
in class AbstractStateObject
StateObject
, which is null
only when
this is the root of the hierarchypublic boolean hasDistinct()
DISTINCT
keyword should be part of the query, which is used to
return only distinct (different) values
distinct
- true
to add DISTINCT
to the query in order to have
distinct values; false
if it is not requiredpublic abstract 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).
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 AbstractStateObject
stateObject
- The StateObject
to compare its content to this one
true
if both object are equivalent; false
otherwisepublic abstract void parse(java.lang.String jpqlFragment)
jpqlFragment
- The portion of the query representing one or several select itemspublic void setDistinct(boolean distinct)
DISTINCT
keyword should be part of the query, which is used to
return only distinct (different) values
distinct
- true
to add DISTINCT
to the query in order to have
distinct values; false
if it is not requiredpublic void toggleDistinct()
DISTINCT
identifier; either adds it if it's not
present or removes it if it's present.
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |