String name = connection.getConnection().getMetaData().getDatabaseProductName().toLowerCase();
int major = connection.getConnection().getMetaData().getDatabaseMajorVersion();
IDataTypeFactory type = null;
if (name.contains("postgres")) {
type = new PostgresqlDataTypeFactory();
} else if (name.contains("oracle")) {
if (major >= 10) {
type = new Oracle10DataTypeFactory();
} else {
type = new OracleDataTypeFactory();