01: /*
02: * Jython Database Specification API 2.0
03: *
04: * $Id: DBApiType.java 2414 2005-02-23 04:26:23Z bzimmer $
05: *
06: * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com>
07: *
08: */
09: 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: 2414 $
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 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: }
|