Class CmsUpdateDBProjectId
- java.lang.Object
-
- org.opencms.setup.db.A_CmsUpdateDBPart
-
- org.opencms.setup.db.update6to7.CmsUpdateDBProjectId
-
- org.opencms.setup.db.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
-
-
Field Summary
-
Fields inherited from class org.opencms.setup.db.update6to7.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.db.A_CmsUpdateDBPart
m_poolData, m_queries
-
-
Constructor Summary
Constructors Constructor Description CmsUpdateDBProjectId()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.db.update6to7.CmsUpdateDBProjectId
internalExecute, transferDataToHistoryTable
-
Methods inherited from class org.opencms.setup.db.A_CmsUpdateDBPart
execute, getPoolData, getPropertyFileLocation, isKeepHistory, loadQueryProperties, readQuery
-
-
-
-
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 classCmsUpdateDBProjectId
- Parameters:
dbCon
- the db connection interfacetablename
- the table to add the primary key toprimaryKey
- 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 classCmsUpdateDBProjectId
- Parameters:
dbCon
- the db connection interfacetablename
- the table to add the column tocolumn
- 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 classCmsUpdateDBProjectId
- 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 classCmsUpdateDBProjectId
- 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 classCmsUpdateDBProjectId
- 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 classCmsUpdateDBProjectId
- 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 classCmsUpdateDBProjectId
- Parameters:
dbCon
- the db connection interfacetablename
- 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)
-
-