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 DefaultStringExpression

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


final class DefaultStringExpression
extends StringExpression

The default implementation of a StringExpression that wraps a string.

Since:
2.3
Version:
2.3
Author:
Pascal Filion

Field Summary
private  AbstractExpression owningExpression
          The Expression from where the text value comes.
private  java.lang.String value
          The wrapped string value.

 

Constructor Summary
DefaultStringExpression(AbstractExpression owningExpression, java.lang.String value)
          Creates a new DefaultStringExpression.

 

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

 

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

 

Field Detail

owningExpression

private final AbstractExpression owningExpression
The Expression from where the text value comes.

value

private final java.lang.String value
The wrapped string value.

Constructor Detail

DefaultStringExpression

DefaultStringExpression(AbstractExpression owningExpression,
                        java.lang.String value)
Creates a new DefaultStringExpression.
Parameters:
owningExpression - The Expression from where the text value comes
value - The string value to wrap with this StringExpression

Method Detail

orderedChildren

public 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.
Specified by:
orderedChildren in class StringExpression
Returns:
The StringExpressions representing this Expression

populatePosition

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

toActualText

public 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.
Specified by:
toActualText in class StringExpression
Returns:
The string representation of this StringExpression

toParsedText

public 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".
Specified by:
toParsedText in class StringExpression
Returns:
The string representation of this StringExpression

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

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