From a5945b1d5d4ce4bde3f06ad0bcf582bd482d778f Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Sat, 3 Dec 2016 13:24:52 +1300 Subject: [PATCH] #911 - SQL Server - remove old MsSqlServer2000Platform (expecting users migrated to SQL Server 2005+) --- .../dbplatform/MsSqlServer2000Platform.java | 49 ------------------- .../server/core/DatabasePlatformFactory.java | 13 +---- 2 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 src/main/java/com/avaje/ebean/config/dbplatform/MsSqlServer2000Platform.java diff --git a/src/main/java/com/avaje/ebean/config/dbplatform/MsSqlServer2000Platform.java b/src/main/java/com/avaje/ebean/config/dbplatform/MsSqlServer2000Platform.java deleted file mode 100644 index 1a8da0353..000000000 --- a/src/main/java/com/avaje/ebean/config/dbplatform/MsSqlServer2000Platform.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.avaje.ebean.config.dbplatform; - -import com.avaje.ebean.config.PersistBatch; - -/** - * Microsoft SQL Server 2000 specific platform. - *

- *

- *

- */ -public class MsSqlServer2000Platform extends DatabasePlatform { - - public MsSqlServer2000Platform() { - super(); - this.name = "mssqlserver2000"; - this.persistBatchOnCascade = PersistBatch.NONE; - this.dbIdentity.setIdType(IdType.IDENTITY); - this.dbIdentity.setSupportsGetGeneratedKeys(false); - this.dbIdentity.setSelectLastInsertedIdTemplate("select @@IDENTITY as X"); - this.dbIdentity.setSupportsIdentity(true); - - this.openQuote = "["; - this.closeQuote = "]"; - - dbTypeMap.put(DbType.BOOLEAN, new DbPlatformType("bit default 0")); - - dbTypeMap.put(DbType.BIGINT, new DbPlatformType("numeric", 19)); - dbTypeMap.put(DbType.REAL, new DbPlatformType("float(16)")); - dbTypeMap.put(DbType.DOUBLE, new DbPlatformType("float(32)")); - dbTypeMap.put(DbType.TINYINT, new DbPlatformType("smallint")); - dbTypeMap.put(DbType.DECIMAL, new DbPlatformType("numeric", 28)); - - dbTypeMap.put(DbType.BLOB, new DbPlatformType("image")); - dbTypeMap.put(DbType.CLOB, new DbPlatformType("text")); - dbTypeMap.put(DbType.LONGVARBINARY, new DbPlatformType("image")); - dbTypeMap.put(DbType.LONGVARCHAR, new DbPlatformType("text")); - - dbTypeMap.put(DbType.DATE, new DbPlatformType("datetime")); - dbTypeMap.put(DbType.TIME, new DbPlatformType("datetime")); - dbTypeMap.put(DbType.TIMESTAMP, new DbPlatformType("datetime")); - - } - -} diff --git a/src/main/java/com/avaje/ebeaninternal/server/core/DatabasePlatformFactory.java b/src/main/java/com/avaje/ebeaninternal/server/core/DatabasePlatformFactory.java index d882208b1..d410261c2 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/core/DatabasePlatformFactory.java +++ b/src/main/java/com/avaje/ebeaninternal/server/core/DatabasePlatformFactory.java @@ -5,7 +5,6 @@ import com.avaje.ebean.config.dbplatform.DB2Platform; import com.avaje.ebean.config.dbplatform.DatabasePlatform; import com.avaje.ebean.config.dbplatform.H2Platform; import com.avaje.ebean.config.dbplatform.HsqldbPlatform; -import com.avaje.ebean.config.dbplatform.MsSqlServer2000Platform; import com.avaje.ebean.config.dbplatform.MsSqlServer2005Platform; import com.avaje.ebean.config.dbplatform.MySqlPlatform; import com.avaje.ebean.config.dbplatform.OraclePlatform; @@ -88,12 +87,6 @@ public class DatabasePlatformFactory { if (dbName.equals("sqlserver")) { return new MsSqlServer2005Platform(); } - if (dbName.equals("sqlserver2005")) { - return new MsSqlServer2005Platform(); - } - if (dbName.equals("sqlserver2000")) { - return new MsSqlServer2000Platform(); - } if (dbName.equals("sqlanywhere")) { return new SqlAnywherePlatform(); } @@ -146,11 +139,7 @@ public class DatabasePlatformFactory { if (dbProductName.contains("oracle")) { return new OraclePlatform(); } else if (dbProductName.contains("microsoft")) { - if (majorVersion > 8) { - return new MsSqlServer2005Platform(); - } else { - return new MsSqlServer2000Platform(); - } + return new MsSqlServer2005Platform(); } else if (dbProductName.contains("mysql")) { return new MySqlPlatform(); } else if (dbProductName.contains("h2")) {