Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.jpa.internal.jpql.parser
Class StringExpression

java.lang.Object
  extended by org.eclipse.persistence.jpa.internal.jpql.parser.StringExpression

Direct Known Subclasses:
AbstractExpression, DefaultStringExpression

public abstract class StringExpression
extends java.lang.Object

A StringExpression is used when retrieving the deepest Expression in the JPQL parsed tree. An Expression should wrap its entire content with StringExpressions, i.e. whitespace, commas, dots, etc. Expression parts are already an instance of StringExpressions so they don't need to be encapsulated.

Note: This is not an interface because some methods should not become public on AbstractExpression, they are used internally.

Since:
2.3
Version:
2.3
Author:
Pascal Filion

Constructor Summary
StringExpression()
           

 

Method Summary
abstract  java.util.ListIterator<StringExpression> orderedChildren()
          Creates a list representing this expression and its children.
(package private) abstract  void populatePosition(QueryPosition queryPosition, int position)
          Retrieves the StringExpression located at the given position using the actual query, which may have extra whitespace.
abstract  java.lang.String toActualText()
          Generates a string representation of this StringExpression, which needs 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.
abstract  java.lang.String toParsedText()
          Returns a string representation of this StringExpression and its children.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

StringExpression

public StringExpression()

Method Detail

orderedChildren

public abstract java.util.ListIterator<StringExpression> orderedChildren()
Creates a list representing this expression and its children. In order to add every piece of the expression, #addChildrenTo(Collection) is called.
Returns:
The StringExpressions representing this Expression

populatePosition

abstract void populatePosition(QueryPosition queryPosition,
                               int position)
Retrieves the StringExpression located at the given position using the actual query, which may have extra whitespace.
Parameters:
position - The array has one element and is the position of the StringExpression to retrieve

toActualText

public abstract java.lang.String toActualText()
Generates a string representation of this StringExpression, which needs 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.
Returns:
The string representation of this StringExpression

toParsedText

public abstract java.lang.String toParsedText()
Returns a string representation of this StringExpression and its children. The expression should contain whitespace even if the beautified version would not have any. For instance, "SELECT e " should be returned where Expression#toText() would return "SELECT e".
Returns:
The string representation of this StringExpression

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.