ReportMill 11 API

com.reportmill.datasource
Class RMCondition

java.lang.Object
  extended by com.reportmill.base.RMObject
      extended by com.reportmill.datasource.RMCondition
All Implemented Interfaces:
com.reportmill.base.RMPropertyChanger, java.lang.Cloneable
Direct Known Subclasses:
RMConditionList

public class RMCondition
extends com.reportmill.base.RMObject

Represents a condition that is part of a SQL where clause.


Nested Class Summary
static class RMCondition.DateConstraint
           
static class RMCondition.Operator
           
 
Constructor Summary
RMCondition()
          Creates a new select condition.
RMCondition(java.lang.Object aLeft, RMCondition.Operator anOperator, java.lang.Object aRight)
          Creates a new select condition.
 
Method Summary
 RMCondition clone()
          Standard clone implementation (to get co-variant return type).
 boolean equals(java.lang.Object anObj)
          Standard equals implementation.
 RMCondition fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
          XML Unarchival.
 RMCondition.DateConstraint getDateConstraint()
          Returns date constraint.
 boolean getIgnoreCase()
          Returns whether condition ignores case (string types).
 java.lang.Object getLeftSide()
          Returns the left side.
 RMCondition.Operator getOperator()
          Returns the operator.
static java.util.List<RMCondition.Operator> getOperators(RMProperty.Type aType)
          Returns the valid operators for a given property type.
 java.lang.Object getRightSide()
          Returns the right side.
 boolean isNegated()
          Returns whether condition is negated.
 void setDateConstraint(RMCondition.DateConstraint aDateConstraint)
          Sets the date constraint.
 void setIgnoreCase(boolean aValue)
          Sets whether condition ignores case (string types).
 void setLeftSide(java.lang.Object aValue)
          Sets the left side.
 void setNegated(boolean aValue)
          Sets whether condition is negated.
 void setOperator(RMCondition.Operator anOperator)
          Sets the operator.
 void setRightSide(java.lang.Object aValue)
          Sets the right side.
 void setRightSideValues(java.util.Map aMap)
          Sets right side values from map, if right side matches key from given map.
 java.lang.String toString()
          Returns a string for condition.
 com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
          XML Archival.
 
Methods inherited from class com.reportmill.base.RMObject
addListener, addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, getListener, getListenerCount, getListeners, isFirePropertyChangeEnabled, isUndoing, removeListener, removePropertyChangeListener, setFirePropertyChangeEnabled, setUndoing
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMCondition

public RMCondition()
Creates a new select condition.


RMCondition

public RMCondition(java.lang.Object aLeft,
                   RMCondition.Operator anOperator,
                   java.lang.Object aRight)
Creates a new select condition.

Method Detail

getLeftSide

public java.lang.Object getLeftSide()
Returns the left side.


setLeftSide

public void setLeftSide(java.lang.Object aValue)
Sets the left side.


getOperator

public RMCondition.Operator getOperator()
Returns the operator.


setOperator

public void setOperator(RMCondition.Operator anOperator)
Sets the operator.


getRightSide

public java.lang.Object getRightSide()
Returns the right side.


setRightSide

public void setRightSide(java.lang.Object aValue)
Sets the right side.


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

public RMCondition.DateConstraint getDateConstraint()
Returns date constraint.


setDateConstraint

public void setDateConstraint(RMCondition.DateConstraint aDateConstraint)
Sets the date constraint.


setRightSideValues

public void setRightSideValues(java.util.Map aMap)
Sets right side values from map, if right side matches key from given map.


getOperators

public static java.util.List<RMCondition.Operator> getOperators(RMProperty.Type aType)
Returns the valid operators for a given property type.


equals

public boolean equals(java.lang.Object anObj)
Standard equals implementation.

Overrides:
equals in class java.lang.Object

clone

public RMCondition clone()
Standard clone implementation (to get co-variant return type).

Overrides:
clone in class com.reportmill.base.RMObject

toXML

public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver,
                                               java.lang.Object anOwner)
XML Archival.


fromXML

public RMCondition fromXML(com.reportmill.archiver.RXArchiver anArchiver,
                           com.reportmill.archiver.RXElement anElement,
                           java.lang.Object anOwner)
XML Unarchival.


toString

public java.lang.String toString()
Returns a string for condition.

Overrides:
toString in class java.lang.Object

ReportMill 11 API