01: package org.enhydra.shark.api.client.wfbase;
02:
03: import java.util.Map;
04:
05: /**
06: * Java implementation of OMG's interface. This is how OMG defines it:
07: * <p>
08: * The BaseIterator interface is used to navigate relationships of cardinality
09: * greater than 1 in this specification. It supports specification of a filter
10: * using parameterized query expressions.
11: */
12: public interface BaseIterator {
13: /** Returns the query expression used to filter the contents of the iterator. */
14: String query_expression() throws Exception;
15:
16: /** Defines the query expression used to filter the contents of the iterator. */
17: void set_query_expression(String query) throws Exception,
18: InvalidQuery;
19:
20: /**
21: * OMG definition: Returns a set of parameters that are used to substitute variables in the
22: * query_expression. The parameters are defined by name-value pairs, where the name
23: * identifies the variable and the value represents the variable value to be substituted.
24: */
25: Map names_in_expression() throws Exception;
26:
27: /**
28: * NOTE: It does not have any influence on querying in our implementations.
29: * <p>
30: * OMG definition: Defines a set of parameters that are used to substitute variables in the
31: * query_expression. The parameters are defined by name-value pairs, where the name
32: * identifies the variable and the value represents the variable value to be substituted.
33: */
34: void set_names_in_expression(Map query) throws Exception,
35: NameMismatch;
36:
37: /**
38: * OMG definition: The query_grammar attribute identifies the query grammar
39: * used to define the query expression. The Constraint Language defined by
40: * the OMG Object Trading Service is used as the mandatory query grammar in
41: * this specification; implementations of the WfM Facility may support
42: * additional query grammars. The Trader Constraint Language is identified
43: * via the string TCL.
44: */
45: String query_grammar() throws Exception;
46:
47: /**
48: * OMG definition: The query_grammar attribute identifies the query grammar
49: * used to define the query expression. The Constraint Language defined by
50: * the OMG Object Trading Service is used as the mandatory query gramma in
51: * this specification; implementations of the WfM Facility may support
52: * additional query grammars. The Trader Constraint Language is identified
53: * via the string TCL.
54: */
55: void set_query_grammar(String query_grammmar) throws Exception,
56: GrammarNotSupported;
57:
58: /** Returns the number of elements in the collection. */
59: int how_many() throws Exception;
60:
61: /**
62: * Positions the iterator such that the next "next" retrieval will retrieve
63: * the first element in he collection.
64: */
65: void goto_start() throws Exception;
66:
67: /**
68: * Positions the iterator such that the next "previous" retrieval will
69: * retrieve the last element in the collection.
70: */
71: void goto_end() throws Exception;
72:
73: }
|