A Factory to create Conditions
.
public class ConditionFactory {public ConditionFactory();
public static Condition and(Condition c1,
Condition c2);public static Condition columnEqual(DataColumn column,
String s);public static Condition columnEqual(DataColumn column,
Date d);public static Condition columnEqual(DataColumn column,
Boolean b);public static Condition any(DataColumn column);
public static Condition columnEqual(DataColumn column,
long i);public static Condition textFieldsStartWith(Record r);
public static Condition rawSQLCondition(String s);
}
Methods inherited from java.lang.Object:
clone
, equals
, finalize
, getClass
, hashCode
, notify
, notifyAll
, toString
, wait
Inheritance Path. java.lang.Object-> org.kaiwitte.workbench.data.ConditionFactory
Synopsis: public static Condition and(org.kaiwitte.workbench.data.Condition\ c1, org.kaiwitte.workbench.data.Condition\ c2);
Parameters
c1
the first argument
c2
the second argument
the Condition
c1 AND c2
Returns a Condition
that combines two conditions
with a logical AND.
Synopsis: public static Condition any(org.kaiwitte.workbench.data.DataColum\ n column);
Parameters
column
the org.kaiwitte.workbench.data.DataColumn
to be compared
the resulting org.kaiwitte.workbench.data.Condition
Creates a org.kaiwitte.workbench.data.Condition
that allows any value for a certain org.kaiwitte.workbench.data.DataColumn
.
Synopsis: public static Condition columnEqual(org.kaiwitte.workbench.data.D\ ataColumn column, java.lang.Boolean b);
Parameters
column
the org.kaiwitte.workbench.data.DataColumn
to be compared
b
the Boolean
that is the comparator
the resulting Condition
Returns a Condition
that requires a certain org.kaiwitte.workbench.data.DataColumn
's getName()
to equal a certain Boolean
.
Synopsis: public static Condition columnEqual(org.kaiwitte.workbench.data.D\ ataColumn column, java.util.Date d);
Parameters
column
the org.kaiwitte.workbench.data.DataColumn
to be compared
d
the Date
that is the comparator
the resulting Condition
Returns a Condition
that requires a certain org.kaiwitte.workbench.data.DataColumn
's getName()
to equal a certain Date
.
Synopsis: public static Condition columnEqual(org.kaiwitte.workbench.data.D\ ataColumn column, long i);
Parameters
column
the org.kaiwitte.workbench.data.DataColumn
to be compared
i
the int
that is the comparator
the resulting Condition
Returns a Condition
that requires a certain org.kaiwitte.workbench.data.DataColumn
's getName()
to equal a certain long
.
Synopsis: public static Condition columnEqual(org.kaiwitte.workbench.data.D\ ataColumn column, java.lang.String s);
Parameters
column
the org.kaiwitte.workbench.data.DataColumn
to be compared
s
the String
that is the comparator
the resulting Condition
Returns a Condition
that requires a certain org.kaiwitte.workbench.data.DataColumn
's getName()
to equal a certain String
.
Synopsis: public static Condition rawSQLCondition(java.lang.String s);
Parameters
s
the String
with the condition in SQL syntax
the resulting Condition
Returns a Condition
from a String
that is in SQL syntax. E. g.
name='kai' AND age <20
Synopsis: public static Condition textFieldsStartWith(org.kaiwitte.workbenc\ h.data.Record r);
Parameters
r
the org.kaiwitte.workbench.data.Record
to be compared
the resulting Condition
Returns a Condition
that requires a certain
all text fields to start with the text in the text fields
of the provided org.kaiwitte.workbench.data.Record
.