Class DefaultTextEdit
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.DefaultTextEdit
- All Implemented Interfaces:
TextEdit
The default implementation of a
TextEdit
, which contains the location of the change within
the JPQL query (offset) and the old and new values.- Since:
- 2.4
- Version:
- 2.4
-
Constructor Summary
ConstructorDescriptionDefaultTextEdit
(int offset, String oldValue, String newValue) Creates a newDefaultTextEdit
. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the length of the text to replace with the new value.Returns the new value that should replace the old value.int
Returns the location of the old value within the text.Returns the value that was found within the text that should be replaced by the new value.toString()
-
Constructor Details
-
DefaultTextEdit
Creates a newDefaultTextEdit
.- Parameters:
offset
- The location of the old value within the textoldValue
- the value that was found within the text that should be replaced by the new valuenewValue
- The new value that should replace the old value
-
-
Method Details
-
getLength
public int getLength()Description copied from interface:TextEdit
Returns the length of the text to replace with the new value. -
getNewValue
Description copied from interface:TextEdit
Returns the new value that should replace the old value.- Specified by:
getNewValue
in interfaceTextEdit
- Returns:
- The value to replace the old value
-
getOffset
public int getOffset()Description copied from interface:TextEdit
Returns the location of the old value within the text. -
getOldValue
Description copied from interface:TextEdit
Returns the value that was found within the text that should be replaced by the new value.- Specified by:
getOldValue
in interfaceTextEdit
- Returns:
- The value to replace
-
toString
-