KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.corba;
2
3 import org.omg.WfBase.*;
4 import org.omg.WorkflowModel.WfAssignment;
5 import org.omg.WorkflowModel._WfAssignmentIteratorImplBase;
6
7 /**
8  * Iterator for assignments of activity.
9  *
10  * @author Sasa Bojanic
11  * @version 1.0
12  */

13 public class WfAssignmentIteratorCORBA extends _WfAssignmentIteratorImplBase {
14    //private SharkCORBAServer myServer;
15

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