Class ConditionList
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.snap.data.Condition
-
- com.inductiveautomation.snap.data.ConditionList
-
- All Implemented Interfaces:
Archivable
,RMJSONArchiver.GetKeys
,RMPropertyChanger
,java.beans.PropertyChangeListener
,java.lang.Cloneable
,java.util.EventListener
public class ConditionList extends Condition implements java.beans.PropertyChangeListener
This condition subclass represents a list of conditions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inductiveautomation.snap.data.Condition
Condition.DateConstraint, Condition.Operator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
Condition_Prop
static java.lang.String
Operator_Prop
-
Fields inherited from class com.inductiveautomation.snap.data.Condition
DateConstraint_Prop, IgnoreCase_Prop, Negated_Prop, PropertyName_Prop, Value_Prop
-
-
Constructor Summary
Constructors Constructor Description ConditionList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConditionList
addCondition(Condition.Operator anOperator, Condition aCondition)
Adds a condition.ConditionList
addCondition(Condition.Operator anOperator, Condition aCondition, int anIndex)
Adds a condition at given index.ConditionList
addCondition(Condition.Operator anOperator, java.lang.String aPropertyName, Condition.Operator anOperator2, java.lang.Object aValue)
Adds a condition for givenConditionList
addCondition(java.lang.String aPropertyName, Condition.Operator anOperator, java.lang.Object aValue)
Adds a condition for givenConditionList
clone()
Standard clone implementation.boolean
equals(java.lang.Object anObj)
Standard equals implementation.ConditionList
fromXML(RXArchiver anArchiver, RXElement anElement)
XML Unarchival.Condition
getCondition(int anIndex)
Returns the condition at the given index.int
getConditionCount()
Returns the number of conditions in this composite.java.util.List<Condition>
getConditions()
Returns the conditions.java.util.List<java.lang.String>
getJSONKeys()
RMJSONArchiver.GetKeys method.Condition.Operator
getOperator(int anIndex)
Returns the operator at the given index.java.util.List<Condition.Operator>
getOperators()
Returns the operators.boolean
getValue(Entity anEntity, java.lang.Object anObj)
Override to handle list.int
indexOfCondition(Condition aCondition)
Returns the index of a given condition.void
propertyChange(java.beans.PropertyChangeEvent anEvent)
Catches child property changes and forwards them to our listener.Condition
removeCondition(int anIndex)
Removes a condition from a given index.int
removeCondition(Condition aCondition)
Removes the given condition.void
setConditions(java.util.List<Condition> theConditions)
Sets the conditions.void
setOperator(Condition.Operator anOperator, int anIndex)
Sets the operator at the given index.java.lang.String
toString()
Returns a string for condition.RXElement
toXML(RXArchiver anArchiver)
XML Archival.-
Methods inherited from class com.inductiveautomation.snap.data.Condition
getDateConstraint, getDateConstraintDefault, getDateConstraintMultiplier, getIgnoreCase, getOperator, getOperators, getPropertyName, getValue, isNegated, setDateConstraint, setIgnoreCase, setNegated, setOperator, setPropertyName, setValue
-
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 Detail
-
Condition_Prop
public static final java.lang.String Condition_Prop
- See Also:
- Constant Field Values
-
Operator_Prop
public static final java.lang.String Operator_Prop
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOperators
public java.util.List<Condition.Operator> getOperators()
Returns the operators.
-
getConditions
public java.util.List<Condition> getConditions()
Returns the conditions.
-
setConditions
public void setConditions(java.util.List<Condition> theConditions)
Sets the conditions.
-
getConditionCount
public int getConditionCount()
Returns the number of conditions in this composite.
-
getCondition
public Condition getCondition(int anIndex)
Returns the condition at the given index.
-
addCondition
public ConditionList addCondition(Condition.Operator anOperator, Condition aCondition)
Adds a condition.
-
addCondition
public ConditionList addCondition(Condition.Operator anOperator, Condition aCondition, int anIndex)
Adds a condition at given index.
-
addCondition
public ConditionList addCondition(java.lang.String aPropertyName, Condition.Operator anOperator, java.lang.Object aValue)
Adds a condition for given
-
addCondition
public ConditionList addCondition(Condition.Operator anOperator, java.lang.String aPropertyName, Condition.Operator anOperator2, java.lang.Object aValue)
Adds a condition for given
-
removeCondition
public Condition removeCondition(int anIndex)
Removes a condition from a given index.
-
removeCondition
public int removeCondition(Condition aCondition)
Removes the given condition.
-
indexOfCondition
public int indexOfCondition(Condition aCondition)
Returns the index of a given condition.
-
getOperator
public Condition.Operator getOperator(int anIndex)
Returns the operator at the given index.
-
setOperator
public void setOperator(Condition.Operator anOperator, int anIndex)
Sets the operator at the given index.
-
getValue
public boolean getValue(Entity anEntity, java.lang.Object anObj)
Override to handle list.
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
Catches child property changes and forwards them to our listener.- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
equals
public boolean equals(java.lang.Object anObj)
Standard equals implementation.
-
clone
public ConditionList clone()
Standard clone implementation.
-
getJSONKeys
public java.util.List<java.lang.String> getJSONKeys()
RMJSONArchiver.GetKeys method.- Specified by:
getJSONKeys
in interfaceRMJSONArchiver.GetKeys
- Overrides:
getJSONKeys
in classCondition
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML Archival.- Specified by:
toXML
in interfaceArchivable
- Overrides:
toXML
in classCondition
-
fromXML
public ConditionList fromXML(RXArchiver anArchiver, RXElement anElement)
XML Unarchival.- Specified by:
fromXML
in interfaceArchivable
- Overrides:
fromXML
in classCondition
-
-