org.opencms.setup.update6to7.oracle
Class CmsUpdateDBProjectId

java.lang.Object
  extended by org.opencms.setup.update6to7.A_CmsUpdateDBPart
      extended by org.opencms.setup.update6to7.generic.CmsUpdateDBProjectId
          extended by org.opencms.setup.update6to7.oracle.CmsUpdateDBProjectId
All Implemented Interfaces:
I_CmsUpdateDBPart

public class CmsUpdateDBProjectId
extends CmsUpdateDBProjectId

Oracle implementation to update the project ids to uuids.

Since:
7.0.0
Version:
$Revision: 1.2 $
Author:
Roland Metzler, Peter Bonrad

Field Summary
 
Fields inherited from class org.opencms.setup.update6to7.generic.CmsUpdateDBProjectId
COLUMN_PROJECT_ID, COLUMN_PROJECT_LASTMODIFIED, COLUMN_PROJECT_UUID, COLUMN_TEMP_PROJECT_UUID, HISTORY_PROJECTS_TABLE, QUERY_ADD_PRIMARY_KEY, QUERY_ADD_TEMP_UUID_COLUMN, QUERY_CREATE_HISTORY_PROJECTS_TABLE, QUERY_CREATE_TEMP_TABLE_UUIDS, QUERY_DESCRIBE_TABLE, QUERY_READ_MAX_PUBTAG, REPLACEMENT_COLUMN, REPLACEMENT_NEW_COLUMN, REPLACEMENT_OLDID, REPLACEMENT_PRIMARY_KEY, REPLACEMENT_TABLENAME, RESOURCE_TABLES, RESOURCES_TABLES_LIST, TABLES, TABLES_LIST, TEMP_UUID_COLUMN, TEMPORARY_TABLE_NAME
 
Fields inherited from class org.opencms.setup.update6to7.A_CmsUpdateDBPart
m_poolData, m_queries, QUERY_PROPERTIES_PREFIX
 
Constructor Summary
CmsUpdateDBProjectId()
          Constructor.
 
Method Summary
protected  void addPrimaryKey(CmsSetupDb dbCon, java.lang.String tablename, java.lang.String primaryKey)
          Adds a new primary key to the given table.
protected  void addUUIDColumnToTable(CmsSetupDb dbCon, java.lang.String tablename, java.lang.String column)
          Adds the new column for the uuids to a table.
protected  boolean checkColumnTypeProjectId(int type)
          Check if the column type of the project id is incorrect.
protected  void createHistProjectsTable(CmsSetupDb dbCon)
          Creates the CMS_HISTORY_PROJECTS table if it does not exist yet.
protected  void createTempTable(CmsSetupDb dbCon)
          Creates the temp table for project ids if it does not exist yet.
protected  java.lang.String getColumnProjectIdResourcePath()
          Returns the columns for the primary key of the project resources table.
protected  boolean needsUpdating(CmsSetupDb dbCon, java.lang.String tablename)
          Checks if the given table needs an update of the uuids.
 
Methods inherited from class org.opencms.setup.update6to7.generic.CmsUpdateDBProjectId
internalExecute, transferDataToHistoryTable
 
Methods inherited from class org.opencms.setup.update6to7.A_CmsUpdateDBPart
execute, getDbInstance, getPoolData, isKeepHistory, loadQueryProperties, readQuery, setPoolData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsUpdateDBProjectId

public CmsUpdateDBProjectId()
                     throws java.io.IOException
Constructor.

Throws:
java.io.IOException - if the sql queries properties file could not be read
Method Detail

addPrimaryKey

protected void addPrimaryKey(CmsSetupDb dbCon,
                             java.lang.String tablename,
                             java.lang.String primaryKey)
                      throws java.sql.SQLException
Description copied from class: CmsUpdateDBProjectId
Adds a new primary key to the given table.

Overrides:
addPrimaryKey in class CmsUpdateDBProjectId
Parameters:
dbCon - the db connection interface
tablename - the table to add the primary key to
primaryKey - the new primary key
Throws:
java.sql.SQLException - if something goes wrong
See Also:
CmsUpdateDBProjectId.addPrimaryKey(org.opencms.setup.CmsSetupDb, java.lang.String, java.lang.String)

addUUIDColumnToTable

protected void addUUIDColumnToTable(CmsSetupDb dbCon,
                                    java.lang.String tablename,
                                    java.lang.String column)
                             throws java.sql.SQLException
Description copied from class: CmsUpdateDBProjectId
Adds the new column for the uuids to a table.

Overrides:
addUUIDColumnToTable in class CmsUpdateDBProjectId
Parameters:
dbCon - the db connection interface
tablename - the table to add the column to
column - the new colum to add
Throws:
java.sql.SQLException - if something goes wrong
See Also:
CmsUpdateDBProjectId.addUUIDColumnToTable(org.opencms.setup.CmsSetupDb, java.lang.String, java.lang.String)

checkColumnTypeProjectId

protected boolean checkColumnTypeProjectId(int type)
Description copied from class: CmsUpdateDBProjectId
Check if the column type of the project id is incorrect.

Overrides:
checkColumnTypeProjectId in class CmsUpdateDBProjectId
Parameters:
type - the type of the column from the meta data
Returns:
true if the type is incorrect
See Also:
CmsUpdateDBProjectId.checkColumnTypeProjectId(int)

createHistProjectsTable

protected void createHistProjectsTable(CmsSetupDb dbCon)
                                throws java.sql.SQLException
Description copied from class: CmsUpdateDBProjectId
Creates the CMS_HISTORY_PROJECTS table if it does not exist yet.

Overrides:
createHistProjectsTable in class CmsUpdateDBProjectId
Parameters:
dbCon - the db connection interface
Throws:
java.sql.SQLException - if soemthing goes wrong
See Also:
CmsUpdateDBProjectId.createHistProjectsTable(org.opencms.setup.CmsSetupDb)

createTempTable

protected void createTempTable(CmsSetupDb dbCon)
                        throws java.sql.SQLException
Description copied from class: CmsUpdateDBProjectId
Creates the temp table for project ids if it does not exist yet.

Overrides:
createTempTable in class CmsUpdateDBProjectId
Parameters:
dbCon - the db connection interface
Throws:
java.sql.SQLException - if soemthing goes wrong
See Also:
CmsUpdateDBProjectId.createTempTable(org.opencms.setup.CmsSetupDb)

getColumnProjectIdResourcePath

protected java.lang.String getColumnProjectIdResourcePath()
Description copied from class: CmsUpdateDBProjectId
Returns the columns for the primary key of the project resources table.

Overrides:
getColumnProjectIdResourcePath in class CmsUpdateDBProjectId
Returns:
the columns for the primary key of the project resources table
See Also:
CmsUpdateDBProjectId.getColumnProjectIdResourcePath()

needsUpdating

protected boolean needsUpdating(CmsSetupDb dbCon,
                                java.lang.String tablename)
                         throws java.sql.SQLException
Description copied from class: CmsUpdateDBProjectId
Checks if the given table needs an update of the uuids.

Overrides:
needsUpdating in class CmsUpdateDBProjectId
Parameters:
dbCon - the db connection interface
tablename - the table to check
Returns:
true if the project ids are not yet updated, false if nothing needs to be done
Throws:
java.sql.SQLException - if something goes wrong
See Also:
CmsUpdateDBProjectId.needsUpdating(org.opencms.setup.CmsSetupDb, java.lang.String)