mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#383 - Refactor - Rename Oracle10Platform to OraclePlatform, remove Oracle9Platform (as not different)
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
package com.avaje.ebean.config.dbplatform;
|
||||
|
||||
/**
|
||||
* Since Ebean v2.2.0 Oracle9 is no different from Oracle10.
|
||||
* <p>
|
||||
* This will be removed in the future.
|
||||
* </p>
|
||||
*/
|
||||
public class Oracle9Platform extends Oracle10Platform {
|
||||
|
||||
public Oracle9Platform() {
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -43,12 +43,12 @@ package com.avaje.ebean.config.dbplatform;
|
||||
*
|
||||
* @author rbygrave
|
||||
*/
|
||||
public class Oracle10DbEncrypt extends AbstractDbEncrypt {
|
||||
public class OracleDbEncrypt extends AbstractDbEncrypt {
|
||||
|
||||
/**
|
||||
* Constructs the Oracle10DbEncrypt with default encrypt and decrypt stored procedures.
|
||||
*/
|
||||
public Oracle10DbEncrypt() {
|
||||
public OracleDbEncrypt() {
|
||||
this("eb_encrypt", "eb_decrypt");
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class Oracle10DbEncrypt extends AbstractDbEncrypt {
|
||||
* @param encryptFunction the encrypt stored procedure
|
||||
* @param decryptFunction the decrypt stored procedure
|
||||
*/
|
||||
public Oracle10DbEncrypt(String encryptFunction, String decryptFunction) {
|
||||
public OracleDbEncrypt(String encryptFunction, String decryptFunction) {
|
||||
|
||||
this.varcharEncryptFunction = new OraVarcharFunction(encryptFunction, decryptFunction);
|
||||
this.dateEncryptFunction = new OraDateFunction(encryptFunction, decryptFunction);
|
||||
+3
-3
@@ -9,16 +9,16 @@ import java.sql.Types;
|
||||
/**
|
||||
* Oracle10 and greater specific platform.
|
||||
*/
|
||||
public class Oracle10Platform extends DatabasePlatform {
|
||||
public class OraclePlatform extends DatabasePlatform {
|
||||
|
||||
public Oracle10Platform() {
|
||||
public OraclePlatform() {
|
||||
super();
|
||||
this.name = "oracle";
|
||||
this.maxTableNameLength = 30;
|
||||
this.maxConstraintNameLength = 30;
|
||||
// OnQueryOnly.CLOSE as a performance optimisation on Oracle
|
||||
this.onQueryOnly = OnQueryOnly.CLOSE;
|
||||
this.dbEncrypt = new Oracle10DbEncrypt();
|
||||
this.dbEncrypt = new OracleDbEncrypt();
|
||||
this.sqlLimiter = new RownumSqlLimiter();
|
||||
this.platformDdl = new Oracle10Ddl(this.dbTypeMap, this.dbIdentity);
|
||||
this.historySupport = new OracleDbHistorySupport();
|
||||
@@ -11,7 +11,7 @@ import com.avaje.ebean.config.dbplatform.DbPlatformName;
|
||||
import com.avaje.ebean.config.dbplatform.H2Platform;
|
||||
import com.avaje.ebean.config.dbplatform.MsSqlServer2005Platform;
|
||||
import com.avaje.ebean.config.dbplatform.MySqlPlatform;
|
||||
import com.avaje.ebean.config.dbplatform.Oracle10Platform;
|
||||
import com.avaje.ebean.config.dbplatform.OraclePlatform;
|
||||
import com.avaje.ebean.config.dbplatform.PostgresPlatform;
|
||||
import com.avaje.ebean.config.dbplatform.SQLitePlatform;
|
||||
import com.avaje.ebean.dbmigration.ddlgeneration.DdlWrite;
|
||||
@@ -250,7 +250,7 @@ public class DbMigration {
|
||||
case MYSQL:
|
||||
return new MySqlPlatform();
|
||||
case ORACLE:
|
||||
return new Oracle10Platform();
|
||||
return new OraclePlatform();
|
||||
case SQLSERVER:
|
||||
return new MsSqlServer2005Platform();
|
||||
case DB2:
|
||||
|
||||
@@ -72,11 +72,8 @@ public class DatabasePlatformFactory {
|
||||
if (dbName.equals("postgres8") || dbName.equals("postgres83")) {
|
||||
return new Postgres8Platform();
|
||||
}
|
||||
if (dbName.equals("oracle9")) {
|
||||
return new Oracle9Platform();
|
||||
}
|
||||
if (dbName.equals("oracle") || dbName.equals("oracle10")) {
|
||||
return new Oracle10Platform();
|
||||
if (dbName.equals("oracle") || dbName.equals("oracle10") || dbName.equals("oracle9")) {
|
||||
return new OraclePlatform();
|
||||
}
|
||||
if (dbName.equals("sqlserver")) {
|
||||
return new MsSqlServer2005Platform();
|
||||
@@ -137,11 +134,7 @@ public class DatabasePlatformFactory {
|
||||
int majorVersion = metaData.getDatabaseMajorVersion();
|
||||
|
||||
if (dbProductName.contains("oracle")) {
|
||||
if (majorVersion > 9) {
|
||||
return new Oracle10Platform();
|
||||
} else {
|
||||
return new Oracle9Platform();
|
||||
}
|
||||
return new OraclePlatform();
|
||||
}
|
||||
else if (dbProductName.contains("microsoft")) {
|
||||
if (majorVersion > 8) {
|
||||
|
||||
Reference in New Issue
Block a user