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
ThisStateObject
simply holds onto a string.- Since:
- 2.4
- Version:
- 2.4
- Author:
- Pascal Filion
-
-
Field Summary
Fields Modifier and Type Field Description static String
TEXT_PROPERTY
Notifies the text property has changed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 givenStateObject
is equivalent to this one, i.e.void
setText(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:
true
if the text is non-empty;false
otherwise
-
isEquivalent
public boolean isEquivalent(StateObject stateObject)
Determines whether the givenStateObject
is equivalent to this one, i.e. the information of bothStateObject
is the same.- Specified by:
isEquivalent
in interfaceStateObject
- Overrides:
isEquivalent
in classAbstractStateObject
- Parameters:
stateObject
- TheStateObject
to compare its content to this one- Returns:
true
if both object are equivalent;false
otherwise
-
setText
public void setText(String text)
Sets the text held by this state object.- Parameters:
text
- This model's text value
-
-