KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > resource > SQLManager


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: SQLManager.java,v 1.3 2004/10/29 23:33:37 ehardesty Exp $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.jonas.resource;
26
27 import java.sql.PreparedStatement JavaDoc;
28 import java.sql.SQLException JavaDoc;
29
30 /**
31  * SQL Manager to be used with PreparedStatment
32  * @author ehardesty
33  *
34  */

35 public interface SQLManager {
36
37     /**
38      * Get the specified PreparedStatement
39      * @param mcinfo MCInfo
40      * @param conn Object connection
41      * @param user String
42      * @param sql String
43      * @return PreparedStatment
44      * @throws SQLException if an Exception occurs
45      */

46      PreparedStatement JavaDoc getPStatement(MCInfo mcinfo,
47                                              Object JavaDoc conn,
48                                              String JavaDoc user,
49                                              String JavaDoc sql)
50          throws SQLException JavaDoc;
51
52      /**
53       * Get the specified PreparedStatement
54       * @param mcinfo MCInfo
55       * @param conn Object connection
56       * @param user String
57       * @param sql String
58       * @param resultSetType int
59       * @param resultSetConcurrency int
60       * @return PreparedStatment
61       * @throws SQLException if an Exception occurs
62       */

63      PreparedStatement JavaDoc getPStatement(MCInfo mcinfo,
64                                      Object JavaDoc conn,
65                                      String JavaDoc user,
66                                      String JavaDoc sql,
67                                      int resultSetType,
68                                      int resultSetConcurrency)
69          throws SQLException JavaDoc;
70
71
72 // JDK 1.4
73
/**
74       * Get the specified PreparedStatement
75       * @param mcinfo MCInfo
76       * @param conn Object connection
77       * @param user String
78       * @param sql String
79       * @param autoGeneratedKeys key
80       * @return PreparedStatment
81       * @throws SQLException if an Exception occurs
82       */

83      PreparedStatement JavaDoc getPStatement(MCInfo mcinfo,
84                                      Object JavaDoc conn,
85                                      String JavaDoc user,
86                                      String JavaDoc sql,
87                                      int autoGeneratedKeys)
88          throws SQLException JavaDoc;
89
90      /**
91       * Get the specified PreparedStatement
92       * @param mcinfo MCInfo
93       * @param conn Object connection
94       * @param user String
95       * @param sql String
96       * @param columnIndexes int []
97       * @return PreparedStatment
98       * @throws SQLException if an Exception occurs
99       */

100      PreparedStatement JavaDoc getPStatement(MCInfo mcinfo,
101                                      Object JavaDoc conn,
102                                      String JavaDoc user,
103                                      String JavaDoc sql,
104                                      int[] columnIndexes)
105          throws SQLException JavaDoc;
106
107      /**
108       * Get the specified PreparedStatement
109       * @param mcinfo MCInfo
110       * @param conn Object connection
111       * @param user String
112       * @param sql String
113       * @param resultSetType int
114       * @param resultSetConcurrency int
115       * @param resultSetHoldability int
116       * @return PreparedStatment
117       * @throws SQLException if an Exception occurs
118       */

119      PreparedStatement JavaDoc getPStatement(MCInfo mcinfo,
120                                      Object JavaDoc conn,
121                                      String JavaDoc user,
122                                      String JavaDoc sql,
123                                     int resultSetType,
124                                     int resultSetConcurrency,
125                                     int resultSetHoldability)
126          throws SQLException JavaDoc;
127
128      /**
129       * Get the specified PreparedStatement
130       * @param mcinfo MCInfo
131       * @param conn Object connection
132       * @param user String
133       * @param sql String
134       * @param columnNames String []
135       * @return PreparedStatment
136       * @throws SQLException if an Exception occurs
137       */

138       PreparedStatement JavaDoc getPStatement(MCInfo mcinfo,
139                                       Object JavaDoc conn,
140                                       String JavaDoc user,
141                                       String JavaDoc sql,
142                                       String JavaDoc[] columnNames)
143          throws SQLException JavaDoc;
144  }
145
Popular Tags