|
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.QueryPosition
public final class QueryPosition
This object contains the cursor position within the parsed tree and within each of the Expression
from the root to the deepest leaf.
Field Summary | |
---|---|
private Expression |
expression The deepest child Expression where the position of the cursor is. |
private int |
position The position of the cursor in the query. |
private java.util.Map<Expression,java.lang.Integer> |
positions The table containing the position of each of the Expression up to the deepest leaf. |
Constructor Summary | |
---|---|
QueryPosition(int position) Creates a new QueryPosition . |
Method Summary | |
---|---|
(package private) void |
addPosition(Expression expression, int position) Adds the position of the cursor within the given Expression |
(package private) void |
adjustPosition(AbstractExpression parent, Expression expression, int adjustedPosition) |
(package private) QueryPosition |
adjustPosition(Expression expression, int newPosition) |
Expression |
getExpression() Returns the child Expression where the position of the cursor is. |
int |
getPosition() Returns the position of the cursor in the query. |
int |
getPosition(Expression expression) Returns the position of the cursor within the given Expression |
(package private) void |
removePosition(Expression expression) Removes the given Expression from the cached positions. |
(package private) void |
setExpression(Expression expression) Sets the deepest leaf where the cursor is located. |
(package private) QueryPosition |
transform(Expression leafExpression) |
private void |
transform(QueryPosition position, Expression expression) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Expression expression
Expression
where the position of the cursor is.private int position
private java.util.Map<Expression,java.lang.Integer> positions
Expression
up to the deepest leaf.Constructor Detail |
---|
QueryPosition(int position)
QueryPosition
.
position
- The position of the cursor in the queryMethod Detail |
---|
void addPosition(Expression expression, int position)
Expression
expression
- An Expression
in which the cursor is locatedThe
- position of the cursor within the given Expression
void adjustPosition(AbstractExpression parent, Expression expression, int adjustedPosition)
QueryPosition adjustPosition(Expression expression, int newPosition)
public Expression getExpression()
Expression
where the position of the cursor is.Expression
child that was retrieving by traversing the parsed tree up to the position of the cursor.public int getPosition()
public int getPosition(Expression expression)
Expression
expression
- The Expression
for which the position of the cursor is requestedExpression
or -1 if the cursor is not within itvoid removePosition(Expression expression)
Expression
from the cached positions.expression
- The Expression
that was registered with this objectvoid setExpression(Expression expression)
expression
- The Expression
that is the deepest leaf within the parsed treeQueryPosition transform(Expression leafExpression)
private void transform(QueryPosition position, Expression expression)
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |