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
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPrimaryKey
(CmsSetupDb dbCon, String tablename, String primaryKey) Adds a new primary key to the given table.protected void
addUUIDColumnToTable
(CmsSetupDb dbCon, String tablename, 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
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 String
Returns the columns for the primary key of the project resources table.protected boolean
needsUpdating
(CmsSetupDb dbCon, 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 Details
-
CmsUpdateDBProjectId
Constructor.- Throws:
IOException
- if the sql queries properties file could not be read
-
-
Method Details
-
addPrimaryKey
protected void addPrimaryKey(CmsSetupDb dbCon, String tablename, String primaryKey) throws 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:
SQLException
- if something goes wrong- See Also:
-
addUUIDColumnToTable
protected void addUUIDColumnToTable(CmsSetupDb dbCon, String tablename, String column) throws 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:
SQLException
- if something goes wrong- See Also:
-
checkColumnTypeProjectId
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:
-
createHistProjectsTable
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:
SQLException
- if soemthing goes wrong- See Also:
-
createTempTable
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:
SQLException
- if soemthing goes wrong- See Also:
-
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:
-
needsUpdating
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:
SQLException
- if something goes wrong- See Also:
-