Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools

public Class DefaultTextEdit

extends Object
implements TextEdit
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.jpa.jpql.tools.TextEdit
Annotations
@SuppressWarnings:nls

The default implementation of a TextEdit, which contains the location of the change within the JPQL query (offset) and the old and new values.
Author
Pascal Filion
Since
2.4
Version
2.4

Field Summary

Modifier and TypeField and Description
private String
newValue

The new value that should replace the old value.

private int
offset

The location of the old value within the text.

private String
oldValue

The value that was found within the text that should be replaced by the new value.

Constructor Summary

AccessConstructor and Description
public
DefaultTextEdit(int
The location of the old value within the text
offset
,
String
the value that was found within the text that should be replaced by the new value
oldValue
,
String
The new value that should replace the old value
newValue
)

Creates a new DefaultTextEdit.

Method Summary

Modifier and TypeMethod and Description
public int
getLength()

Implements org.eclipse.persistence.jpa.jpql.tools.TextEdit.getLength.

Returns the length of the text to replace with the new value.
public String
getNewValue()

Implements org.eclipse.persistence.jpa.jpql.tools.TextEdit.getNewValue.

Returns the new value that should replace the old value.
public int
getOffset()

Implements org.eclipse.persistence.jpa.jpql.tools.TextEdit.getOffset.

Returns the location of the old value within the text.
public String
getOldValue()

Implements org.eclipse.persistence.jpa.jpql.tools.TextEdit.getOldValue.

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

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

newValueback to summary
private String newValue

The new value that should replace the old value.

offsetback to summary
private int offset

The location of the old value within the text.

oldValueback to summary
private String oldValue

The value that was found within the text that should be replaced by the new value.

Constructor Detail

DefaultTextEditback to summary
public DefaultTextEdit(int offset, String oldValue, String newValue)

Creates a new DefaultTextEdit.

Parameters
offset:int

The location of the old value within the text

oldValue:String

the value that was found within the text that should be replaced by the new value

newValue:String

The new value that should replace the old value

Method Detail

getLengthback to summary
public int getLength()

Implements org.eclipse.persistence.jpa.jpql.tools.TextEdit.getLength.

Doc from org.eclipse.persistence.jpa.jpql.tools.TextEdit.getLength.

Returns the length of the text to replace with the new value.

Returns:int

The old value's length

Annotations
@Override
getNewValueback to summary
public String getNewValue()

Implements org.eclipse.persistence.jpa.jpql.tools.TextEdit.getNewValue.

Doc from org.eclipse.persistence.jpa.jpql.tools.TextEdit.getNewValue.

Returns the new value that should replace the old value.

Returns:String

The value to replace the old value

Annotations
@Override
getOffsetback to summary
public int getOffset()

Implements org.eclipse.persistence.jpa.jpql.tools.TextEdit.getOffset.

Doc from org.eclipse.persistence.jpa.jpql.tools.TextEdit.getOffset.

Returns the location of the old value within the text.

Returns:int

The location of the old value within the text

Annotations
@Override
getOldValueback to summary
public String getOldValue()

Implements org.eclipse.persistence.jpa.jpql.tools.TextEdit.getOldValue.

Doc from org.eclipse.persistence.jpa.jpql.tools.TextEdit.getOldValue.

Returns the value that was found within the text that should be replaced by the new value.

Returns:String

The value to replace

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override