KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > appserver > server > sql > CachedDBTransaction


1 /*
2  * Created on May 24, 2004
3  *
4  */

5 package com.lutris.appserver.server.sql;
6
7 import java.util.Vector JavaDoc;
8 import org.enhydra.dods.cache.DOCache;
9
10 /**
11  * @author P.Djojic
12  *
13  */

14 public interface CachedDBTransaction extends DBTransaction {
15
16     /**
17      * Method to ensure this object is still valid.
18      * Once this object has been released it cannot be
19      * used any more.
20      *
21      * @return boolean True if the transaction is released, otherwise false
22      */

23     public boolean isReleased();
24
25
26     /**
27      * Gets an array of DOs.
28      *
29      * @return array of DOs from this transaction
30      */

31     public CoreDO[] getDOs() ;
32
33
34     /**
35      *
36      */

37     public void saveDirtyDOs();
38
39
40     /**
41      * Method return transaction Cache
42      *
43      * @return implementation of DOCache
44      */

45     public DOCache getTransactionCache();
46
47
48     /**
49      *
50      */

51     public Vector JavaDoc getDeletedDOs();
52
53
54     /**
55      *
56      */

57     public void addDeletedDO(CoreDO DO);
58
59
60     /**
61      *
62      */

63     public void resetDeletedDOs();
64
65     /**
66      *
67      */

68     public void dontAggregateDOModifications();
69
70
71     /**
72      * Method returns value of a data member.
73      *
74      * @return value of config parameter AutoWrite
75      * true means all DOs are writen into database, as they come in
76      * false - no writes are done implicitly
77      */

78     public boolean getAutoWrite();
79     /**
80      *
81      */

82     public boolean isFirstWrite();
83     
84     
85     /**
86      *
87      */

88     public void setFirstWrite(boolean newfw);
89
90
91    /**
92     * Although it's internally used to skip uneccessary commits against
93     * the database, this information is made publicly accessible through
94     * this method.
95     * Application may decide would it call a commit method or not thus
96     * improving performance a bit more.
97     *
98     * @return true if no writes happened
99     */

100    public boolean wasReadOnly();
101
102 }
Popular Tags