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/27 01:12:54 $
12: * Revision: $Revision: 1.2 $
13: */
14: public class SqlServerContextTestingFactory extends
15: JaxorContextTestingFactoryImpl {
16:
17: public SqlServerContextTestingFactory() {
18: super (SqlServerConnection.INSTANCE.getConnection(), true);
19: }
20:
21: public String getCreateTable(int type) {
22: // we must override timestamp to use datetime or else mysql will automatically timestamp fields.
23: if (type == Types.TIMESTAMP || type == Types.DATE)
24: return "DATETIME";
25: if (type == Types.BIGINT)
26: return "INTEGER";
27: if (type == Types.DOUBLE)
28: return "DOUBLE PRECISION";
29: return super .getCreateTable(type);
30: }
31:
32: public boolean capitalizeTableNameForMetaData() {
33: return false;
34: }
35:
36: }
|