Class Condition
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.snap.data.Condition
- All Implemented Interfaces:
Archivable
,RMJSONArchiver.GetKeys
,RMPropertyChanger
,Cloneable
- Direct Known Subclasses:
ConditionList
Represents a condition that is part of a SQL where clause.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new select condition.Condition
(String aPropertyName, Condition.Operator anOperator, Object aValue) Creates a new select condition. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Standard clone implementation (to get co-variant return type).boolean
Standard equals implementation.fromXML
(RXArchiver anArchiver, RXElement anElement) XML Unarchival.Returns date constraint.Returns the date constraint default.long
Returns the date constraint multiplier.boolean
Returns whether condition ignores case (string types).RMJSONArchiver.GetKeys method.Returns the operator.static List<Condition.Operator>
getOperators
(Property.Type aType) Returns the valid operators for a given property type.Returns the property name.getValue()
Returns the value.boolean
Returns the value of evaluating this condition on given object.boolean
Returns whether condition is negated.void
setDateConstraint
(Condition.DateConstraint aDateConstraint) Sets the date constraint.void
setIgnoreCase
(boolean aValue) Sets whether condition ignores case (string types).void
setNegated
(boolean aValue) Sets whether condition is negated.void
setOperator
(Condition.Operator anOperator) Sets the operator.void
setPropertyName
(String aValue) Sets the property name.void
Sets the value.toString()
Returns a string for condition.toXML
(RXArchiver anArchiver) XML Archival.Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Field Details
-
PropertyName_Prop
- See Also:
-
Operator_Prop
- See Also:
-
Value_Prop
- See Also:
-
Negated_Prop
- See Also:
-
IgnoreCase_Prop
- See Also:
-
DateConstraint_Prop
- See Also:
-
-
Constructor Details
-
Condition
public Condition()Creates a new select condition. -
Condition
Creates a new select condition.
-
-
Method Details
-
getPropertyName
Returns the property name. -
setPropertyName
Sets the property name. -
getOperator
Returns the operator. -
setOperator
Sets the operator. -
getValue
Returns the value. -
setValue
Sets the value. -
isNegated
public boolean isNegated()Returns whether condition is negated. -
setNegated
public void setNegated(boolean aValue) Sets whether condition is negated. -
getIgnoreCase
public boolean getIgnoreCase()Returns whether condition ignores case (string types). -
setIgnoreCase
public void setIgnoreCase(boolean aValue) Sets whether condition ignores case (string types). -
getDateConstraint
Returns date constraint. -
setDateConstraint
Sets the date constraint. -
getDateConstraintDefault
Returns the date constraint default. -
getDateConstraintMultiplier
public long getDateConstraintMultiplier()Returns the date constraint multiplier. -
getOperators
Returns the valid operators for a given property type. -
getValue
Returns the value of evaluating this condition on given object. -
equals
Standard equals implementation. -
clone
Standard clone implementation (to get co-variant return type).- Overrides:
clone
in classRMListenerList
-
toXML
XML Archival.- Specified by:
toXML
in interfaceArchivable
-
fromXML
XML Unarchival.- Specified by:
fromXML
in interfaceArchivable
-
getJSONKeys
RMJSONArchiver.GetKeys method.- Specified by:
getJSONKeys
in interfaceRMJSONArchiver.GetKeys
-
toString
Returns a string for condition.
-