001: /**
002: * Sequoia: Database clustering technology.
003: * Copyright (C) 2005 AmicoSoft, Inc. dba Emic Networks
004: * Copyright (C) 2005 Continuent, Inc.
005: * Contact: sequoia@continuent.org
006: *
007: * Licensed under the Apache License, Version 2.0 (the "License");
008: * you may not use this file except in compliance with the License.
009: * You may obtain a copy of the License at
010: *
011: * http://www.apache.org/licenses/LICENSE-2.0
012: *
013: * Unless required by applicable law or agreed to in writing, software
014: * distributed under the License is distributed on an "AS IS" BASIS,
015: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016: * See the License for the specific language governing permissions and
017: * limitations under the License.
018: *
019: * Initial developer(s): Emmanuel Cecchet.
020: * Contributor(s): ______________________.
021: */package org.continuent.sequoia.controller.requests;
022:
023: import java.util.regex.Pattern;
024:
025: /**
026: * This class defines the interface for request regular expressions.
027: *
028: * @author <a href="mailto:emmanuel.cecchet@continuent.com">Emmanuel Cecchet</a>
029: * @version 1.0
030: */
031: public interface RequestRegExp {
032:
033: /**
034: * Pattern used to determine if a SQL statement is an AlterRequest
035: *
036: * @return Returns the ALTER_REQUEST_PATTERN.
037: */
038: Pattern getAlterRequestPattern();
039:
040: /**
041: * Pattern used to determine if a SQL statement is a CreateRequest
042: *
043: * @return Returns the CREATE_REQUEST_PATTERN.
044: */
045: Pattern getCreateRequestPattern();
046:
047: /**
048: * Pattern used to determine if a SQL statement is a DeleteRequest
049: *
050: * @return Returns the DELETE_REQUEST_PATTERN.
051: */
052: Pattern getDeleteRequestPattern();
053:
054: /**
055: * Pattern used to determine if a SQL statement is a DropRequest
056: *
057: * @return Returns the DROP_REQUEST_PATTERN.
058: */
059: Pattern getDropRequestPattern();
060:
061: /**
062: * Pattern used to determine if a SQL statement is a InsertRequest
063: *
064: * @return Returns the INSERT_REQUEST_PATTERN.
065: */
066: Pattern getInsertQueryPattern();
067:
068: /**
069: * Pattern used to determine if a SQL statement is a SELECT ... FOR UPDATE
070: * query.
071: *
072: * @return Returns the SELECT_FOR_UPDATE_PATTERN.
073: */
074: Pattern getSelectForUpdatePattern();
075:
076: /**
077: * Pattern used to determine if a SQL statement is a SelectRequest
078: *
079: * @return Returns the SELECT_REQUEST_PATTERN.
080: */
081: Pattern getSelectRequestPattern();
082:
083: /**
084: * Pattern used to determine if a SQL statement is a StoredProcedure
085: *
086: * @return Returns the STORED_PROCEDURE_PATTERN.
087: */
088: Pattern getStoredProcedurePattern();
089:
090: /**
091: * Pattern used to determine if a SQL statement is a UnknownReadRequest
092: *
093: * @return Returns the UNKNOWN_READ_REQUEST_PATTERN.
094: */
095: Pattern getUnknownReadRequestPattern();
096:
097: /**
098: * Pattern used to determine if a SQL statement is a UnknownReadRequest
099: *
100: * @return Returns the UNKNOWN_WRITE_REQUEST_PATTERN.
101: */
102: Pattern getUnknownWriteRequestPattern();
103:
104: /**
105: * Pattern used to determine if a SQL statement is a UpdateRequest
106: *
107: * @return Returns the UPDATE_REQUEST_PATTERN.
108: */
109: Pattern getUpdateRequestPattern();
110:
111: /**
112: * Pattern used to determine if a SQL statement is a request that needs to be
113: * executed with statementExecute
114: *
115: * @return Returns the STATEMENT_EXECUTE_REQUEST_PATTERN.
116: */
117: Pattern getStatementExecuteRequestPattern();
118:
119: /**
120: * Pattern used to determine if a SQL statement is not authorized to execute
121: * on the cluster.
122: *
123: * @return Returns the STATEMENT_EXECUTE_REQUEST_PATTERN.
124: */
125: Pattern getUnauthorizedRequestsPattern();
126:
127: }
|