Class OrCondition
java.lang.Object
org.castor.cpa.persistence.sql.query.condition.Condition
org.castor.cpa.persistence.sql.query.condition.CompoundCondition
org.castor.cpa.persistence.sql.query.condition.OrCondition
- All Implemented Interfaces:
QueryObject
Represents a list of conditions that are concatenated by an OR operator.
- Version:
- $Revision$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Ahmad Hassan, Ralf Joachim
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for an empty OR condition.OrCondition
(Condition condition1, Condition condition2) Constructor for a compound condition that concatenates the 2 given conditions with an OR operator.OrCondition
(OrCondition condition) Copy constructor to create a copy of given OR condition. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Accept method to handle incoming visitors.protected void
Appends the specified condition to end of this list of conditions.not()
Builder method to invert a condition.Builder method to concatenate the given condition with all others that have previously been added with an OR operator.toString()
Method constructing query string.Methods inherited from class org.castor.cpa.persistence.sql.query.condition.CompoundCondition
insert, iterator
-
Constructor Details
-
OrCondition
public OrCondition()Default constructor for an empty OR condition. -
OrCondition
Constructor for a compound condition that concatenates the 2 given conditions with an OR operator.- Parameters:
condition1
- First condition.condition2
- Second condition.
-
OrCondition
Copy constructor to create a copy of given OR condition.- Parameters:
condition
- OR condition to create a copy of.
-
-
Method Details
-
append
Description copied from class:CompoundCondition
Appends the specified condition to end of this list of conditions.- Overrides:
append
in classCompoundCondition
- Parameters:
condition
- Condition to be appended to this list of conditions.
-
or
Description copied from class:Condition
Builder method to concatenate the given condition with all others that have previously been added with an OR operator. -
not
Description copied from class:Condition
Builder method to invert a condition. A condition that evaluated to TRUE before calling this method will evaluate to FALSE thereafter. -
accept
Accept method to handle incoming visitors.- Parameters:
visitor
- Visitor to be handled.
-
toString
Method constructing query string.
-