KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > sessions > SessionEventAdapter


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2005, Oracle. All rights reserved.
22
package oracle.toplink.essentials.sessions;
23
24
25 /**
26  * <p><b>Purpose</b>: To provide a trivial implemetation of SessionEventListener.
27  * You may subclass this class rather than implement the entire SessonEventListener
28  * interface in cases where only a small subset of the interface methods are needed.
29  *
30  * @see SessionEventManager#addListener(SessionEventListener)
31  * @see SessionEventListener
32  * @see SessionEvent
33  */

34 public abstract class SessionEventAdapter implements SessionEventListener {
35
36     /**
37      * PUBLIC:
38      * This event is raised on the session if a descriptor is missing for a class being persisted.
39      * This can be used to lazy register the descriptor or set of descriptors.
40      */

41     public void missingDescriptor(SessionEvent event) {
42     }
43
44     /**
45      * PUBLIC:
46      * This event is raised on the session after read object query detected more than a single row back from the database.
47      * The "result" of the event will be the call. Some applications may want to interpret this as an error or warning condition.
48      */

49     public void moreRowsDetected(SessionEvent event) {
50     }
51
52     /**
53      * PUBLIC:
54      * This event is raised on the session after update or delete SQL has been sent to the database
55      * but a row count of zero was returned.
56      */

57     public void noRowsModified(SessionEvent event) {
58     }
59
60     /**
61      * PUBLIC:
62      * This event is raised on the session after a stored procedure call has been executed that had output parameters.
63      * If the proc was used to override an insert/update/delete operation then TopLink will not be expecting any return value.
64      * This event mechanism allows for a listner to be registered before the proc is call to process the output values.
65      * The event "result" will contain a DatabaseRow of the output values, and property "call" will be the StoredProcedureCall.
66      */

67     public void outputParametersDetected(SessionEvent event) {
68     }
69
70     /**
71      * PUBLIC:
72      * This event is raised on the client session after creation/acquiring.
73      */

74     public void postAcquireClientSession(SessionEvent event) {
75     }
76
77     /**
78      * PUBLIC:
79      * This event is raised on when using the server/client sessions.
80      * This event is raised after a connection is acquired from a connection pool.
81      */

82     public void postAcquireConnection(SessionEvent event) {
83     }
84
85     /**
86      * PUBLIC:
87      * This event is raised when a ClientSession, with Isolated data, acquires
88      * an exclusive connection.
89      */

90     public void postAcquireExclusiveConnection(SessionEvent event) {
91     }
92
93     /**
94      * PUBLIC:
95      * This event is raised on the unit of work after creation/acquiring.
96      * This will be raised on nest units of work.
97      */

98     public void postAcquireUnitOfWork(SessionEvent event) {
99     }
100
101     /**
102      * PUBLIC:
103      * This event is raised after a database transaction is started.
104      * It is not raised for nested transactions.
105      */

106     public void postBeginTransaction(SessionEvent event) {
107     }
108
109     /**
110      * PUBLIC:
111      * This event is raised after the commit has begun on the UnitOfWork but before
112      * the changes are calculated.
113      */

114     public void preCalculateUnitOfWorkChangeSet(SessionEvent event) {
115     }
116
117     /**
118      * PUBLIC:
119      * This event is raised after the commit has begun on the UnitOfWork and
120      * after the changes are calculated. The UnitOfWorkChangeSet, at this point,
121      * will contain changeSets without the version fields updated and without
122      * IdentityField type primary keys. These will be updated after the insert, or
123      * update, of the object
124      */

125     public void postCalculateUnitOfWorkChangeSet(SessionEvent event) {
126     }
127
128     /**
129      * PUBLIC:
130      * This event is raised after a database transaction is commited.
131      * It is not raised for nested transactions.
132      */

133     public void postCommitTransaction(SessionEvent event) {
134     }
135
136     /**
137      * PUBLIC:
138      * This event is raised on the unit of work after commit.
139      * This will be raised on nest units of work.
140      */

141     public void postCommitUnitOfWork(SessionEvent event) {
142     }
143
144     /**
145      * PUBLIC:
146      * This even will be raised after a UnitOfWorkChangeSet has been merged
147      * When that changeSet has been received from a distributed session
148      */

149     public void postDistributedMergeUnitOfWorkChangeSet(SessionEvent event) {
150     }
151
152     /**
153      * PUBLIC:
154      * This even will be raised after a UnitOfWorkChangeSet has been merged
155      */

156     public void postMergeUnitOfWorkChangeSet(SessionEvent event) {
157     }
158
159     /**
160      * PUBLIC:
161      * This event is raised after the session connects to the database.
162      * In a server session this event is raised on every new connection established.
163      */

164     public void postConnect(SessionEvent event) {
165     }
166
167     /**
168      * PUBLIC:
169      * This event is raised after the execution of every query against the session.
170      * The event contains the query and query result.
171      */

172     public void postExecuteQuery(SessionEvent event) {
173     }
174
175     /**
176      * PUBLIC:
177      * This event is raised on the client session after releasing.
178      */

179     public void postReleaseClientSession(SessionEvent event) {
180     }
181
182     /**
183      * PUBLIC:
184      * This event is raised on the unit of work after release.
185      * This will be raised on nest units of work.
186      */

187     public void postReleaseUnitOfWork(SessionEvent event) {
188     }
189
190     /**
191      * PUBLIC:
192      * This event is raised on the unit of work after resuming.
193      * This occurs after pre/postCommit.
194      */

195     public void postResumeUnitOfWork(SessionEvent event) {
196     }
197
198     /**
199      * PUBLIC:
200      * This event is raised after a database transaction is rolledback.
201      * It is not raised for nested transactions.
202      */

203     public void postRollbackTransaction(SessionEvent event) {
204     }
205
206     /**
207      * PUBLIC:
208      * This event is raised before a database transaction is started.
209      * It is not raised for nested transactions.
210      */

211     public void preBeginTransaction(SessionEvent event) {
212     }
213
214     /**
215      * PUBLIC:
216      * This event is raised before a database transaction is commited.
217      * It is not raised for nested transactions.
218      */

219     public void preCommitTransaction(SessionEvent event) {
220     }
221
222     /**
223      * PUBLIC:
224      * This event is raised on the unit of work before commit.
225      * This will be raised on nest units of work.
226      */

227     public void preCommitUnitOfWork(SessionEvent event) {
228     }
229
230     /**
231      * PUBLIC:
232      * This event is raised before the execution of every query against the session.
233      * The event contains the query to be executed.
234      */

235     public void preExecuteQuery(SessionEvent event) {
236     }
237
238     /**
239      * PUBLIC:
240      * This event is raised on the unit of work after the SQL has been flushed, but the commit transaction has not been executed.
241      * It is similar to the JTS prepare phase.
242      */

243     public void prepareUnitOfWork(SessionEvent event) {
244     }
245
246     /**
247      * PUBLIC:
248      * This event is raised on the client session before releasing.
249      */

250     public void preReleaseClientSession(SessionEvent event) {
251     }
252
253     /**
254      * PUBLIC:
255      * This event is raised on when using the server/client sessions.
256      * This event is raised before a connection is released into a connection pool.
257      */

258     public void preReleaseConnection(SessionEvent event) {
259     }
260
261     /**
262      * PUBLIC:
263      * This event is fired just before a Client Session, with isolated data,
264      * releases its Exclusive Connection
265      */

266     public void preReleaseExclusiveConnection(SessionEvent event) {
267     }
268
269     /**
270      * PUBLIC:
271      * This event is raised on the unit of work before release.
272      * This will be raised on nest units of work.
273      */

274     public void preReleaseUnitOfWork(SessionEvent event) {
275     }
276
277     /**
278      * PUBLIC:
279      * This even will be raised before a UnitOfWorkChangeSet has been merged
280      * When that changeSet has been received from a distributed session
281      */

282     public void preDistributedMergeUnitOfWorkChangeSet(SessionEvent event) {
283     }
284
285     /**
286      * PUBLIC:
287      * This even will be raised before a UnitOfWorkChangeSet has been merged
288      */

289     public void preMergeUnitOfWorkChangeSet(SessionEvent event) {
290     }
291
292     /**
293      * PUBLIC:
294      * This event is raised before a database transaction is rolledback.
295      * It is not raised for nested transactions.
296      */

297     public void preRollbackTransaction(SessionEvent event) {
298     }
299
300     /**
301      * PUBLIC:
302      * This Event is raised before the session logs in.
303      */

304     public void preLogin(SessionEvent event) {
305     }
306
307     /**
308      * PUBLIC:
309      * This Event is raised after the session logs in.
310      */

311     public void postLogin(SessionEvent event) {
312     }
313 }
314
Popular Tags