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.- Since:
- 2.4
- Version:
- 2.4
- Author:
- Pascal Filion
-
-
Field Summary
Fields Modifier and Type Field Description static StringTEXT_PROPERTYNotifies the text property has changed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.voidsetText(String text)Sets the text held by this state object.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
addPropertyChangeListener, children, decorate, equals, findIdentificationVariable, getDeclaration, getDecorator, getExpression, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, removePropertyChangeListener, setExpression, setParent, toString, toString, toText
-
Methods inherited from interface org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject
accept
-
-
-
-
Field Detail
-
TEXT_PROPERTY
public static final String TEXT_PROPERTY
Notifies the text property has changed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getText
public String getText()
Returns the text held by this state object.- Returns:
- This model's text value
-
hasText
public boolean hasText()
Determines whether this state object is holding a non-empty string.- Returns:
trueif the text is non-empty;falseotherwise
-
isEquivalent
public boolean isEquivalent(StateObject stateObject)
Determines whether the givenStateObjectis equivalent to this one, i.e. the information of bothStateObjectis the same.- Specified by:
isEquivalentin interfaceStateObject- Overrides:
isEquivalentin classAbstractStateObject- Parameters:
stateObject- TheStateObjectto compare its content to this one- Returns:
trueif both object are equivalent;falseotherwise
-
setText
public void setText(String text)
Sets the text held by this state object.- Parameters:
text- This model's text value
-
-