7fd59977 |
1 | -- File: DDF_Transaction.cdl |
2 | -- ------------------- |
3 | -- Author: DAUTRY Philippe |
4 | -- <fid@fox.paris1.matra-dtv.fr> |
5 | ---Copyright: MATRA DATAVISION 1997 |
6 | |
7 | ---Version: 0.0 |
8 | ---History: Version Date Purpose |
9 | -- 0.0 Nov 4 1997 Creation |
10 | |
11 | class Transaction from DDF |
12 | inherits TShared from MMgt |
13 | |
14 | ---Purpose: This class encapsulates TDF_Transaction. |
15 | |
16 | uses |
17 | |
18 | Data from TDF, |
19 | Delta from TDF, |
20 | Transaction from TDF |
21 | |
22 | raises |
23 | |
24 | DomainError, NullObject from Standard |
25 | |
26 | is |
27 | |
28 | Create |
29 | returns Transaction from DDF; |
30 | ---Purpose: Creates an empty transaction context, unable to be |
31 | -- opened. |
32 | |
33 | Create(aDF : Data from TDF) |
34 | returns Transaction from DDF; |
35 | ---Purpose: Creates a transaction context on <aDF>, ready to |
36 | -- be opened. |
37 | |
38 | Open(me : mutable) |
39 | returns Integer from Standard; |
40 | ---Purpose: If not yet done, opens a new transaction on |
41 | -- <myDF>. Returns the index of the just opened |
42 | -- transaction. |
43 | -- |
44 | -- It raises DomainError if the transaction is |
45 | -- already open, and NullObject if there is no |
46 | -- current Data framework. |
47 | |
48 | Commit(me : mutable; |
49 | withDelta : Boolean from Standard = Standard_False) |
50 | returns Delta from TDF; |
51 | ---Purpose: Commits the transactions until AND including the |
52 | -- current opened one. |
53 | |
54 | Abort(me : mutable); |
55 | ---Purpose: Aborts the transactions until AND including the |
56 | -- current opened one. |
57 | -- |
58 | ---C++: alias ~ |
59 | |
60 | Data(me) returns Data from TDF; |
61 | ---Purpose: Returns the Data from TDF. |
62 | |
63 | Transaction(me) returns Integer from Standard; |
64 | ---Purpose: Returns the number of the transaction opened by <me>. |
65 | |
66 | IsOpen(me) |
67 | returns Boolean from Standard; |
68 | ---Purpose: Returns true if the transaction is open. |
69 | |
70 | |
71 | fields |
72 | |
73 | myTransaction : Transaction from TDF; |
74 | |
75 | end Transaction; |