KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > sessionsystem > _UserSession


1 package com.daffodilwoods.daffodildb.server.sessionsystem;
2
3 import com.daffodilwoods.daffodildb.server.serversystem.*;
4 import com.daffodilwoods.database.resource.*;
5 import com.daffodilwoods.database.general.*;
6 import com.daffodilwoods.daffodildb.server.datadictionarysystem.*;
7 import java.util.TimeZone JavaDoc;
8 import java.util.Vector JavaDoc;
9 import java.sql.*;
10 import java.util.ArrayList JavaDoc;
11 public interface _UserSession {
12
13
14   /**
15    * Returns the child User Session which just act as Save Point.
16    * @return _UserSession
17    * @throws DException
18    */

19  public void startSavePoint() throws DException ;
20
21   /**
22    * Return a Object of session.
23    * @return _Session
24    * @throws DException
25    */

26   public _Session getSession() throws DException ;
27
28   /**
29    * Returns the transaction mode (immeidate or deffered)
30    * @return Object
31    * @throws DException
32    */

33   public Object JavaDoc getTransactionAccessMode() throws DException;
34
35   /**
36    * Returns the privilege granted to session user.
37    * @return _PrivilegeCharacteristics
38    * @throws DException
39    */

40   public _PrivilegeCharacteristics getPrivilegeCharacteristics() throws DException ;
41
42   /**
43    * Returns the table from Session table list.
44    * @param tableName
45    * @return _UserSessionTable
46    * @throws DException
47    */

48   public _UserSessionTable getUserSessionTable(QualifiedIdentifier tableName ) throws DException;
49
50   /**
51    * Calls session for commit i.e to make the changes permanent after last commit. It writes the
52    * records in the memory to file.
53    * @param statementExecutionContext
54    * @throws DException
55    */

56   public void commit(_StatementExecutionContext statementExecutionContext ) throws DException;
57
58   /**
59    * Calls session for roll back to undo the changes after last commit.
60    * rolls back the changes made to the reocrds in the session.
61    * @param statementExecutionContext
62    * @throws DException
63    */

64   public void rollback(_StatementExecutionContext statementExecutionContext) throws DException;
65
66
67   /**
68    * Returns the currnet role of the user.
69    * @return String
70    * @throws DException
71    */

72   public String JavaDoc getCurrentRole() throws DException ;
73
74   /**
75    * Returns the current user name for the session.
76    * @return String
77    * @throws DException
78    */

79   public String JavaDoc getCurrentUser() throws DException ;
80
81   /**
82    * Returns true if the role or user passed is the current one.
83    * @param authorizationIdentifier
84    * @return boolean
85    * @throws DException
86    */

87   public boolean isEnabledAuthorizationIdentifier(String JavaDoc authorizationIdentifier) throws DException ;
88
89   /**
90    * Returns the current role or User of the session.
91    * @return String
92    * @throws DException
93    */

94   public String JavaDoc getAuthorizationIdentifier() throws DException ;
95
96   /**
97    * Sets the mode for the current transaction in the session.
98    * @param sessionTransactionMode
99    * @throws DException
100    */

101   public void setTransactionMode( SessionTransactionMode sessionTransactionMode ) throws DException ;
102
103   /**
104    * Returns the mode for the current transaction in the session.
105    * @return SessionTransactionMode
106    * @throws DException
107    */

108   public SessionTransactionMode getTransactionMode() throws DException ;
109
110   /**
111    * Returns save point.
112    * @return Vector
113    * @throws DException
114    */

115   public ArrayList JavaDoc getSavePointVector() throws DException ;
116
117   public void addSavePoint( Object JavaDoc obj) throws DException ;
118
119   /**
120    * Returns the parent session of the child session.
121    * @return _UserSession
122    * @throws DException
123    */

124
125   /**
126    * Sets parent session of the child session.
127    * @param userSession
128    * @throws DException
129    */

130
131   /**
132    * removes the last save point which may be used for roll back.
133    * @throws DException
134    */

135   public void releaseLastSavePoint() throws DException ;
136
137   /**
138    * @return Date
139    * @throws DException
140    */

141   public Date getDate() throws DException ;
142
143   /**
144    * @return int
145    * @throws DException
146    */

147   public int getMonth() throws DException ;
148
149   /**
150    * @return Time
151    * @throws DException
152    */

153   public Time getTime() throws DException ;
154
155   /**
156    * @return int
157    * @throws DException
158    */

159   public int getYear() throws DException ;
160
161
162   /**
163    * @return int
164    * @throws DException
165    */

166   public int getHour() throws DException ;
167
168   /**
169    * @return int
170    * @throws DException
171    */

172   public int getMinutes() throws DException ;
173
174   /**
175    * @return int
176    * @throws DException
177    */

178   public int getSeconds() throws DException ;
179
180   /**
181    * @return TimeZone
182    * @throws DException
183    */

184   public TimeZone JavaDoc getTimeZone() throws DException ;
185
186   public void setConstraintStatus(Object JavaDoc constraintName, String JavaDoc mode) throws DException ;
187   public java.sql.Timestamp JavaDoc getTimeStamp( ) throws DException ;
188
189   /**
190    * returns the current user name.
191    * @return String
192    * @throws DException
193    */

194   public String JavaDoc getUserName() throws DException ;
195
196   /**
197    * returns the session constant of sesison for multiple users.
198    * @return Obejct
199    * @throws DException
200    */

201   public Object JavaDoc getSessionConstant() throws DException ;
202
203   /**
204    * returns Object of Global Session.
205    * @return _GlobalSession
206    * @throws DException
207    */

208   public _ServerSession getGlobalSession() throws DException ;
209
210   /**
211    * Prepare is used for Distributed transactions, it writes the data in memory to a file on disk.
212    * @param statementExecutionContext
213    * @return boolean
214    * @throws DException
215    */

216   boolean prepare(_StatementExecutionContext statementExecutionContext) throws DException;
217
218   /**
219    * makes the changes made during prepare statement permanent, (used for distributed transactions).
220    * @param statementExecutionContext
221    * @return boolean
222    * @throws DException
223    */

224   boolean makePersistent(_StatementExecutionContext statementExecutionContext) throws DException;
225
226   /**
227    * removes all the table from session table list
228    * @throws DException
229    */

230   void removeAllTables()throws DException;
231
232   /**
233    * will set the User name and plcae the use name to Stack through pushAuthorizationIdentifier.
234    * @param user
235    * @throws DException
236    */

237   public void setAuthorizationIdentifier(String JavaDoc user) throws DException;
238
239   /**
240    * Sets the Privileges granted to the user.
241    * @param priCharacteristics
242    * @throws DException
243    */

244   public void setPrivilegeCharacteristics(_PrivilegeCharacteristics priCharacteristics)throws DException;
245
246   /**
247    * Calls session for commit i.e to make the changes permanent after last commit. It writes the
248    * records in the memory to file.
249    * @param statementExecutionContext
250    * @throws DException
251    */

252   public void commitSavePoint(_StatementExecutionContext statementExecutionContext ) throws DException;
253
254   /**
255    * Calls session for roll back to undo the changes after last commit.
256    * rolls back the changes made to the reocrds in the session.
257    * @param statementExecutionContext
258    * @throws DException
259    */

260   public void rollbackSavePoint(_StatementExecutionContext statementExecutionContext) throws DException;
261   public void releaseSavePoint(_StatementExecutionContext statementExecutionContext) throws DException;
262   public void hideSavePoint() throws DException;
263   public void unhideSavePoint() throws DException;
264   public void ignoreParallelSavePoint() throws DException ;
265   public void allowParallelSavePoint() throws DException ;
266   public void checkImmediateConstraintsOnCommit() throws DException;
267   public void setRole(String JavaDoc roleName) throws DException;
268   public void setAutoCommit(boolean autoCommit0) ;
269   public boolean getAutoCommit() ;
270   public void startTransaction() throws DException;
271
272 }
273
Popular Tags