KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

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

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

40    public ProcessIteratorExpressionBuilder not();
41
42    /**
43     * Appends condition "process definition id == value of exp"
44     *
45     * @param exp
46     * @return itself
47     */

48    public ProcessIteratorExpressionBuilder addPackageIdEquals(String JavaDoc exp);
49
50    /**
51     * Appends condition "process definition id == value of exp"
52     *
53     * @param exp
54     * @return itself
55     */

56    public ProcessIteratorExpressionBuilder addProcessDefIdEquals(String JavaDoc exp);
57
58    /**
59     * Appends condition "process manager name == value of exp"
60     *
61     * @param exp
62     * @return itself
63     */

64    public ProcessIteratorExpressionBuilder addMgrNameEquals(String JavaDoc exp);
65
66    /**
67     * Appends condition "process manager version == value of exp"
68     *
69     * @param exp
70     * @return itself
71     */

72    public ProcessIteratorExpressionBuilder addVersionEquals(String JavaDoc exp);
73
74    /**
75     * Appends condition "process manager enabled"
76     *
77     * @return itself
78     */

79    public ProcessIteratorExpressionBuilder addIsMgrEnabled();
80
81    /**
82     * Appends condition "process state == arg"
83     *
84     * @param arg
85     * @return itself
86     */

87    public ProcessIteratorExpressionBuilder addStateEquals(String JavaDoc arg);
88
89    /**
90     * Appends condition "process state starts with arg"
91     *
92     * @param arg
93     * @return itself
94     * @see SharkConstants
95     */

96    public ProcessIteratorExpressionBuilder addStateStartsWith(String JavaDoc arg);
97
98    /**
99     * Appends condition "process id == arg"
100     *
101     * @param arg
102     * @return itself
103     */

104    public ProcessIteratorExpressionBuilder addIdEquals(String JavaDoc arg);
105
106    /**
107     * Appends condition "process name == arg"
108     *
109     * @param arg
110     * @return itself
111     */

112    public ProcessIteratorExpressionBuilder addNameEquals(String JavaDoc arg);
113
114    /**
115     * Appends condition "process priority == arg"
116     *
117     * @param arg
118     * @return itself
119     */

120    public ProcessIteratorExpressionBuilder addPriorityEquals(int arg);
121
122    /**
123     * Appends condition "process description == arg"
124     *
125     * @param arg
126     * @return itself
127     */

128    public ProcessIteratorExpressionBuilder addDescriptionEquals(String JavaDoc arg);
129
130    /**
131     * Appends condition "process description contains arg"
132     *
133     * @param arg
134     * @return itself
135     */

136    public ProcessIteratorExpressionBuilder addDescriptionContains(String JavaDoc arg);
137
138    /**
139     * Appends condition "process requester id == arg"
140     *
141     * @param arg
142     * @return itself
143     */

144    public ProcessIteratorExpressionBuilder addRequesterIdEquals(String JavaDoc arg);
145
146    /**
147     * Appends condition "process requester username == arg"
148     * <p>
149     *
150     * @param arg
151     * @return itself
152     */

153    public ProcessIteratorExpressionBuilder addRequesterUsernameEquals(String JavaDoc arg);
154
155    /**
156     * Appends condition "process created time == arg"
157     *
158     * @param arg
159     * @return itself
160     */

161    public ProcessIteratorExpressionBuilder addCreatedTimeEquals(long arg);
162
163    /**
164     * Appends condition "process created time < arg"
165     *
166     * @param arg
167     * @return itself
168     */

169    public ProcessIteratorExpressionBuilder addCreatedTimeBefore(long arg);
170
171    /**
172     * Appends condition "process created time > arg"
173     *
174     * @param arg
175     * @return itself
176     */

177    public ProcessIteratorExpressionBuilder addCreatedTimeAfter(long arg);
178
179    /**
180     * Appends condition "process start time == arg"
181     *
182     * @param arg
183     * @return itself
184     */

185    public ProcessIteratorExpressionBuilder addStartTimeEquals(long arg);
186
187    /**
188     * Appends condition "process start time < arg"
189     *
190     * @param arg
191     * @return itself
192     */

193    public ProcessIteratorExpressionBuilder addStartTimeBefore(long arg);
194
195    /**
196     * Appends condition "process start time > arg"
197     *
198     * @param arg
199     * @return itself
200     */

201    public ProcessIteratorExpressionBuilder addStartTimeAfter(long arg);
202
203    /**
204     * Appends condition "process last state time == arg"
205     *
206     * @param arg
207     * @return itself
208     */

209    public ProcessIteratorExpressionBuilder addLastStateTimeEquals(long arg);
210
211    /**
212     * Appends condition "process last state time < arg"
213     *
214     * @param arg
215     * @return itself
216     */

217    public ProcessIteratorExpressionBuilder addLastStateTimeBefore(long arg);
218
219    /**
220     * Appends condition "process last state time > arg"
221     *
222     * @param arg
223     * @return itself
224     */

225    public ProcessIteratorExpressionBuilder addLastStateTimeAfter(long arg);
226
227    /**
228     * Appends condition "process active activities count == arg"
229     *
230     * @param arg
231     * @return itself
232     */

233    public ProcessIteratorExpressionBuilder addActiveActivitiesCountEquals(long arg);
234
235    /**
236     * Appends condition "process active activities count > arg"
237     *
238     * @param arg
239     * @return itself
240     */

241    public ProcessIteratorExpressionBuilder addActiveActivitiesCountGreaterThan(long arg);
242
243    /**
244     * Appends condition "process active activities count < arg"
245     *
246     * @param arg
247     * @return itself
248     */

249    public ProcessIteratorExpressionBuilder addActiveActivitiesCountLessThan(long arg);
250
251    /**
252     * Appends condition "process variable vName == vValue"
253     *
254     * @param vName name of the variable to compare
255     * @param vValue value to compare against
256     * @return itself
257     * @throws RootException if class of the vValue isn't supported for
258     * compare
259     */

260    public ProcessIteratorExpressionBuilder addVariableEquals(String JavaDoc vName,
261                                                              Object JavaDoc vValue) throws RootException;
262
263    /**
264     * Appends condition "process variable vName == vValue"
265     *
266     * @param vName name of the variable to compare
267     * @param vValue value to compare against
268     * @return itself
269     */

270    public ProcessIteratorExpressionBuilder addVariableEquals(String JavaDoc vName,
271                                                              String JavaDoc vValue);
272
273    /**
274     * Appends condition "process variable vName == vValue"
275     *
276     * @param vName name of the variable to compare
277     * @param vValue value to compare against
278     * @return itself
279     */

280    public ProcessIteratorExpressionBuilder addVariableEquals(String JavaDoc vName,
281                                                              long vValue);
282
283    /**
284     * Appends condition "process variable vName > vValue"
285     *
286     * @param vName name of the variable to compare
287     * @param vValue value to compare against
288     * @return itself
289     */

290    public ProcessIteratorExpressionBuilder addVariableGreaterThan(String JavaDoc vName,
291                                                                   long vValue);
292
293    /**
294     * Appends condition "process variable vName < vValue"
295     *
296     * @param vName name of the variable to compare
297     * @param vValue value to compare against
298     * @return itself
299     */

300    public ProcessIteratorExpressionBuilder addVariableLessThan(String JavaDoc vName,
301                                                                long vValue);
302
303    /**
304     * Appends condition "process variable vName == vValue"
305     *
306     * @param vName name of the variable to compare
307     * @param vValue value to compare against
308     * @return itself
309     */

310    public ProcessIteratorExpressionBuilder addVariableEquals(String JavaDoc vName,
311                                                              double vValue);
312
313    /**
314     * Appends condition "process variable vName > vValue"
315     *
316     * @param vName name of the variable to compare
317     * @param vValue value to compare against
318     * @return itself
319     */

320    public ProcessIteratorExpressionBuilder addVariableGreaterThan(String JavaDoc vName,
321                                                                   double vValue);
322
323    /**
324     * Appends condition "process variable vName < vValue"
325     *
326     * @param vName name of the variable to compare
327     * @param vValue value to compare against
328     * @return itself
329     */

330    public ProcessIteratorExpressionBuilder addVariableLessThan(String JavaDoc vName,
331                                                                double vValue);
332
333    /**
334     * Appends arbitrary condition
335     * <p>
336     * Here you may specify any script compatible expression, but
337     * <b>beware complete expression will be evaluated inside Java VM
338     * </b>, not on DB.
339     *
340     * @param exp condition to add
341     * @return itself
342     */

343    public ProcessIteratorExpressionBuilder addExpression(String JavaDoc exp);
344
345    /**
346     * Appends condition contained inside other
347     * <tt>ProcessIteratorExpressionBuilder</tt>. This allows user to
348     * build more complicated expressions, by insterting eb condition
349     * into parenthesis.
350     *
351     * @param eb
352     * @return itself
353     */

354    public ProcessIteratorExpressionBuilder addExpression(ProcessIteratorExpressionBuilder eb);
355
356    /**
357     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
358     * actual expression (nor its evaluation), rather they affect sorting
359     * of the result.
360     * <p>
361     * This method sets ordering by process manager name value.
362     *
363     * @param ascending
364     * @return itself
365     */

366    public ProcessIteratorExpressionBuilder setOrderByMgrName(boolean ascending);
367
368    /**
369     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
370     * actual expression (nor its evaluation), rather they affect sorting
371     * of the result.
372     * <p>
373     * This method sets ordering by process id value.
374     *
375     * @param ascending
376     * @return itself
377     */

378    public ProcessIteratorExpressionBuilder setOrderById(boolean ascending);
379
380    /**
381     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
382     * actual expression (nor its evaluation), rather they affect sorting
383     * of the result.
384     * <p>
385     * This method sets ordering by process name value.
386     *
387     * @param ascending
388     * @return itself
389     */

390    public ProcessIteratorExpressionBuilder setOrderByName(boolean ascending);
391
392    /**
393     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
394     * actual expression (nor its evaluation), rather they affect sorting
395     * of the result.
396     * <p>
397     * This method sets ordering by process state value.
398     *
399     * @param ascending
400     * @return itself
401     */

402    public ProcessIteratorExpressionBuilder setOrderByState(boolean ascending);
403
404    /**
405     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
406     * actual expression (nor its evaluation), rather they affect sorting
407     * of the result.
408     * <p>
409     * This method sets ordering by process priority value.
410     *
411     * @param ascending
412     * @return itself
413     */

414    public ProcessIteratorExpressionBuilder setOrderByPriority(boolean ascending);
415
416    /**
417     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
418     * actual expression (nor its evaluation), rather they affect sorting
419     * of the result.
420     * <p>
421     * This method sets ordering by process created time value.
422     *
423     * @param ascending
424     * @return itself
425     */

426    public ProcessIteratorExpressionBuilder setOrderByCreatedTime(boolean ascending);
427
428    /**
429     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
430     * actual expression (nor its evaluation), rather they affect sorting
431     * of the result.
432     * <p>
433     * This method sets ordering by process start time value.
434     *
435     * @param ascending
436     * @return itself
437     */

438    public ProcessIteratorExpressionBuilder setOrderByStartTime(boolean ascending);
439
440    /**
441     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
442     * actual expression (nor its evaluation), rather they affect sorting
443     * of the result.
444     * <p>
445     * This method sets ordering by process last state time value.
446     *
447     * @param ascending
448     * @return itself
449     */

450    public ProcessIteratorExpressionBuilder setOrderByLastStateTime(boolean ascending);
451
452    /**
453     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
454     * actual expression (nor its evaluation), rather they affect sorting
455     * of the result.
456     * <p>
457     * This method sets ordering by process resource requester id value.
458     *
459     * @param ascending
460     * @return itself
461     */

462    public ProcessIteratorExpressionBuilder setOrderByResourceRequesterId(boolean ascending);
463 }
Popular Tags