public class Condition extends RMObject implements RMJSONArchiver.GetKeys, Archivable
Modifier and Type | Class and Description |
---|---|
static class |
Condition.DateConstraint |
static class |
Condition.Operator |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DateConstraint_Prop |
static java.lang.String |
IgnoreCase_Prop |
static java.lang.String |
Negated_Prop |
static java.lang.String |
Operator_Prop |
static java.lang.String |
PropertyName_Prop |
static java.lang.String |
Value_Prop |
Constructor and Description |
---|
Condition()
Creates a new select condition.
|
Condition(java.lang.String aPropertyName,
Condition.Operator anOperator,
java.lang.Object aValue)
Creates a new select condition.
|
Modifier and Type | Method and Description |
---|---|
Condition |
clone()
Standard clone implementation (to get co-variant return type).
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
Condition |
fromXML(RXArchiver anArchiver,
RXElement anElement)
XML Unarchival.
|
Condition.DateConstraint |
getDateConstraint()
Returns date constraint.
|
Condition.DateConstraint |
getDateConstraintDefault()
Returns the date constraint default.
|
long |
getDateConstraintMultiplier()
Returns the date constraint multiplier.
|
boolean |
getIgnoreCase()
Returns whether condition ignores case (string types).
|
java.util.List<java.lang.String> |
getJSONKeys()
RMJSONArchiver.GetKeys method.
|
Condition.Operator |
getOperator()
Returns the operator.
|
static java.util.List<Condition.Operator> |
getOperators(Property.Type aType)
Returns the valid operators for a given property type.
|
java.lang.String |
getPropertyName()
Returns the property name.
|
java.lang.Object |
getValue()
Returns the value.
|
boolean |
getValue(Entity anEntity,
java.lang.Object anObj)
Returns the value of evaluating this condition on given object.
|
boolean |
isNegated()
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(java.lang.String aValue)
Sets the property name.
|
void |
setValue(java.lang.Object aValue)
Sets the value.
|
java.lang.String |
toString()
Returns a string for condition.
|
RXElement |
toXML(RXArchiver anArchiver)
XML Archival.
|
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
public static final java.lang.String PropertyName_Prop
public static final java.lang.String Operator_Prop
public static final java.lang.String Value_Prop
public static final java.lang.String Negated_Prop
public static final java.lang.String IgnoreCase_Prop
public static final java.lang.String DateConstraint_Prop
public Condition()
public Condition(java.lang.String aPropertyName, Condition.Operator anOperator, java.lang.Object aValue)
public java.lang.String getPropertyName()
public void setPropertyName(java.lang.String aValue)
public Condition.Operator getOperator()
public void setOperator(Condition.Operator anOperator)
public java.lang.Object getValue()
public void setValue(java.lang.Object aValue)
public boolean isNegated()
public void setNegated(boolean aValue)
public boolean getIgnoreCase()
public void setIgnoreCase(boolean aValue)
public Condition.DateConstraint getDateConstraint()
public void setDateConstraint(Condition.DateConstraint aDateConstraint)
public Condition.DateConstraint getDateConstraintDefault()
public long getDateConstraintMultiplier()
public static java.util.List<Condition.Operator> getOperators(Property.Type aType)
public boolean getValue(@Nonnull Entity anEntity, java.lang.Object anObj)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public Condition clone()
clone
in class RMListenerList
public RXElement toXML(RXArchiver anArchiver)
toXML
in interface Archivable
public Condition fromXML(RXArchiver anArchiver, RXElement anElement)
fromXML
in interface Archivable
public java.util.List<java.lang.String> getJSONKeys()
getJSONKeys
in interface RMJSONArchiver.GetKeys