KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > api > common > AssignmentIteratorExpressionBuilder


1 /* AssignmentIteratorExpressionBuilder.java */
2
3 package org.enhydra.shark.api.common;
4
5 import java.io.Serializable JavaDoc;
6
7 /**
8  * AssignmentIteratorExpressionBuilder
9  * <p>
10  * All methods are returng the object itself to allow stacking method
11  * calls on the same object.
12  *
13  * @author V.Puskas
14  * @version 0.4
15  */

16 public interface AssignmentIteratorExpressionBuilder extends
17                                                     ExpressionBuilder,
18                                                     Serializable JavaDoc {
19
20    /**
21     * Appends <b>AND </b> operator to expression
22     *
23     * @return itself
24     */

25    public abstract AssignmentIteratorExpressionBuilder and();
26
27    /**
28     * Appends <b>OR </b> operator to expression
29     *
30     * @return itself
31     */

32    public abstract AssignmentIteratorExpressionBuilder or();
33
34    /**
35     * Appends <b>NOT </b> operator to expression
36     *
37     * @return itself
38     */

39    public abstract AssignmentIteratorExpressionBuilder not();
40
41    /**
42     * Appends condition "assignments resource username == value of un"
43     *
44     * @param un
45     * @return itself
46     */

47    public abstract AssignmentIteratorExpressionBuilder addUsernameEquals(String JavaDoc un);
48
49    /**
50     * Appends condition "assignments process id == value of un"
51     *
52     * @param un
53     * @return itself
54     */

55    public abstract AssignmentIteratorExpressionBuilder addProcessIdEquals(String JavaDoc un);
56
57    /**
58     * Appends condition "is assignment accepted"
59     *
60     * @return itself
61     */

62    public abstract AssignmentIteratorExpressionBuilder addIsAccepted();
63
64    /**
65     * Appends condition "assignments package id == value of un"
66     *
67     * @param un
68     * @return itself
69     */

70    public abstract AssignmentIteratorExpressionBuilder addPackageIdEquals(String JavaDoc un);
71
72    /**
73     * Appends condition "assignments package version == value of un"
74     *
75     * @param un
76     * @return itself
77     */

78    public abstract AssignmentIteratorExpressionBuilder addPackageVersionEquals(String JavaDoc un);
79
80    /**
81     * Appends condition "assignments package definition id == value of un"
82     *
83     * @param un
84     * @return itself
85     */

86    public abstract AssignmentIteratorExpressionBuilder addProcessDefIdEquals(String JavaDoc un);
87
88    /**
89     * Appends condition "assignments activity set id == value of un"
90     *
91     * @param un
92     * @return itself
93     */

94    public abstract AssignmentIteratorExpressionBuilder addActivitySetDefIdEquals(String JavaDoc un);
95
96    /**
97     * Appends condition "assignments activity definition id == value of un"
98     *
99     * @param un
100     * @return itself
101     */

102    public abstract AssignmentIteratorExpressionBuilder addActivityDefIdEquals(String JavaDoc un);
103
104    /**
105     * Appends condition "assignments activity id == value of un"
106     *
107     * @param un
108     * @return itself
109     */

110    public abstract AssignmentIteratorExpressionBuilder addActivityIdEquals(String JavaDoc un);
111
112    /**
113     * Appends arbitrary condition
114     * <p>
115     * Here you may specify any script compatible expression, but
116     * <b>beware complete expression will be evaluated inside Java VM
117     * </b>, not on DB.
118     *
119     * @param exp condition to add
120     * @return itself
121     */

122    public abstract AssignmentIteratorExpressionBuilder addExpression(String JavaDoc exp);
123
124    /**
125     * Appends condition contained inside other
126     * <tt>AssignmentIteratorExpressionBuilder</tt>. This allows user to
127     * build more complicated expressions, by insterting eb condition
128     * into parenthesis.
129     *
130     * @param eb
131     * @return itself
132     */

133    public abstract AssignmentIteratorExpressionBuilder addExpression(AssignmentIteratorExpressionBuilder eb);
134
135    /**
136     * @param ascending
137     * @return itself
138     */

139    public AssignmentIteratorExpressionBuilder setOrderByUsername(boolean ascending);
140
141    /**
142     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
143     * actual expression (nor its evaluation), rather they affect sorting
144     * of the result.
145     * <p>
146     * This method sets ordering by process id value.
147     *
148     * @param ascending
149     * @return itself
150     */

151    public AssignmentIteratorExpressionBuilder setOrderByProcessId(boolean ascending);
152
153    /**
154     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
155     * actual expression (nor its evaluation), rather they affect sorting
156     * of the result.
157     * <p>
158     * This method sets ordering by assignment created time value.
159     *
160     * @param ascending
161     * @return itself
162     */

163    public AssignmentIteratorExpressionBuilder setOrderByCreatedTime(boolean ascending);
164
165    /**
166     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
167     * actual expression (nor its evaluation), rather they affect sorting
168     * of the result.
169     * <p>
170     * This method sets ordering by assignment accepted status value.
171     *
172     * @param ascending
173     * @return itself
174     */

175    public AssignmentIteratorExpressionBuilder setOrderByAccepted(boolean ascending);
176 }
Popular Tags