KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > driver > JDBCRegExp


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2005 Continuent, Inc.
4  * Contact: sequoia@continuent.org
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Initial developer(s): Emmanuel Cecchet.
19  * Contributor(s): ______________________.
20  */

21
22 package org.continuent.sequoia.driver;
23
24 import java.util.regex.Pattern JavaDoc;
25
26 /**
27  * This interface defines the methods for SQL to JDBC API mapping using regular
28  * expressions.
29  *
30  * @author <a HREF="mailto:emmanuel.cecchet@continuent.com">Emmanuel Cecchet</a>
31  * @version 1.0
32  */

33 public interface JDBCRegExp
34 {
35
36   /**
37    * Pattern maching a transaction BEGIN that should be mapped on a
38    * setAutocommit(false) call.
39    *
40    * @return Returns the BEGIN_PATTERN.
41    */

42   Pattern JavaDoc getBeginPattern();
43
44   /**
45    * Pattern maching a transaction COMMIT that should be mapped on a
46    * connection.commit() call.
47    *
48    * @return Returns the COMMIT_PATTERN.
49    */

50   Pattern JavaDoc getCommitPattern();
51
52   /**
53    * Pattern maching a RELEASE SAVEPOINT statememt that should be mapped on a
54    * connection.releaseSavepoint(Savepoint) call.
55    *
56    * @return Returns the RELEASE_SAVEPOINT_PATTERN.
57    */

58   Pattern JavaDoc getReleaseSavepointPattern();
59
60   /**
61    * Pattern maching a transaction ROLLBACK that should be mapped on a
62    * connection.rollback() call.
63    *
64    * @return Returns the ROLLBACK_PATTERN.
65    */

66   Pattern JavaDoc getRollbackPattern();
67
68   /**
69    * Pattern maching a transaction ROLLBACK TO SAVEPOINT that should be mapped
70    * on a connection.rollback(Savepoint) call.
71    *
72    * @return Returns the ROLLBACK_TO_SAVEPOINT_PATTERN.
73    */

74   Pattern JavaDoc getRollbackToSavepointPattern();
75
76   /**
77    * Pattern maching a transaction isolation level setting that should be mapped
78    * on a connection.setIsolationLevel() call.
79    *
80    * @return Returns the SET_ISOLATION_LEVEL_PATTERN.
81    */

82   Pattern JavaDoc getSetIsolationLevelPattern();
83
84   /**
85    * Pattern maching a transaction read-only setting that should be mapped on a
86    * connection.setReadOnly() call.
87    *
88    * @return Returns the SET_READ_ONLY_TRANSACTION_PATTERN.
89    */

90   Pattern JavaDoc getSetReadOnlyTransactionPattern();
91
92   /**
93    * Pattern maching a transaction SET SAVEPOINT that should be mapped on a
94    * connection.setSavepoint(Savepoint) call.
95    *
96    * @return Returns the SET_SAVEPOINT_PATTERN.
97    */

98   Pattern JavaDoc getSetSavepointPattern();
99
100   /**
101    * Pattern maching a transaction SET AUTOCOMMIT=1 that should be mapped on a
102    * connection.setAutocommit(true) call.
103    *
104    * @return Returns the SET_AUTOCOMMIT_PATTERN.
105    */

106   Pattern JavaDoc getSetAutocommit1Pattern();
107
108 }
Popular Tags