KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > corba > WfEventAuditIteratorCORBA


1 package org.enhydra.shark.corba;
2
3 import org.omg.WfBase.*;
4 import org.omg.WorkflowModel.WfEventAudit;
5 import org.omg.WorkflowModel._WfEventAuditIteratorImplBase;
6
7 /**
8  * Iterator for event audits of activity or the process.
9  *
10  * @author Sasa Bojanic
11  * @version 1.0
12  */

13 public class WfEventAuditIteratorCORBA extends _WfEventAuditIteratorImplBase {
14
15    org.enhydra.shark.api.client.wfmodel.WfEventAuditIterator myIterator;
16    private Collective __collective;
17
18    protected WfEventAuditIteratorCORBA(Collective toJoin, org.enhydra.shark.api.client.wfmodel.WfEventAuditIterator iter) throws BaseException {
19       __collective = toJoin;
20       toJoin.__recruit(this);
21       this.myIterator = iter;
22    }
23
24    public String JavaDoc query_expression() throws BaseException {
25       try {
26          return myIterator.query_expression();
27       } catch (Exception JavaDoc ex) {
28          throw new BaseException();
29       }
30    }
31
32    /*
33     * The following names may be used: time_stamp, event_type,
34     * activity_key, activity_name, process_key, process_name,
35     * process_mgr_name, package_id process_mgr_version.
36     */

37    public void set_query_expression(String JavaDoc query) throws BaseException,
38                                                  InvalidQuery {
39       try {
40          myIterator.set_query_expression(query);
41       } catch (org.enhydra.shark.api.client.wfbase.InvalidQuery iq) {
42          throw new InvalidQuery();
43       } catch (Exception JavaDoc ex) {
44          throw new BaseException();
45       }
46    }
47
48    public NameValue[] names_in_expression() throws BaseException {
49       try {
50          return SharkCORBAUtilities.makeCORBANameValueArray(this._orb(),
51                                                             myIterator.names_in_expression());
52       } catch (Exception JavaDoc ex) {
53          throw new BaseException();
54       }
55    }
56
57    public void set_names_in_expression(NameValue[] query) throws BaseException,
58                                                          NameMismatch {
59       try {
60          myIterator.set_names_in_expression(SharkCORBAUtilities.makeMap(query));
61       } catch (org.enhydra.shark.api.client.wfbase.NameMismatch nm) {
62          throw new NameMismatch();
63       } catch (Exception JavaDoc ex) {
64          throw new BaseException();
65       }
66    }
67
68    public String JavaDoc query_grammar() throws BaseException {
69       try {
70          return myIterator.query_grammar();
71       } catch (Exception JavaDoc ex) {
72          throw new BaseException();
73       }
74    }
75
76    public void set_query_grammar(String JavaDoc query_grammmar) throws BaseException,
77                                                        GrammarNotSupported {
78       try {
79          myIterator.set_query_grammar(query_grammmar);
80       } catch (org.enhydra.shark.api.client.wfbase.GrammarNotSupported gns) {
81          throw new GrammarNotSupported();
82       } catch (Exception JavaDoc ex) {
83          throw new BaseException();
84       }
85    }
86
87    public int how_many() throws BaseException {
88       try {
89          return myIterator.how_many();
90       } catch (Exception JavaDoc ex) {
91          throw new BaseException();
92       }
93    }
94
95    public void goto_start() throws BaseException {
96       try {
97          myIterator.goto_start();
98       } catch (Exception JavaDoc ex) {
99          throw new BaseException();
100       }
101    }
102
103    public void goto_end() throws BaseException {
104       try {
105          myIterator.goto_end();
106       } catch (Exception JavaDoc ex) {
107          throw new BaseException();
108       }
109    }
110
111    public WfEventAudit get_next_object() throws BaseException {
112       try {
113          return SharkCORBAUtilities.makeCORBAEventAudit(__collective, myIterator.get_next_object());
114       } catch (Exception JavaDoc ex) {
115          throw new BaseException();
116       }
117    }
118
119    public WfEventAudit get_previous_object() throws BaseException {
120       try {
121          return SharkCORBAUtilities.makeCORBAEventAudit(__collective, myIterator.get_previous_object());
122       } catch (Exception JavaDoc ex) {
123          throw new BaseException();
124       }
125    }
126
127    public WfEventAudit[] get_next_n_sequence(int max_number) throws BaseException {
128       try {
129          return SharkCORBAUtilities.makeCORBAEventAudits(__collective, myIterator.get_next_n_sequence(max_number));
130       } catch (Exception JavaDoc ex) {
131          throw new BaseException();
132       }
133    }
134
135    public WfEventAudit[] get_previous_n_sequence(int max_number) throws BaseException {
136       try {
137          return SharkCORBAUtilities.makeCORBAEventAudits(__collective, myIterator.get_previous_n_sequence(max_number));
138       } catch (Exception JavaDoc ex) {
139          throw new BaseException();
140       }
141    }
142
143 }
Popular Tags