aboutsummaryrefslogtreecommitdiff
path: root/src/corba/CosQueryCollection.idl
blob: c68e7303dfff0215d94c76b4b3341fed7106cc78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* RCS $PostgreSQL: pgsql/src/corba/CosQueryCollection.idl,v 1.3 2003/11/29 22:40:52 pgsql Exp $
 *
 * ----------------------------------------------------------------------------
 * This is unmarked software provided by the Object Management Group,Inc. (OMG)
 * ----------------------------------------------------------------------------
 */


/**
 * CosQueryCollection is the Common Object Services Specification query
 * query colleciton module as it it appears in COSS1, v1.0.
 */


#ifndef CosQueryCollection_idl
#define CosQueryCollection_idl

module CosQueryCollection {

  exception ElementInvalid {};
  exception IteratorInvalid {};
  exception PositionInvalid {};

  typedef string Istring;
  struct NVPair {
    Istring name;
    any value;
  };

  typedef sequence<NVPair> ParameterList;

  interface Collection;
  interface Iterator;

  interface CollectionFactory {
    Collection create (in ParameterList params);
  };

  interface Collection {

    readonly attribute long cardinality;

    void add_element (in any element)
      raises(ElementInvalid);

    void add_all_elements (in Collection elements)
      raises(ElementInvalid);

    void insert_element_at (in any element, in Iterator where)
      raises(IteratorInvalid,
	     ElementInvalid);

    void replace_element_at (in any element, in Iterator  where)
      raises(IteratorInvalid,
	     PositionInvalid,
	     ElementInvalid);

    void remove_element_at (in Iterator where)
      raises(IteratorInvalid,
	     PositionInvalid);

    void remove_all_elements ();

    any retrieve_element_at (in Iterator where)
      raises(IteratorInvalid,
	     PositionInvalid);

    Iterator create_iterator ();

  };

  interface Iterator {
    any next ()
      raises(IteratorInvalid,
	     PositionInvalid);
    void reset ();
    boolean more ();
  };

};

#endif // CosQueryCollection_idl