KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > scriptella > jdbc > SqlTokenizer


1 /*
2  * Copyright 2006-2007 The Scriptella Project Team.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package scriptella.jdbc;
17
18 import java.io.Closeable JavaDoc;
19 import java.io.IOException JavaDoc;
20
21 /**
22  * This interface provides a contract to iterate SQL statements.
23  *
24  * @author Fyodor Kupolov
25  * @version 1.0
26  */

27 public interface SqlTokenizer extends Closeable JavaDoc {
28     int[] EMPTY_INJECTIONS_ARRAY = new int[0];
29     /**
30      * Parses the following SQL statement from the source.
31      * <p>Use {@link #getInjections()} to obtain recognized injections, e.g.
32      * binding variables and/or expressions.
33      *
34      * @return parsed SQL statement or null if EOF.
35      * @throws IOException if I/O exception occurs
36      */

37     String JavaDoc nextStatement() throws IOException JavaDoc;
38
39     /**
40      * This method returns list of injections for the last returned statement.
41      * @return injections for the last returned statement.
42      */

43     int[] getInjections();
44 }
45
Popular Tags