1 package org.hibernate.dialect; 3 4 import java.sql.Types ; 5 6 import org.hibernate.cfg.Environment; 7 8 13 public class JDataStoreDialect extends Dialect { 14 15 18 public JDataStoreDialect() { 19 super(); 20 21 registerColumnType( Types.BIT, "tinyint" ); 22 registerColumnType( Types.BIGINT, "bigint" ); 23 registerColumnType( Types.SMALLINT, "smallint" ); 24 registerColumnType( Types.TINYINT, "tinyint" ); 25 registerColumnType( Types.INTEGER, "integer" ); 26 registerColumnType( Types.CHAR, "char(1)" ); 27 registerColumnType( Types.VARCHAR, "varchar($l)" ); 28 registerColumnType( Types.FLOAT, "float" ); 29 registerColumnType( Types.DOUBLE, "double" ); 30 registerColumnType( Types.DATE, "date" ); 31 registerColumnType( Types.TIME, "time" ); 32 registerColumnType( Types.TIMESTAMP, "timestamp" ); 33 registerColumnType( Types.VARBINARY, "varbinary($l)" ); 34 registerColumnType( Types.NUMERIC, "numeric($p, $s)" ); 35 36 registerColumnType( Types.BLOB, "varbinary" ); 37 registerColumnType( Types.CLOB, "varchar" ); 38 39 getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE ); 40 } 41 42 public String getAddColumnString() { 43 return "add"; 44 } 45 46 public boolean dropConstraints() { 47 return false; 48 } 49 50 public String getCascadeConstraintsString() { 51 return " cascade"; 52 } 53 54 public boolean supportsIdentityColumns() { 55 return true; 56 } 57 58 public String getIdentitySelectString() { 59 return null; } 61 62 public String getIdentityColumnString() { 63 return "autoincrement"; 64 } 65 66 public String getNoColumnsInsertString() { 67 return "default values"; 68 } 69 70 public boolean supportsColumnCheck() { 71 return false; 72 } 73 74 public boolean supportsTableCheck() { 75 return false; 76 } 77 78 } 79 | Popular Tags |