|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) E28847-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
org.eclipse.persistence.jpa.internal.jpql.parser.StringExpression
org.eclipse.persistence.jpa.internal.jpql.parser.AbstractExpression
org.eclipse.persistence.jpa.internal.jpql.parser.AbstractSelectStatement
public abstract class AbstractSelectStatement
A select statement must always have a SELECT and a FROM clause.
SelectStatement, SimpleSelectStatement| Field Summary | |
|---|---|
private AbstractExpression |
fromClauseThe FROM clause of this select statement. |
private AbstractExpression |
groupByClauseThe GROUP BY clause of this select statement. |
private boolean |
hasSpaceAfterFromDetermines whether there is a whitespace after the identifier FROM. |
private boolean |
hasSpaceAfterGroupByDetermines whether there is a whitespace after the identifier GROUP BY. |
private boolean |
hasSpaceAfterSelectDetermines whether there is a whitespace after the identifier SELECT. |
private boolean |
hasSpaceAfterWhereDetermines whether there is a whitespace after the identifier WHERE. |
private AbstractExpression |
havingClauseThe HAVING clause of this select statement. |
private AbstractSelectClause |
selectClauseThe SELECT clause of this select statement. |
private AbstractExpression |
whereClauseThe WHERE clause of this select statement. |
| Fields inherited from class org.eclipse.persistence.jpa.internal.jpql.parser.AbstractExpression |
|---|
COMMA, DOT, DOUBLE_QUOTE, LEFT_CURLY_BRACKET, LEFT_PARENTHESIS, NOT_DEFINED, RIGHT_CURLY_BRACKET, RIGHT_PARENTHESIS, SINGLE_QUOTE, SPACE, UNDERSCORE |
| Constructor Summary | |
|---|---|
AbstractSelectStatement(AbstractExpression parent)Creates a new AbstractSelectStatement. |
|
| Method Summary | |
|---|---|
void |
acceptChildren(ExpressionVisitor visitor)Visits the children of this Expression. |
(package private) void |
addChildrenTo(java.util.Collection<Expression> children)Adds the children of this Expression to the given collection. |
AbstractFromClause |
addFromClause()Manually adds the FROM clause to this SELECT statement. |
(package private) void |
addOrderedChildrenTo(java.util.List<StringExpression> children)Adds the StringExpressions representing this Expression. |
SelectClause |
addSelectClause()Sets the query statement to be a select clause. |
(package private) WhereClause |
addWhereClause()Manually adds an empty WHERE clause. |
(package private) abstract AbstractFromClause |
buildFromClause()Creates the expression representing the from clause of this select statement. |
(package private) abstract AbstractSelectClause |
buildSelectClause()Creates the expression representing the select clause of this select statement. |
Expression |
getFromClause()Returns the Expression representing the FROM clause. |
Expression |
getGroupByClause()Returns the Expression representing the GROUP BY clause. |
Expression |
getHavingClause()Returns the Expression representing the HAVING clause. |
AbstractSelectClause |
getSelectClause()Returns the AbstractSelectClause representing the SELECT clause. |
Expression |
getWhereClause()Returns the Expression representing the WHERE clause. |
boolean |
hasFromClause()Determines whether the FROM clause is defined. |
boolean |
hasGroupByClause()Determines whether the GROUP BY clause is defined. |
boolean |
hasHavingClause()Determines whether the HAVING clause is defined. |
boolean |
hasSpaceAfterFrom()Determines whether a whitespace was found after the FROM clause. |
boolean |
hasSpaceAfterGroupBy()Determines whether a whitespace was found after the GROUP BY clause. |
boolean |
hasSpaceAfterSelect()Determines whether a whitespace was found after the SELECT clause. |
boolean |
hasSpaceAfterWhere()Determines whether a whitespace was found after the WHERE clause. |
boolean |
hasWhereClause()Determines whether the WHERE clause is defined. |
(package private) void |
parse(WordParser wordParser, boolean tolerant)Parses the query by starting at the current position, which is part of the given WordParser. |
(package private) boolean |
shouldManageSpaceAfterClause()Determines whether |
(package private) void |
toParsedText(java.lang.StringBuilder writer, boolean includeVirtual)Generates a string representation of this Expression. |
| Methods inherited from class org.eclipse.persistence.jpa.internal.jpql.parser.AbstractExpression |
|---|
buildExpressionFromFallingBack, buildNullExpression, buildStringExpression, buildStringExpression, buildUnknownExpression, children, expressionFactory, expressionFactoryForIdentifier, findQueryBNF, getChildren, getJPAVersion, getParent, getQueryBNF, getRoot, getText, handleAggregate, identifierRole, identifiers, identifiers, identifierVersion, isAncestor, isIdentifier, isNull, isParsingComplete, isTolerant, isUnknown, isVirtual, orderedChildren, parse, parseSingleExpression, populatePosition, queryBNF, readdLeadingSpaces, rebuildActualText, rebuildParsedText, setParent, setText, shouldParseWithFactoryFirst, shouldSkipLiteral, toActualText, toParsedText, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.persistence.jpa.internal.jpql.parser.Expression |
|---|
accept |
| Field Detail |
|---|
private AbstractExpression fromClause
private AbstractExpression groupByClause
private boolean hasSpaceAfterFrom
private boolean hasSpaceAfterGroupBy
private boolean hasSpaceAfterSelect
private boolean hasSpaceAfterWhere
private AbstractExpression havingClause
private AbstractSelectClause selectClause
private AbstractExpression whereClause
| Constructor Detail |
|---|
AbstractSelectStatement(AbstractExpression parent)
AbstractSelectStatement.
parent - The parent of this expression| Method Detail |
|---|
public void acceptChildren(ExpressionVisitor visitor)
Expression. This method can be used to optimize traversing the children since a new list is not created every time Expression.children() or Expression.getChildren() is called.
This does not traverse the Expression sub-hierarchy, use an subclass of AbstractTraverseChildrenVisitor in order to traverse the entire sub-hierarchy.
visitor - The visitor to visit the children of this object.void addChildrenTo(java.util.Collection<Expression> children)
Expression to the given collection.addChildrenTo in class AbstractExpressionchildren - The collection used to store the childrenpublic AbstractFromClause addFromClause()
FROM clausevoid addOrderedChildrenTo(java.util.List<StringExpression> children)
StringExpressions representing this Expression.addOrderedChildrenTo in class AbstractExpressionchildren - The list used to store the string representation of this Expressionpublic final SelectClause addSelectClause()
final WhereClause addWhereClause()
WhereClauseabstract AbstractFromClause buildFromClause()
null can't be returnedabstract AbstractSelectClause buildSelectClause()
null can't be returnedpublic final Expression getFromClause()
Expression representing the FROM clause.public final Expression getGroupByClause()
Expression representing the GROUP BY clause.public final Expression getHavingClause()
Expression representing the HAVING clause.public AbstractSelectClause getSelectClause()
AbstractSelectClause representing the SELECT clause.public final Expression getWhereClause()
Expression representing the WHERE clause.public final boolean hasFromClause()
true if the query that got parsed had the FROM clausepublic final boolean hasGroupByClause()
true if the query that got parsed had the GROUP BY clausepublic final boolean hasHavingClause()
true if the query that got parsed had the HAVING clausepublic final boolean hasSpaceAfterFrom()
true if there was a whitespace after the FROM clause and owned by this expression; false otherwisepublic final boolean hasSpaceAfterGroupBy()
true if there was a whitespace after the GROUP BY clause and owned by this expression; false otherwisepublic final boolean hasSpaceAfterSelect()
true if there was a whitespace after the SELECT clause and owned by this expression; false otherwisepublic final boolean hasSpaceAfterWhere()
true if there was a whitespace after the WHERE clause and owned by this expression; false otherwisepublic final boolean hasWhereClause()
true if the query that got parsed had the WHERE clause
void parse(WordParser wordParser,
boolean tolerant)
WordParser.parse in class AbstractExpressionwordParser - The text to parse based on the current position of the cursortolerant - Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queriesboolean shouldManageSpaceAfterClause()
void toParsedText(java.lang.StringBuilder writer,
boolean includeVirtual)
Expression.toParsedText in class AbstractExpressionwriter - The buffer used to append this Expression's string representationincludeVirtual - Determines whether to include any characters that are considered virtual, i.e. that was parsed when the query is incomplete and is needed for functionality like content assist
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||