Class SimpleStateObject
- java.lang.Object
- 
- org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
- 
- org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject
 
 
- 
- All Implemented Interfaces:
- StateObject
 - Direct Known Subclasses:
- AbstractSchemaNameStateObject,- BadExpressionStateObject,- DateTimeStateObject,- EntityTypeLiteralStateObject,- EnumTypeStateObject,- IdentificationVariableStateObject,- InputParameterStateObject,- KeywordExpressionStateObject,- NumericLiteralStateObject,- StringLiteralStateObject,- UnknownExpressionStateObject
 
 public abstract class SimpleStateObject extends AbstractStateObject ThisStateObjectsimply holds onto a string.- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringTEXT_PROPERTYNotifies the text property has changed.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedSimpleStateObject(StateObject parent)Creates a newSimpleStateObject.protectedSimpleStateObject(StateObject parent, java.lang.String text)Creates a newSimpleStateObject.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetText()Returns the text held by this state object.booleanhasText()Determines whether this state object is holding a non-empty string.booleanisEquivalent(StateObject stateObject)Determines whether the givenStateObjectis equivalent to this one, i.e. the information of bothStateObjectis the same.voidsetText(java.lang.String text)Sets the text held by this state object.protected voidsetTextInternally(java.lang.String text)Sets the text to the given value without notifying the listeners.protected voidtoTextInternal(java.lang.Appendable writer)Prints out a string representation of thisStateObject, which should not be used to define atruestring representation of a JPQL query but should be used for debugging purposes.- 
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObjectacceptUnknownVisitor, 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, toText
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.persistence.jpa.jpql.tools.model.query.StateObjectaccept
 
- 
 
- 
- 
- 
Field Detail- 
TEXT_PROPERTYpublic static final java.lang.String TEXT_PROPERTY Notifies the text property has changed.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
SimpleStateObjectprotected SimpleStateObject(StateObject parent) Creates a newSimpleStateObject.- Parameters:
- parent- The parent of this state object, which cannot be- null
- Throws:
- java.lang.NullPointerException- The given parent cannot be- null
 
 - 
SimpleStateObjectprotected SimpleStateObject(StateObject parent, java.lang.String text) Creates a newSimpleStateObject.- Parameters:
- parent- The parent of this state object, which cannot be- null
- text- The text held by this state object
- Throws:
- java.lang.NullPointerException- The given parent cannot be- null
 
 
- 
 - 
Method Detail- 
getTextpublic java.lang.String getText() Returns the text held by this state object.- Returns:
- This model's text value
 
 - 
hasTextpublic boolean hasText() Determines whether this state object is holding a non-empty string.- Returns:
- trueif the text is non-empty;- falseotherwise
 
 - 
isEquivalentpublic boolean isEquivalent(StateObject stateObject) Determines whether the givenStateObjectis equivalent to this one, i.e. the information of bothStateObjectis the same.- Specified by:
- isEquivalentin interface- StateObject
- Overrides:
- isEquivalentin class- AbstractStateObject
- Parameters:
- stateObject- The- StateObjectto compare its content to this one
- Returns:
- trueif both object are equivalent;- falseotherwise
 
 - 
setTextpublic void setText(java.lang.String text) Sets the text held by this state object.- Parameters:
- text- This model's text value
 
 - 
setTextInternallyprotected void setTextInternally(java.lang.String text) Sets the text to the given value without notifying the listeners.- Parameters:
- text- This model's text value
 
 - 
toTextInternalprotected void toTextInternal(java.lang.Appendable writer) throws java.io.IOExceptionPrints out a string representation of thisStateObject, which should not be used to define atruestring representation of a JPQL query but should be used for debugging purposes.- Specified by:
- toTextInternalin class- AbstractStateObject
- Parameters:
- writer- The writer used to print out the string representation
- Throws:
- java.io.IOException- This should never happens, it is only required because- Appendableis used instead of any concrete class
 
 
- 
 
-