1 package org.apache.torque.engine.platform; 2 3 18 19 import org.apache.torque.engine.database.model.Domain; 20 import org.apache.torque.engine.database.model.SchemaType; 21 22 28 public class PlatformMssqlImpl extends PlatformDefaultImpl 29 { 30 33 public PlatformMssqlImpl() 34 { 35 super(); 36 initialize(); 37 } 38 39 42 private void initialize() 43 { 44 setSchemaDomainMapping(new Domain(SchemaType.INTEGER, "INT")); 45 setSchemaDomainMapping(new Domain(SchemaType.BOOLEANINT, "INT")); 46 setSchemaDomainMapping(new Domain(SchemaType.DOUBLE, "FLOAT")); 47 setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "TEXT")); 48 setSchemaDomainMapping(new Domain(SchemaType.DATE, "DATETIME")); 49 setSchemaDomainMapping(new Domain(SchemaType.TIME, "DATETIME")); 50 setSchemaDomainMapping(new Domain(SchemaType.TIMESTAMP, "DATETIME")); 51 setSchemaDomainMapping(new Domain(SchemaType.BINARY, "BINARY(7132)")); 52 setSchemaDomainMapping(new Domain(SchemaType.VARBINARY, "IMAGE")); 53 setSchemaDomainMapping(new Domain(SchemaType.LONGVARBINARY, "IMAGE")); 54 } 55 56 59 public int getMaxColumnNameLength() 60 { 61 return 30; 62 } 63 64 69 public String getNullString(boolean notNull) 70 { 71 return (notNull ? "NOT NULL" : "NULL"); 72 } 73 74 } 75 | Popular Tags |