Author: tolusha
Date: 2011-11-03 08:25:50 -0400 (Thu, 03 Nov 2011)
New Revision: 5156
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBBackup.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java
Log:
EXOJCR-1612: remove unnecessary code
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBBackup.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBBackup.java 2011-11-03
10:23:05 UTC (rev 5155)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBBackup.java 2011-11-03
12:25:50 UTC (rev 5156)
@@ -24,7 +24,6 @@
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.backup.BackupException;
import org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectZipWriterImpl;
-import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -76,46 +75,6 @@
public static final String CONTENT_LEN_ZIP_FILE = "dump-len.zip";
/**
- * MySQL dialect.
- */
- public static final int DB_DIALECT_MYSQL = DBConstants.DB_DIALECT_MYSQL.hashCode();
-
- /**
- * MySQL-UTF8 dialect.
- */
- public static final int DB_DIALECT_MYSQL_UTF8 =
DBConstants.DB_DIALECT_MYSQL_UTF8.hashCode();
-
- /**
- * MySQL-MYISAM dialect.
- */
- public static final int DB_DIALECT_MYSQL_MYISAM =
DBConstants.DB_DIALECT_MYSQL_MYISAM.hashCode();
-
- /**
- * MySQL-MYISAM-UTF8 dialect.
- */
- public static final int DB_DIALECT_MYSQL_MYISAM_UTF8 =
DBConstants.DB_DIALECT_MYSQL_MYISAM_UTF8.hashCode();
-
- /**
- * DB2 dialect.
- */
- public static final int DB_DIALECT_DB2 = DBConstants.DB_DIALECT_DB2.hashCode();
-
- /**
- * DB2V8 dialect.
- */
- public static final int DB_DIALECT_DB2V8 = DBConstants.DB_DIALECT_DB2V8.hashCode();
-
- /**
- * PGSQL dialect.
- */
- public static final int DB_DIALECT_PGSQL = DBConstants.DB_DIALECT_PGSQL.hashCode();
-
- /**
- * SYBASE dialect.
- */
- public static final int DB_DIALECT_SYBASE = DBConstants.DB_DIALECT_SYBASE.hashCode();
-
- /**
* Backup tables.
*
* @param storageDir
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java 2011-11-03
10:23:05 UTC (rev 5155)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/backup/rdbms/DBRestore.java 2011-11-03
12:25:50 UTC (rev 5156)
@@ -30,6 +30,7 @@
import org.exoplatform.services.jcr.impl.backup.DataRestore;
import org.exoplatform.services.jcr.impl.clean.rdbms.DBCleaner;
import org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectZipReaderImpl;
+import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer;
import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
@@ -269,7 +270,7 @@
ResultSet tableMetaData = null;
// switch table name to lower case
- if (dialect.equals(DBBackup.DB_DIALECT_PGSQL))
+ if (dialect.equals(DBConstants.DB_DIALECT_PGSQL))
{
tableName = tableName.toLowerCase();
}
@@ -327,7 +328,8 @@
columnType.add(restoreRule.getNewColumnIndex(),
restoreRule.getNewColumnType());
String newColumnName =
- dialect.equals(DBBackup.DB_DIALECT_PGSQL) ?
restoreRule.getNewColumnName().toLowerCase() : restoreRule
+ dialect.equals(DBConstants.DB_DIALECT_PGSQL) ?
restoreRule.getNewColumnName().toLowerCase()
+ : restoreRule
.getNewColumnName();
columnName.add(restoreRule.getNewColumnIndex(), newColumnName);
}
@@ -468,9 +470,9 @@
ba.read(readBuffer);
String value = new String(readBuffer);
- if (dialect.equals(DBBackup.DB_DIALECT_PGSQL))
+ if (dialect.equals(DBConstants.DB_DIALECT_PGSQL))
{
- insertNode.setBoolean(targetIndex + 1,
value.equals("t"));
+ insertNode.setBoolean(targetIndex + 1,
value.equalsIgnoreCase("t"));
}
else
{
Show replies by date