KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* ActivityIteratorExpressionBuilder.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  * ActivityIteratorExpressionBuilder
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 ActivityIteratorExpressionBuilder extends
19                                                   ExpressionBuilder,
20                                                   Serializable JavaDoc {
21
22    /**
23     * Adds logical operator <tt>AND</tt> to this builder.
24     *
25     * @return ActivityIteratorExpressionBuilder instance to bind next
26     * method
27     */

28    public abstract ActivityIteratorExpressionBuilder and();
29
30    /**
31     * Adds logical operator <tt>OR</tt> to this builder.
32     *
33     * @return ActivityIteratorExpressionBuilder instance to bind next
34     * method
35     */

36    public abstract ActivityIteratorExpressionBuilder or();
37
38    /**
39     * Adds logical operator <tt>NOT</tt> to this builder.
40     *
41     * @return ActivityIteratorExpressionBuilder instance to bind next
42     * method
43     */

44    public abstract ActivityIteratorExpressionBuilder not();
45
46    /**
47     * Appends condition "process definition id == value of exp"
48     *
49     * @param exp
50     * @return ActivityIteratorExpressionBuilder instance to bind next
51     * method
52     */

53    public ActivityIteratorExpressionBuilder addPackageIdEquals(String JavaDoc exp);
54
55    /**
56     * Appends condition "process definition id == value of exp"
57     *
58     * @param exp
59     * @return ActivityIteratorExpressionBuilder instance to bind next
60     * method
61     */

62    public ActivityIteratorExpressionBuilder addProcessDefIdEquals(String JavaDoc exp);
63
64    /**
65     * Appends condition "process manager name == value of exp"
66     *
67     * @param exp
68     * @return ActivityIteratorExpressionBuilder instance to bind next
69     * method
70     */

71    public ActivityIteratorExpressionBuilder addMgrNameEquals(String JavaDoc exp);
72
73    /**
74     * Appends condition "process manager version == value of exp"
75     *
76     * @param exp
77     * @return ActivityIteratorExpressionBuilder instance to bind next
78     * method
79     */

80    public ActivityIteratorExpressionBuilder addVersionEquals(String JavaDoc exp);
81
82    /**
83     * Appends condition "process manager is enabled"
84     *
85     * @return ActivityIteratorExpressionBuilder instance to bind next
86     * method
87     */

88    public ActivityIteratorExpressionBuilder addIsMgrEnabled();
89
90    /**
91     * Appends condition "process state == value of exp"
92     *
93     * @param arg
94     * @return ActivityIteratorExpressionBuilder instance to bind next
95     * method
96     */

97    public ActivityIteratorExpressionBuilder addProcessStateEquals(String JavaDoc arg);
98
99    /**
100     * Appends condition "process state starts with value of exp"
101     *
102     * @param arg
103     * @return ActivityIteratorExpressionBuilder instance to bind next
104     * method
105     */

106    public ActivityIteratorExpressionBuilder addProcessStateStartsWith(String JavaDoc arg);
107
108    /**
109     * Appends condition "process id == value of exp"
110     *
111     * @param arg
112     * @return ActivityIteratorExpressionBuilder instance to bind next
113     * method
114     */

115    public ActivityIteratorExpressionBuilder addProcessIdEquals(String JavaDoc arg);
116
117    /**
118     * Appends condition "process name == value of exp"
119     *
120     * @param arg
121     * @return ActivityIteratorExpressionBuilder instance to bind next
122     * method
123     */

124    public ActivityIteratorExpressionBuilder addProcessNameEquals(String JavaDoc arg);
125
126    /**
127     * Appends condition "process priority == value of exp"
128     *
129     * @param arg
130     * @return ActivityIteratorExpressionBuilder instance to bind next
131     * method
132     */

133    public ActivityIteratorExpressionBuilder addProcessPriorityEquals(int arg);
134
135    /**
136     * Appends condition "process description == value of exp"
137     *
138     * @param arg
139     * @return ActivityIteratorExpressionBuilder instance to bind next
140     * method
141     */

142    public ActivityIteratorExpressionBuilder addProcessDescriptionEquals(String JavaDoc arg);
143
144    /**
145     * Appends condition "process description contains value of exp"
146     *
147     * @param arg
148     * @return ActivityIteratorExpressionBuilder instance to bind next
149     * method
150     */

151    public ActivityIteratorExpressionBuilder addProcessDescriptionContains(String JavaDoc arg);
152
153    /**
154     * Appends condition "process requester == value of exp"
155     *
156     * @param arg
157     * @return ActivityIteratorExpressionBuilder instance to bind next
158     * method
159     */

160    public ActivityIteratorExpressionBuilder addProcessRequesterIdEquals(String JavaDoc arg);
161
162    /**
163     * Appends condition "process created time == value of exp"
164     *
165     * @param arg
166     * @return ActivityIteratorExpressionBuilder instance to bind next
167     * method
168     */

169    public ActivityIteratorExpressionBuilder addProcessCreatedTimeEquals(long arg);
170
171    /**
172     * Appends condition "process created time < value of exp"
173     *
174     * @param arg
175     * @return ActivityIteratorExpressionBuilder instance to bind next
176     * method
177     */

178    public ActivityIteratorExpressionBuilder addProcessCreatedTimeBefore(long arg);
179
180    /**
181     * Appends condition "process created time > value of exp"
182     *
183     * @param arg
184     * @return ActivityIteratorExpressionBuilder instance to bind next
185     * method
186     */

187    public ActivityIteratorExpressionBuilder addProcessCreatedTimeAfter(long arg);
188
189    /**
190     * Appends condition "process started time == value of exp"
191     *
192     * @param arg
193     * @return ActivityIteratorExpressionBuilder instance to bind next
194     * method
195     */

196    public ActivityIteratorExpressionBuilder addProcessStartTimeEquals(long arg);
197
198    /**
199     * Appends condition "process started time < value of exp"
200     *
201     * @param arg
202     * @return ActivityIteratorExpressionBuilder instance to bind next
203     * method
204     */

205    public ActivityIteratorExpressionBuilder addProcessStartTimeBefore(long arg);
206
207    /**
208     * Appends condition "process started time > value of exp"
209     *
210     * @param arg
211     * @return ActivityIteratorExpressionBuilder instance to bind next
212     * method
213     */

214    public ActivityIteratorExpressionBuilder addProcessStartTimeAfter(long arg);
215
216    /**
217     * Appends condition "process last state time time == value of exp"
218     *
219     * @param arg
220     * @return ActivityIteratorExpressionBuilder instance to bind next
221     * method
222     */

223    public ActivityIteratorExpressionBuilder addProcessLastStateTimeEquals(long arg);
224
225    /**
226     * Appends condition "process last state time time < value of exp"
227     *
228     * @param arg
229     * @return ActivityIteratorExpressionBuilder instance to bind next
230     * method
231     */

232    public ActivityIteratorExpressionBuilder addProcessLastStateTimeBefore(long arg);
233
234    /**
235     * Appends condition "process last state time time > value of exp"
236     *
237     * @param arg
238     * @return ActivityIteratorExpressionBuilder instance to bind next
239     * method
240     */

241    public ActivityIteratorExpressionBuilder addProcessLastStateTimeAfter(long arg);
242
243    /**
244     * Appends condition "process variable vName == vValue"
245     *
246     * @param vName name of the variable to compare
247     * @param vValue value to compare against
248     * @return itself
249     * @throws RootException if class of the vValue isn't supported for
250     * compare
251     */

252    public ActivityIteratorExpressionBuilder addProcessVariableEquals(String JavaDoc vName,
253                                                                      Object JavaDoc vValue) throws RootException;
254
255    /**
256     * Appends condition "process variable vName == vValue"
257     *
258     * @param vName name of the variable to compare
259     * @param vValue value to compare against
260     * @return ActivityIteratorExpressionBuilder instance to bind next
261     * method
262     */

263    public ActivityIteratorExpressionBuilder addProcessVariableEquals(String JavaDoc vName,
264                                                                      String JavaDoc vValue);
265
266    /**
267     * Appends condition "process variable vName == vValue"
268     *
269     * @param vName name of the variable to compare
270     * @param vValue value to compare against
271     * @return ActivityIteratorExpressionBuilder instance to bind next
272     * method
273     */

274    public ActivityIteratorExpressionBuilder addProcessVariableEquals(String JavaDoc vName,
275                                                                      long vValue);
276
277    /**
278     * Appends condition "process variable vName > vValue"
279     *
280     * @param vName name of the variable to compare
281     * @param vValue value to compare against
282     * @return ActivityIteratorExpressionBuilder instance to bind next
283     * method
284     */

285    public ActivityIteratorExpressionBuilder addProcessVariableGreaterThan(String JavaDoc vName,
286                                                                           long vValue);
287
288    /**
289     * Appends condition "process variable vName < vValue"
290     *
291     * @param vName name of the variable to compare
292     * @param vValue value to compare against
293     * @return ActivityIteratorExpressionBuilder instance to bind next
294     * method
295     */

296    public ActivityIteratorExpressionBuilder addProcessVariableLessThan(String JavaDoc vName,
297                                                                        long vValue);
298
299    /**
300     * Appends condition "process variable vName == vValue"
301     *
302     * @param vName name of the variable to compare
303     * @param vValue value to compare against
304     * @return ActivityIteratorExpressionBuilder instance to bind next
305     * method
306     */

307    public ActivityIteratorExpressionBuilder addProcessVariableEquals(String JavaDoc vName,
308                                                                      double vValue);
309
310    /**
311     * Appends condition "process variable vName > vValue"
312     *
313     * @param vName name of the variable to compare
314     * @param vValue value to compare against
315     * @return ActivityIteratorExpressionBuilder instance to bind next
316     * method
317     */

318    public ActivityIteratorExpressionBuilder addProcessVariableGreaterThan(String JavaDoc vName,
319                                                                           double vValue);
320
321    /**
322     * Appends condition "process variable vName < vValue"
323     *
324     * @param vName name of the variable to compare
325     * @param vValue value to compare against
326     * @return ActivityIteratorExpressionBuilder instance to bind next
327     * method
328     */

329    public ActivityIteratorExpressionBuilder addProcessVariableLessThan(String JavaDoc vName,
330                                                                        double vValue);
331
332    /**
333     * Appends condition "activity state == arg"
334     *
335     * @param arg
336     * @return ActivityIteratorExpressionBuilder instance to bind next
337     * method
338     */

339    public ActivityIteratorExpressionBuilder addStateEquals(String JavaDoc arg);
340
341    /**
342     * Appends condition "activity state starts with arg"
343     *
344     * @param arg
345     * @return ActivityIteratorExpressionBuilder instance to bind next
346     * method
347     */

348    public ActivityIteratorExpressionBuilder addStateStartsWith(String JavaDoc arg);
349
350    /**
351     * Appends condition "activity id == arg"
352     *
353     * @param arg
354     * @return ActivityIteratorExpressionBuilder instance to bind next
355     * method
356     */

357    public ActivityIteratorExpressionBuilder addIdEquals(String JavaDoc arg);
358
359    /**
360     * Appends condition "activity name == arg"
361     *
362     * @param arg
363     * @return ActivityIteratorExpressionBuilder instance to bind next
364     * method
365     */

366    public ActivityIteratorExpressionBuilder addNameEquals(String JavaDoc arg);
367
368    /**
369     * Appends condition "activity priority == arg"
370     *
371     * @param arg
372     * @return ActivityIteratorExpressionBuilder instance to bind next
373     * method
374     */

375    public ActivityIteratorExpressionBuilder addPriorityEquals(int arg);
376
377    /**
378     * Appends condition "activity description == arg"
379     *
380     * @param arg
381     * @return ActivityIteratorExpressionBuilder instance to bind next
382     * method
383     */

384    public ActivityIteratorExpressionBuilder addDescriptionEquals(String JavaDoc arg);
385
386    /**
387     * Appends condition "activity description contains arg"
388     *
389     * @param arg
390     * @return ActivityIteratorExpressionBuilder instance to bind next
391     * method
392     */

393    public ActivityIteratorExpressionBuilder addDescriptionContains(String JavaDoc arg);
394
395    /**
396     * Appends condition "activity activated time == arg"
397     *
398     * @param arg
399     * @return ActivityIteratorExpressionBuilder instance to bind next
400     * method
401     */

402    public ActivityIteratorExpressionBuilder addActivatedTimeEquals(long arg);
403
404    /**
405     * Appends condition "activity activated time < arg"
406     *
407     * @param arg
408     * @return ActivityIteratorExpressionBuilder instance to bind next
409     * method
410     */

411    public ActivityIteratorExpressionBuilder addActivatedTimeBefore(long arg);
412
413    /**
414     * Appends condition "activity activated time > arg"
415     *
416     * @param arg
417     * @return ActivityIteratorExpressionBuilder instance to bind next
418     * method
419     */

420    public ActivityIteratorExpressionBuilder addActivatedTimeAfter(long arg);
421
422    /**
423     * Appends condition "activity last state time == arg"
424     *
425     * @param arg
426     * @return ActivityIteratorExpressionBuilder instance to bind next
427     * method
428     */

429    public ActivityIteratorExpressionBuilder addLastStateTimeEquals(long arg);
430
431    /**
432     * Appends condition "activity last state time < arg"
433     *
434     * @param arg
435     * @return ActivityIteratorExpressionBuilder instance to bind next
436     * method
437     */

438    public ActivityIteratorExpressionBuilder addLastStateTimeBefore(long arg);
439
440    /**
441     * Appends condition "activity last state time > arg"
442     *
443     * @param arg
444     * @return ActivityIteratorExpressionBuilder instance to bind next
445     * method
446     */

447    public ActivityIteratorExpressionBuilder addLastStateTimeAfter(long arg);
448
449    /**
450     * Appends condition "activity accepted time == arg"
451     *
452     * @param arg
453     * @return ActivityIteratorExpressionBuilder instance to bind next
454     * method
455     */

456    public ActivityIteratorExpressionBuilder addAcceptedTimeEquals(long arg);
457
458    /**
459     * Appends condition "activity accepted time < arg"
460     *
461     * @param arg
462     * @return ActivityIteratorExpressionBuilder instance to bind next
463     * method
464     */

465    public ActivityIteratorExpressionBuilder addAcceptedTimeBefore(long arg);
466
467    /**
468     * Appends condition "activity accepted time > arg"
469     *
470     * @param arg
471     * @return ActivityIteratorExpressionBuilder instance to bind next
472     * method
473     */

474    public ActivityIteratorExpressionBuilder addAcceptedTimeAfter(long arg);
475
476    /**
477     * Appends condition "activity variable vName == vValue"
478     *
479     * @param vName name of the variable to compare
480     * @param vValue value to compare against
481     * @return itself
482     * @throws RootException if class of the vValue isn't supported for
483     * compare
484     */

485    public ActivityIteratorExpressionBuilder addVariableEquals(String JavaDoc vName,
486                                                               Object JavaDoc vValue) throws RootException;
487
488    /**
489     * Appends condition "activity variable vName == vValue"
490     *
491     * @param vName name of the variable to compare
492     * @param vValue value to compare against
493     * @return ActivityIteratorExpressionBuilder instance to bind next
494     * method
495     */

496    public ActivityIteratorExpressionBuilder addVariableEquals(String JavaDoc vName,
497                                                               String JavaDoc vValue);
498
499    /**
500     * Appends condition "activity variable vName == vValue"
501     *
502     * @param vName name of the variable to compare
503     * @param vValue value to compare against
504     * @return ActivityIteratorExpressionBuilder instance to bind next
505     * method
506     */

507    public ActivityIteratorExpressionBuilder addVariableEquals(String JavaDoc vName,
508                                                               long vValue);
509
510    /**
511     * Appends condition "activity variable vName > vValue"
512     *
513     * @param vName name of the variable to compare
514     * @param vValue value to compare against
515     * @return ActivityIteratorExpressionBuilder instance to bind next
516     * method
517     */

518    public ActivityIteratorExpressionBuilder addVariableGreaterThan(String JavaDoc vName,
519                                                                    long vValue);
520
521    /**
522     * Appends condition "activity variable vName < vValue"
523     *
524     * @param vName name of the variable to compare
525     * @param vValue value to compare against
526     * @return ActivityIteratorExpressionBuilder instance to bind next
527     * method
528     */

529    public ActivityIteratorExpressionBuilder addVariableLessThan(String JavaDoc vName,
530                                                                 long vValue);
531
532    /**
533     * Appends condition "activity variable vName == vValue"
534     *
535     * @param vName name of the variable to compare
536     * @param vValue value to compare against
537     * @return ActivityIteratorExpressionBuilder instance to bind next
538     * method
539     */

540    public ActivityIteratorExpressionBuilder addVariableEquals(String JavaDoc vName,
541                                                               double vValue);
542
543    /**
544     * Appends condition "activity variable vName > vValue"
545     *
546     * @param vName name of the variable to compare
547     * @param vValue value to compare against
548     * @return ActivityIteratorExpressionBuilder instance to bind next
549     * method
550     */

551    public ActivityIteratorExpressionBuilder addVariableGreaterThan(String JavaDoc vName,
552                                                                    double vValue);
553
554    /**
555     * Appends condition "activity variable vName < vValue"
556     *
557     * @param vName name of the variable to compare
558     * @param vValue value to compare against
559     * @return ActivityIteratorExpressionBuilder instance to bind next
560     * method
561     */

562    public ActivityIteratorExpressionBuilder addVariableLessThan(String JavaDoc vName,
563                                                                 double vValue);
564
565    /**
566     * Appends condition "activity set definition id == arg"
567     *
568     * @param arg
569     * @return ActivityIteratorExpressionBuilder instance to bind next
570     * method
571     */

572    public ActivityIteratorExpressionBuilder addActivitySetDefId(String JavaDoc arg);
573
574    /**
575     * Appends condition "activity definition id == arg"
576     *
577     * @param arg
578     * @return ActivityIteratorExpressionBuilder instance to bind next
579     * method
580     */

581    public ActivityIteratorExpressionBuilder addDefinitionId(String JavaDoc arg);
582
583    /**
584     * Appends condition "activity is accepted"
585     *
586     * @return ActivityIteratorExpressionBuilder instance to bind next
587     * method
588     */

589    public ActivityIteratorExpressionBuilder addIsAccepted();
590
591    /**
592     * Appends condition "activity resource username == arg"
593     *
594     * @param arg
595     * @return ActivityIteratorExpressionBuilder instance to bind next
596     * method
597     */

598    public ActivityIteratorExpressionBuilder addResourceUsername(String JavaDoc arg);
599
600    /**
601     * Appends arbitrary condition
602     * <p>
603     * Here you may specify any script compatible expression, but
604     * <b>beware complete expression will be evaluated inside Java VM
605     * </b>, not on DB.
606     *
607     * @param exp condition to add
608     * @return itself
609     */

610    public ActivityIteratorExpressionBuilder addExpression(String JavaDoc exp);
611
612    /**
613     * Appends condition contained inside other
614     * <tt>ActivityIteratorExpressionBuilder</tt>. This allows user to
615     * build more complicated expressions, by insterting eb condition
616     * into parenthesis.
617     *
618     * @param eb
619     * @return ActivityIteratorExpressionBuilder instance to bind next
620     * method
621     */

622    public ActivityIteratorExpressionBuilder addExpression(ActivityIteratorExpressionBuilder eb);
623
624    /**
625     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
626     * actual expression (nor its evaluation), rather they affect sorting
627     * of the result.
628     * <p>
629     * This method sets ordering by activity id.
630     *
631     * @param ascending
632     * @return itself
633     */

634    public ActivityIteratorExpressionBuilder setOrderById(boolean ascending);
635
636    /**
637     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
638     * actual expression (nor its evaluation), rather they affect sorting
639     * of the result.
640     * <p>
641     * This method sets ordering by activity set definition id.
642     *
643     * @param ascending
644     * @return itself
645     */

646    public ActivityIteratorExpressionBuilder setOrderByActivitySetDefId(boolean ascending);
647
648    /**
649     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
650     * actual expression (nor its evaluation), rather they affect sorting
651     * of the result.
652     * <p>
653     * This method sets ordering by activity definition id.
654     *
655     * @param ascending
656     * @return itself
657     */

658    public ActivityIteratorExpressionBuilder setOrderByDefinitionId(boolean ascending);
659
660    /**
661     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
662     * actual expression (nor its evaluation), rather they affect sorting
663     * of the result.
664     * <p>
665     * This method sets ordering by process id.
666     *
667     * @param ascending
668     * @return itself
669     */

670    public ActivityIteratorExpressionBuilder setOrderByProcessId(boolean ascending);
671
672    /**
673     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
674     * actual expression (nor its evaluation), rather they affect sorting
675     * of the result.
676     * <p>
677     * This method sets ordering by resource username.
678     *
679     * @param ascending
680     * @return itself
681     */

682    public ActivityIteratorExpressionBuilder setOrderByResourceUsername(boolean ascending);
683
684    /**
685     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
686     * actual expression (nor its evaluation), rather they affect sorting
687     * of the result.
688     * <p>
689     * This method sets ordering by process manager name value.
690     *
691     * @param ascending
692     * @return itself
693     */

694    public ActivityIteratorExpressionBuilder setOrderByProcessDefName(boolean ascending);
695
696    /**
697     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
698     * actual expression (nor its evaluation), rather they affect sorting
699     * of the result.
700     * <p>
701     * This method sets ordering by activity state.
702     *
703     * @param ascending
704     * @return itself
705     */

706    public ActivityIteratorExpressionBuilder setOrderByState(boolean ascending);
707
708    /**
709     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
710     * actual expression (nor its evaluation), rather they affect sorting
711     * of the result.
712     * <p>
713     * This method sets ordering by performer value.
714     *
715     * @param ascending
716     * @return itself
717     */

718    public ActivityIteratorExpressionBuilder setOrderByPerformer(boolean ascending);
719
720    /**
721     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
722     * actual expression (nor its evaluation), rather they affect sorting
723     * of the result.
724     * <p>
725     * This method sets ordering by priority value.
726     *
727     * @param ascending
728     * @return itself
729     */

730    public ActivityIteratorExpressionBuilder setOrderByPriority(boolean ascending);
731
732    /**
733     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
734     * actual expression (nor its evaluation), rather they affect sorting
735     * of the result.
736     * <p>
737     * This method sets ordering by activity name value.
738     *
739     * @param ascending
740     * @return itself
741     */

742    public ActivityIteratorExpressionBuilder setOrderByName(boolean ascending);
743
744    /**
745     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
746     * actual expression (nor its evaluation), rather they affect sorting
747     * of the result.
748     * <p>
749     * This method sets ordering by activity activated time value.
750     *
751     * @param ascending
752     * @return itself
753     */

754    public ActivityIteratorExpressionBuilder setOrderByActivatedTime(boolean ascending);
755
756    /**
757     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
758     * actual expression (nor its evaluation), rather they affect sorting
759     * of the result.
760     * <p>
761     * This method sets ordering by activity accepted time value.
762     *
763     * @param ascending
764     * @return itself
765     */

766    public ActivityIteratorExpressionBuilder setOrderByAcceptedTime(boolean ascending);
767
768    /**
769     * Methods starting with <tt>setOrderBy</tt> obviously don't affect
770     * actual expression (nor its evaluation), rather they affect sorting
771     * of the result.
772     * <p>
773     * This method sets ordering by last state time value.
774     *
775     * @param ascending
776     * @return itself
777     */

778    public ActivityIteratorExpressionBuilder setOrderByLastStateTime(boolean ascending);
779 }
Popular Tags