01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package org.apache.openjpa.lib.jdbc;
20:
21: /**
22: * A listener for all {@link JDBCEvent}s that occur.
23: *
24: * @author Marc Prud'hommeaux
25: * @author Abe White
26: * @see AbstractJDBCListener
27: */
28: public interface JDBCListener {
29:
30: /**
31: * @see JDBCEvent#BEFORE_PREPARE_STATEMENT
32: */
33: public void beforePrepareStatement(JDBCEvent event);
34:
35: /**
36: * @see JDBCEvent#AFTER_PREPARE_STATEMENT
37: */
38: public void afterPrepareStatement(JDBCEvent event);
39:
40: /**
41: * @see JDBCEvent#BEFORE_CREATE_STATEMENT
42: */
43: public void beforeCreateStatement(JDBCEvent event);
44:
45: /**
46: * @see JDBCEvent#AFTER_CREATE_STATEMENT
47: */
48: public void afterCreateStatement(JDBCEvent event);
49:
50: /**
51: * @see JDBCEvent#BEFORE_EXECUTE_STATEMENT
52: */
53: public void beforeExecuteStatement(JDBCEvent event);
54:
55: /**
56: * @see JDBCEvent#AFTER_EXECUTE_STATEMENT
57: */
58: public void afterExecuteStatement(JDBCEvent event);
59:
60: /**
61: * @see JDBCEvent#BEFORE_COMMIT
62: */
63: public void beforeCommit(JDBCEvent event);
64:
65: /**
66: * @see JDBCEvent#AFTER_COMMIT
67: */
68: public void afterCommit(JDBCEvent event);
69:
70: /**
71: * @see JDBCEvent#BEFORE_ROLLBACK
72: */
73: public void beforeRollback(JDBCEvent event);
74:
75: /**
76: * @see JDBCEvent#AFTER_ROLLBACK
77: */
78: public void afterRollback(JDBCEvent event);
79:
80: /**
81: * @see JDBCEvent#AFTER_CONNECT
82: */
83: public void afterConnect(JDBCEvent event);
84:
85: /**
86: * @see JDBCEvent#BEFORE_CLOSE
87: */
88: public void beforeClose(JDBCEvent event);
89: }
|