public abstract class SimpleStateObject extends AbstractStateObject
StateObject simply holds onto a string.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TEXT_PROPERTY
Notifies the text property has changed.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleStateObject(StateObject parent)
Creates a new
SimpleStateObject. |
protected |
SimpleStateObject(StateObject parent,
java.lang.String text)
Creates a new
SimpleStateObject. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getText()
Returns the text held by this state object.
|
boolean |
hasText()
Determines whether this state object is holding a non-empty string.
|
boolean |
isEquivalent(StateObject stateObject)
Determines whether the given
StateObject is equivalent to this one, i.e. the
information of both StateObject is the same. |
void |
setText(java.lang.String text)
Sets the text held by this state object.
|
protected void |
setTextInternally(java.lang.String text)
Sets the text to the given value without notifying the listeners.
|
protected void |
toTextInternal(java.lang.Appendable writer)
Prints out a string representation of this
StateObject, which should not be used to
define a true string representation of a JPQL query but should be used for
debugging purposes. |
acceptUnknownVisitor, acceptUnknownVisitor, addChildren, addProblems, addPropertyChangeListener, areEquivalent, buildProblem, buildProblem, buildStateObject, buildStateObjects, checkParent, children, decorate, equals, findIdentificationVariable, firePropertyChanged, getChangeSupport, getDeclaration, getDecorator, getExpression, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, initialize, isDecorated, parent, parent, parent, removePropertyChangeListener, setExpression, setParent, toString, toString, toStringInternal, toStringItems, toTextclone, finalize, getClass, notify, notifyAll, wait, wait, waitacceptpublic static final java.lang.String TEXT_PROPERTY
protected SimpleStateObject(StateObject parent)
SimpleStateObject.parent - The parent of this state object, which cannot be nulljava.lang.NullPointerException - The given parent cannot be nullprotected SimpleStateObject(StateObject parent, java.lang.String text)
SimpleStateObject.parent - The parent of this state object, which cannot be nulltext - The text held by this state objectjava.lang.NullPointerException - The given parent cannot be nullpublic java.lang.String getText()
public boolean hasText()
true if the text is non-empty; false otherwisepublic boolean isEquivalent(StateObject stateObject)
StateObject is equivalent to this one, i.e. the
information of both StateObject is the same.isEquivalent in interface StateObjectisEquivalent in class AbstractStateObjectstateObject - The StateObject to compare its content to this onetrue if both object are equivalent; false otherwisepublic void setText(java.lang.String text)
text - This model's text valueprotected void setTextInternally(java.lang.String text)
text - This model's text valueprotected void toTextInternal(java.lang.Appendable writer)
throws java.io.IOException
StateObject, which should not be used to
define a true string representation of a JPQL query but should be used for
debugging purposes.toTextInternal in class AbstractStateObjectwriter - The writer used to print out the string representationjava.io.IOException - This should never happens, it is only required because Appendable
is used instead of any concrete class