KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > client > net > StatementRequestInterface


1 /*
2
3    Derby - Class org.apache.derby.client.net.StatementRequestInterface
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20 */

21
22 package org.apache.derby.client.net;
23
24 import org.apache.derby.client.am.ColumnMetaData;
25 import org.apache.derby.client.am.Section;
26 import org.apache.derby.client.am.SqlException;
27
28 // In general, all required data is passed.
29
// In addition, Material Statement objects are passed for convenient access to any material statement caches.
30
// Implementations of this interface should not dereference common layer Statement state, as it is passed in,
31
// but may dereference material layer Statement state if necessary for performance.
32

33 public interface StatementRequestInterface {
34     public void writeExecuteImmediate(NetStatement materialStatement,
35                                       String JavaDoc sql,
36                                       Section section) throws SqlException;
37
38     public void writePrepareDescribeOutput(NetStatement materialStatement,
39                                            String JavaDoc sql,
40                                            Section section) throws SqlException;
41
42     public void writePrepare(NetStatement materialStatement,
43                              String JavaDoc sql,
44                              Section section) throws SqlException;
45
46     public void writeOpenQuery(NetStatement materialStatement,
47                                Section section,
48                                int fetchSize,
49                                int resultSetType) throws SqlException;
50
51     public void writeExecute(NetPreparedStatement materialPreparedStatement,
52                              Section section,
53                              org.apache.derby.client.am.ColumnMetaData parameterMetaData,
54                              Object JavaDoc[] inputs,
55                              int numInputColumns,
56                              boolean outputExpected,
57                              // This is a hint to the material layer that more write commands will follow.
58
// It is ignored by the driver in all cases except when blob data is written,
59
// in which case this boolean is used to optimize the implementation.
60
// Otherwise we wouldn't be able to chain after blob data is sent.
61
// If we could always chain a no-op DDM after every execute that writes blobs
62
// then we could just always set the chaining flag to on for blob send data
63
boolean chainedWritesFollowingSetLob) throws SqlException;
64
65
66     public void writeOpenQuery(NetPreparedStatement materialPreparedStatement,
67                                Section section,
68                                int fetchSize,
69                                int resultSetType,
70                                int numInputColumns,
71                                ColumnMetaData parameterMetaData,
72                                Object JavaDoc[] inputs) throws SqlException;
73
74     public void writeDescribeInput(NetPreparedStatement materialPreparedStatement,
75                                    Section section) throws SqlException;
76
77     public void writeDescribeOutput(NetPreparedStatement materialPreparedStatement,
78                                     Section section) throws SqlException;
79
80     public void writeExecuteCall(NetStatement materialStatement,
81                                  boolean outputExpected,
82                                  String JavaDoc procedureName,
83                                  Section section,
84                                  int fetchSize,
85                                  boolean suppressResultSets, // set to true for batched calls
86
int resultSetType,
87                                  ColumnMetaData parameterMetaData,
88                                  Object JavaDoc[] inputs) throws SqlException;
89
90
91     public void writeSetSpecialRegister(java.util.ArrayList JavaDoc sqlsttList) throws SqlException;
92 }
93
Popular Tags