package net.sourceforge.jaxor.example.db;
import net.sourceforge.jaxor.util.SystemException;
import java.sql.Types;
/**
* Created By: Mike
* Date: Nov 28, 2003
* Time: 4:36:32 PM
*
* Last Checkin: $Author: mrettig $
* Date: $Date: 2004/01/24 17:53:47 $
* Revision: $Revision: 1.2 $
*/
public class AxionContextTestingFactory extends JaxorContextTestingFactoryImpl {
public AxionContextTestingFactory() {
super(AxionConnection.INSTANCE.getConnection(), true);
}
public String getCreateTable(int type) {
switch (type) {
case Types.VARCHAR:
return "STRING";
case Types.BIGINT:
return "LONG";
case Types.TIMESTAMP:
return "TIMESTAMP";
case Types.NUMERIC:
return "NUMBER";
case Types.BIT:
return "BOOLEAN";
case Types.INTEGER:
return "INTEGER";
case Types.DATE:
return "DATE";
case Types.TINYINT:
return "BYTE";
case Types.SMALLINT:
return "SHORT";
case Types.REAL:
return "FLOAT";
case Types.DOUBLE:
return "NUMBER";
default:
throw new SystemException("Unknown type: " + type);
}
}
}
|