KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > rmijdbc > RJResultSetMetaDataInterface


1
2 /**
3  * RmiJdbc client/server JDBC Driver
4  * (C) GIE Dyade (Groupe BULL / INRIA Research Center) 1997
5  *
6  * @version 1.0
7  * @author Pierre-Yves Gibello (pierreyves.gibello@experlog.com)
8  */

9
10 package org.objectweb.rmijdbc;
11
12 import java.rmi.Remote JavaDoc;
13 import java.rmi.RemoteException JavaDoc;
14 import java.sql.SQLException JavaDoc;
15
16 /**
17  * A ResultSetMetaData object can be used to find out about the types
18  * and properties of the columns in a ResultSet.
19  */

20
21 public interface RJResultSetMetaDataInterface extends Remote JavaDoc {
22
23   /**
24    * What's the number of columns in the ResultSet?
25    *
26    * @return the number
27    */

28   int getColumnCount() throws RemoteException JavaDoc, SQLException JavaDoc;
29
30   /**
31    * Is the column automatically numbered, thus read-only?
32    *
33    * @param column the first column is 1, the second is 2, ...
34    * @return true if so
35    */

36   boolean isAutoIncrement(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
37
38   /**
39    * Does a column's case matter?
40    *
41    * @param column the first column is 1, the second is 2, ...
42    * @return true if so
43    */

44   boolean isCaseSensitive(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
45
46   /**
47    * Can the column be used in a where clause?
48    *
49    * @param column the first column is 1, the second is 2, ...
50    * @return true if so
51    */

52   boolean isSearchable(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
53
54   /**
55    * Is the column a cash value?
56    *
57    * @param column the first column is 1, the second is 2, ...
58    * @return true if so
59    */

60   boolean isCurrency(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
61
62   /**
63    * Can you put a NULL in this column?
64    *
65    * @param column the first column is 1, the second is 2, ...
66    * @return columnNoNulls, columnNullable or columnNullableUnknown
67    */

68   int isNullable(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
69
70   /**
71    * Is the column a signed number?
72    *
73    * @param column the first column is 1, the second is 2, ...
74    * @return true if so
75    */

76   boolean isSigned(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
77
78   /**
79    * What's the column's normal max width in chars?
80    *
81    * @param column the first column is 1, the second is 2, ...
82    * @return max width
83    */

84   int getColumnDisplaySize(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
85
86   /**
87    * What's the suggested column title for use in printouts and
88    * displays?
89    *
90    * @param column the first column is 1, the second is 2, ...
91    * @return true if so
92    */

93   String JavaDoc getColumnLabel(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
94
95   /**
96    * What's a column's name?
97    *
98    * @param column the first column is 1, the second is 2, ...
99    * @return column name
100    */

101   String JavaDoc getColumnName(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
102
103   /**
104    * What's a column's table's schema?
105    *
106    * @param column the first column is 1, the second is 2, ...
107    * @return schema name or "" if not applicable
108    */

109   String JavaDoc getSchemaName(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
110
111   /**
112    * What's a column's number of decimal digits?
113    *
114    * @param column the first column is 1, the second is 2, ...
115    * @return precision
116    */

117   int getPrecision(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
118
119   /**
120    * What's a column's number of digits to right of the decimal point?
121    *
122    * @param column the first column is 1, the second is 2, ...
123    * @return scale
124    */

125   int getScale(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
126
127   /**
128    * What's a column's table name?
129    *
130    * @return table name or "" if not applicable
131    */

132   String JavaDoc getTableName(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
133
134   /**
135    * What's a column's table's catalog name?
136    *
137    * @param column the first column is 1, the second is 2, ...
138    * @return column name or "" if not applicable.
139    */

140   String JavaDoc getCatalogName(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
141
142   /**
143    * What's a column's SQL type?
144    *
145    * @param column the first column is 1, the second is 2, ...
146    * @return SQL type
147    * @see Types
148    */

149   int getColumnType(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
150
151   /**
152    * What's a column's data source specific type name?
153    *
154    * @param column the first column is 1, the second is 2, ...
155    * @return type name
156    */

157   String JavaDoc getColumnTypeName(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
158
159   /**
160    * Is a column definitely not writable?
161    *
162    * @param column the first column is 1, the second is 2, ...
163    * @return true if so
164    */

165   boolean isReadOnly(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
166
167   /**
168    * Is it possible for a write on the column to succeed?
169    *
170    * @param column the first column is 1, the second is 2, ...
171    * @return true if so
172    */

173   boolean isWritable(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
174
175   /**
176    * Will a write on the column definitely succeed?
177    *
178    * @param column the first column is 1, the second is 2, ...
179    * @return true if so
180    */

181   boolean isDefinitelyWritable(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
182
183   //--------------------------JDBC 2.0-----------------------------------
184

185 /**
186  * JDBC 2.0
187  *
188  * <p>Returns the fully-qualified name of the Java class whose instances
189  * are manufactured if the method <code>ResultSet.getObject</code>
190  * is called to retrieve a value
191  * from the column. <code>ResultSet.getObject</code> may return a subclass of the
192  * class returned by this method.
193  *
194  * @return the fully-qualified name of the class in the Java programming
195  * language that would be used by the method
196  * <code>ResultSet.getObject</code> to retrieve the value in the specified
197  * column. This is the class name used for custom mapping.
198  * @exception SQLException if a database access error occurs
199  */

200 String JavaDoc getColumnClassName(int column) throws RemoteException JavaDoc, SQLException JavaDoc;
201
202 };
203
204
Popular Tags