KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ziclix > python > sql > DBApiType


1 /*
2  * Jython Database Specification API 2.0
3  *
4  * $Id: DBApiType.java,v 1.4 2005/02/23 04:26:18 bzimmer Exp $
5  *
6  * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com>
7  *
8  */

9 package com.ziclix.python.sql;
10
11 import org.python.core.PyClass;
12 import org.python.core.PyInteger;
13
14 /**
15  * This class wraps the types from java.sql.Type in order for
16  * PyCursor to differentiate between a regular PyInteger and
17  * a SQL datatype value.
18  *
19  * @author brian zimmer
20  * @author last modified by $Author: bzimmer $
21  * @version $Revision: 1.4 $
22  */

23 public final class DBApiType extends PyInteger {
24
25     /**
26      * Field __class__
27      */

28     public static PyClass __class__;
29
30     /**
31      * Constructor DBApiType
32      *
33      * @param type
34      */

35     public DBApiType(int type) {
36         super(type);
37     }
38
39     /**
40      * Constructor DBApiType
41      *
42      * @param type
43      */

44     public DBApiType(Integer JavaDoc type) {
45         super(type.intValue());
46     }
47
48     /**
49      * Method getPyClass
50      *
51      * @return PyClass
52      */

53     protected PyClass getPyClass() {
54         return __class__;
55     }
56 }
57
Popular Tags