EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
Class DefaultTextEdit

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.DefaultTextEdit
All Implemented Interfaces:
TextEdit

public class DefaultTextEdit
extends java.lang.Object
implements TextEdit

The default implementation of a Text, which contains the location of the change within the JPQL query (offset) and the old and new values.

Version:
2.4
Author:
Pascal Filion
Since:
2.4

Constructor Summary
DefaultTextEdit(int offset, java.lang.String oldValue, java.lang.String newValue)
          Creates a new DefaultTextEdit.
 
Method Summary
 int getLength()
          Returns the length of the text to replace with the new value.
 java.lang.String getNewValue()
          Returns the new value that should replace the old value.
 int getOffset()
          Returns the location of the old value within the text.
 java.lang.String getOldValue()
          Returns the value that was found within the text that should be replaced by the new value.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultTextEdit

public DefaultTextEdit(int offset,
                       java.lang.String oldValue,
                       java.lang.String newValue)
Creates a new DefaultTextEdit.

Parameters:
offset - The location of the old value within the text
oldValue - the value that was found within the text that should be replaced by the new value
newValue - The new value that should replace the old value
Method Detail

getLength

public int getLength()
Returns the length of the text to replace with the new value.

Specified by:
getLength in interface TextEdit
Returns:
The old value's length

getNewValue

public java.lang.String getNewValue()
Returns the new value that should replace the old value.

Specified by:
getNewValue in interface TextEdit
Returns:
The value to replace the old value

getOffset

public int getOffset()
Returns the location of the old value within the text.

Specified by:
getOffset in interface TextEdit
Returns:
The location of the old value within the text

getOldValue

public java.lang.String getOldValue()
Returns the value that was found within the text that should be replaced by the new value.

Specified by:
getOldValue in interface TextEdit
Returns:
The value to replace

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference