001: /**
002: * Sequoia: Database clustering technology.
003: * Copyright (C) 2005 Continuent, Inc.
004: * Contact: sequoia@continuent.org
005: *
006: * Licensed under the Apache License, Version 2.0 (the "License");
007: * you may not use this file except in compliance with the License.
008: * You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing, software
013: * distributed under the License is distributed on an "AS IS" BASIS,
014: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: *
018: * Initial developer(s): Emmanuel Cecchet.
019: * Contributor(s): ______________________.
020: */package org.continuent.sequoia.driver;
021:
022: import java.util.regex.Pattern;
023:
024: /**
025: * This interface defines the methods for SQL to JDBC API mapping using regular
026: * expressions.
027: *
028: * @author <a href="mailto:emmanuel.cecchet@continuent.com">Emmanuel Cecchet</a>
029: * @version 1.0
030: */
031: public interface JDBCRegExp {
032:
033: /**
034: * Pattern maching a transaction BEGIN that should be mapped on a
035: * setAutocommit(false) call.
036: *
037: * @return Returns the BEGIN_PATTERN.
038: */
039: Pattern getBeginPattern();
040:
041: /**
042: * Pattern maching a transaction COMMIT that should be mapped on a
043: * connection.commit() call.
044: *
045: * @return Returns the COMMIT_PATTERN.
046: */
047: Pattern getCommitPattern();
048:
049: /**
050: * Pattern maching a RELEASE SAVEPOINT statememt that should be mapped on a
051: * connection.releaseSavepoint(Savepoint) call.
052: *
053: * @return Returns the RELEASE_SAVEPOINT_PATTERN.
054: */
055: Pattern getReleaseSavepointPattern();
056:
057: /**
058: * Pattern maching a transaction ROLLBACK that should be mapped on a
059: * connection.rollback() call.
060: *
061: * @return Returns the ROLLBACK_PATTERN.
062: */
063: Pattern getRollbackPattern();
064:
065: /**
066: * Pattern maching a transaction ROLLBACK TO SAVEPOINT that should be mapped
067: * on a connection.rollback(Savepoint) call.
068: *
069: * @return Returns the ROLLBACK_TO_SAVEPOINT_PATTERN.
070: */
071: Pattern getRollbackToSavepointPattern();
072:
073: /**
074: * Pattern maching a transaction isolation level setting that should be mapped
075: * on a connection.setIsolationLevel() call.
076: *
077: * @return Returns the SET_ISOLATION_LEVEL_PATTERN.
078: */
079: Pattern getSetIsolationLevelPattern();
080:
081: /**
082: * Pattern maching a transaction read-only setting that should be mapped on a
083: * connection.setReadOnly() call.
084: *
085: * @return Returns the SET_READ_ONLY_TRANSACTION_PATTERN.
086: */
087: Pattern getSetReadOnlyTransactionPattern();
088:
089: /**
090: * Pattern maching a transaction SET SAVEPOINT that should be mapped on a
091: * connection.setSavepoint(Savepoint) call.
092: *
093: * @return Returns the SET_SAVEPOINT_PATTERN.
094: */
095: Pattern getSetSavepointPattern();
096:
097: /**
098: * Pattern maching a transaction SET AUTOCOMMIT=1 that should be mapped on a
099: * connection.setAutocommit(true) call.
100: *
101: * @return Returns the SET_AUTOCOMMIT_PATTERN.
102: */
103: Pattern getSetAutocommit1Pattern();
104:
105: }
|