01: package net.sourceforge.jaxor.example.db;
02:
03: import java.sql.Types;
04:
05: /**
06: * Created By: Mike
07: * Date: Nov 28, 2003
08: * Time: 4:36:32 PM
09: *
10: * Last Checkin: $Author: mrettig $
11: * Date: $Date: 2004/01/29 02:41:07 $
12: * Revision: $Revision: 1.1 $
13: */
14: public class OracleContextTestingFactory extends
15: JaxorContextTestingFactoryImpl {
16:
17: public OracleContextTestingFactory() {
18: super (OracleConnection.INSTANCE.getConnection(), true);
19: }
20:
21: public String getCreateTable(int type) {
22: switch (type) {
23: case Types.VARCHAR:
24: return "VARCHAR2(100)";
25: case Types.BIGINT:
26: return "NUMBER(10)";
27: case Types.TIMESTAMP:
28: return "TIMESTAMP";
29: case Types.NUMERIC:
30: return "NUMERIC(10,5)";
31: case Types.BIT:
32: return "NUMBER(1)";
33: case Types.INTEGER:
34: return "NUMBER(30)";
35: case Types.DATE:
36: return "DATE";
37: case Types.TINYINT:
38: return "NUMBER(3)";
39: case Types.SMALLINT:
40: return "NUMBER(4)";
41: case Types.REAL:
42: return "NUMBER(20,10)";
43: case Types.DOUBLE:
44: return "NUMBER(30,10)";
45: default:
46: return super.getCreateTable(type);
47: }
48: }
49:
50: }
|