|
Compoze Software, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.compoze.exchange.webdav.sql.AbstractSqlFragment
|
+--com.compoze.exchange.webdav.sql.Condition
|
+--com.compoze.exchange.webdav.sql.NotCondition
This class provides the implementation for creating a 'NOT' condition statement.
The following example demonstrates how to use this class:
Condition cond = NotCondition.create(new GreaterThanOperator("urn:schemas:contacts:givenName", "Skip"), true);
cond.add(new GreaterThanOperator("urn:schemas:contacts:givenName", "Skippy"), true);
System.out.println(cond);
Calling toSQL() or toString() will return the SQL representation of this object.
For example, the above example would yield:
NOT (("urn:schemas:contacts:givenName" > 'Skip') OR ("urn:schemas:contacts:givenName" > 'Skippy'))
| Constructor Summary | |
protected |
NotCondition()
Constructor. |
protected |
NotCondition(Condition condition,
boolean bOr)
Constructor. |
protected |
NotCondition(IOperator op,
boolean bOr)
Constructor. |
protected |
NotCondition(IPredicate predicate,
boolean bOr)
Constructor. |
| Method Summary | |
static Condition |
create()
Creates an empty condition statement. |
static Condition |
create(Condition condition)
Creates a condition with a specfied condition statement. |
static Condition |
create(Condition condition,
boolean bOr)
Creates a condition with a specfied condition statement. |
static Condition |
create(IOperator op)
Creates a condition with a specfied operator clause. |
static Condition |
create(IOperator op,
boolean bOr)
Creates a condition with a specfied operator clause. |
static Condition |
create(IPredicate predicate)
Creates a condition with a specfied predicate clause. |
static Condition |
create(IPredicate predicate,
boolean bOr)
Creates a condition with a specfied predicate clause. |
static void |
main(java.lang.String[] args)
|
java.lang.String |
toSQL()
Returns a SQL representation of the condition statement. |
| Methods inherited from class com.compoze.exchange.webdav.sql.Condition |
add, add, add, add, add, add, getCondition, isEmpty, isOr |
| Methods inherited from class com.compoze.exchange.webdav.sql.AbstractSqlFragment |
escape, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected NotCondition()
protected NotCondition(Condition condition,
boolean bOr)
condition - the condition statement.bOr - true to or together; false otherwise.
protected NotCondition(IOperator op,
boolean bOr)
op - the operator statement.bOr - true to or together; false otherwise.
protected NotCondition(IPredicate predicate,
boolean bOr)
predicate - the predicate statement.bOr - true to or together; false otherwise.| Method Detail |
public static Condition create()
public static Condition create(Condition condition)
condition - the condition statement to create condition with.
public static Condition create(Condition condition,
boolean bOr)
condition - the condition statement to create condition with.bOr - true to or together; false otherwise.public static Condition create(IOperator op)
op - the operator clause to create condition with.
public static Condition create(IOperator op,
boolean bOr)
op - the operator clause to create condition with.bOr - true to or together; false otherwise.public static Condition create(IPredicate predicate)
predicate - the predicate clause to create condition with.bOr - true to or together; false otherwise.
public static Condition create(IPredicate predicate,
boolean bOr)
predicate - the predicate clause to create condition with.bOr - true to or together; false otherwise.public java.lang.String toSQL()
toSQL in class Conditionpublic static void main(java.lang.String[] args)
|
Compoze Software, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||