KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > store > DB2ColumnInfo


1 /*
2  * Copyright 2003 (C) TJDO.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the TJDO License version 1.0.
6  * See the terms of the TJDO License in the documentation provided with this software.
7  *
8  * $Id: DB2ColumnInfo.java,v 1.1 2003/02/26 00:24:11 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.store;
12
13 import java.sql.ResultSet JavaDoc;
14 import java.sql.Types JavaDoc;
15
16
17 /**
18  * Represents the metadata of a specific table column in DB2.
19  *
20  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
21  * @version $Revision: 1.1 $
22  */

23
24 class DB2ColumnInfo extends ColumnInfo
25 {
26     /**
27      * Constructs a column information object from the current row of the given
28      * result set. The {@link ResultSet} object passed must have been obtained
29      * from a call to DatabaseMetaData.getColumns().
30      *
31      * <p>This method only retrieves the values from the current row; the caller
32      * is required to advance to the next row with {@link ResultSet#next}.
33      *
34      * @param rs The result set returned from DatabaseMetaData.getColumns().
35      */

36
37     public DB2ColumnInfo(ResultSet JavaDoc rs)
38     {
39         super(rs);
40
41     switch (dataType)
42     {
43         case Types.DATE:
44         case Types.TIME:
45         case Types.TIMESTAMP:
46                 /* Values > 0 inexplicably get returned here. */
47         decimalDigits = 0;
48         break;
49
50         default:
51         break;
52     }
53     }
54 }
55
Popular Tags