org.opencms.setup.update6to7.generic
Class CmsUpdateDBAlterTables

java.lang.Object
  extended by org.opencms.setup.update6to7.A_CmsUpdateDBPart
      extended by org.opencms.setup.update6to7.generic.CmsUpdateDBAlterTables
All Implemented Interfaces:
I_CmsUpdateDBPart
Direct Known Subclasses:
CmsUpdateDBAlterTables, CmsUpdateDBAlterTables

public class CmsUpdateDBAlterTables
extends A_CmsUpdateDBPart

This class makes the remaining changes to some tables in order to update them.

The following tables will be altered CMS_ONLINE/OFFLINE_PROPERTYDEF Add the TYPE column CMS_ONLINE/OFFLINE_RESOURCES Add the columns DATE_CONTENT and RESOURCE_VERSION CMS_ONLINE/OFFLINE_STRUCTURE Add the column STRUCTURE_VERSION CMS_PROJECTS Drop the column TASK_ID and change the size for the project name

Since:
7.0.0
Version:
$Revision: 1.2 $
Author:
Roland Metzler

Field Summary
protected static java.lang.String[] CMS_OFFLINE_CONTENTS_QUERIES
          Constant array with the queries for the CMS_ONLINE_CONTENTS table.
protected static java.util.List CMS_OFFLINE_CONTENTS_QUERIES_LIST
          Constant ArrayList of the queries of the CMS_OFFLINE table.
protected static java.lang.String[] CMS_PROPERTYDEF
          Constant array with the ONLINE and OFFLINE PROPERTYDEF tables.
protected static java.util.List CMS_PROPERTYDEF_LIST
          Constant ArrayList of the two PROPERTYDEF tables.
protected static java.lang.String[] CMS_RESOURCES
          Constant array with the ONLINE and OFFLINE RESOURCES tables.
protected static java.util.List CMS_RESOURCES_LIST
          Constant ArrayList of the two RESOURCES tables.
protected static java.lang.String[] CMS_STRUCTURE
          Constant array with the ONLINE and OFFLINE STRUCTURE tables.
protected static java.util.List CMS_STRUCTURE_LIST
          Constant ArrayList of the two PROPERTYDEF tables.
protected static java.lang.String COLUMN_CMS_OFFLINE_CONTENTS_CONTENT_ID
          Constant for the column CONTENT_ID of the table CMS_OFFLINE_CONTENTS.
protected static java.lang.String COLUMN_CMS_PROPERTYDEF_TYPE
          Constant for the column PROPERTYDEF_TYPE of the PROPERTYDEF tables.
protected static java.lang.String COLUMN_CMS_STRUCTURE_STRUCTURE_VERSION
          Constant for the column STRUCTURE_VERSION in the STRUCTURE tables.
protected static java.lang.String COLUMN_PROJECTS_PROJECT_NAME
          Constant for the column PROJECT_NAME of the CMS_PROJECTS table.
protected static java.lang.String COLUMN_PROJECTS_TASK_ID
          Constant for the column TASK_ID of the CMS_PROJECTS table.
protected static java.lang.String COLUMN_RESOURCES_DATE_CONTENT
          Constant for the new column DATE_CONTENT of the CMS_RESOURCES tables.
protected static java.lang.String COLUMN_RESOURCES_RESOURCE_VERSION
          Constant for the new column RESOURCE_VERSION of the CMS_RESOURCES tables.
protected static java.lang.String REPLACEMENT_TABLENAME
          Constant for the sql replacement of the tablename.
protected static java.lang.String TABLE_CMS_OFFLINE_CONTENTS
          Constant for the table name CMS_OFFLINE_CONTENTS.
protected static java.lang.String TABLE_CMS_PROJECTS
          Constant for the table name CMS_PROJECTS.
 
Fields inherited from class org.opencms.setup.update6to7.A_CmsUpdateDBPart
m_poolData, m_queries, QUERY_PROPERTIES_PREFIX
 
Constructor Summary
CmsUpdateDBAlterTables()
          Default constructor.
 
Method Summary
 void internalExecute(CmsSetupDb dbCon)
          Does the hard work.
 
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
 

Field Detail

CMS_OFFLINE_CONTENTS_QUERIES

protected static final java.lang.String[] CMS_OFFLINE_CONTENTS_QUERIES
Constant array with the queries for the CMS_ONLINE_CONTENTS table.


CMS_OFFLINE_CONTENTS_QUERIES_LIST

protected static final java.util.List CMS_OFFLINE_CONTENTS_QUERIES_LIST
Constant ArrayList of the queries of the CMS_OFFLINE table.


CMS_PROPERTYDEF

protected static final java.lang.String[] CMS_PROPERTYDEF
Constant array with the ONLINE and OFFLINE PROPERTYDEF tables.


CMS_PROPERTYDEF_LIST

protected static final java.util.List CMS_PROPERTYDEF_LIST
Constant ArrayList of the two PROPERTYDEF tables.


CMS_RESOURCES

protected static final java.lang.String[] CMS_RESOURCES
Constant array with the ONLINE and OFFLINE RESOURCES tables.


CMS_RESOURCES_LIST

protected static final java.util.List CMS_RESOURCES_LIST
Constant ArrayList of the two RESOURCES tables.


CMS_STRUCTURE

protected static final java.lang.String[] CMS_STRUCTURE
Constant array with the ONLINE and OFFLINE STRUCTURE tables.


CMS_STRUCTURE_LIST

protected static final java.util.List CMS_STRUCTURE_LIST
Constant ArrayList of the two PROPERTYDEF tables.


COLUMN_CMS_OFFLINE_CONTENTS_CONTENT_ID

protected static final java.lang.String COLUMN_CMS_OFFLINE_CONTENTS_CONTENT_ID
Constant for the column CONTENT_ID of the table CMS_OFFLINE_CONTENTS.

See Also:
Constant Field Values

COLUMN_CMS_PROPERTYDEF_TYPE

protected static final java.lang.String COLUMN_CMS_PROPERTYDEF_TYPE
Constant for the column PROPERTYDEF_TYPE of the PROPERTYDEF tables.

See Also:
Constant Field Values

COLUMN_CMS_STRUCTURE_STRUCTURE_VERSION

protected static final java.lang.String COLUMN_CMS_STRUCTURE_STRUCTURE_VERSION
Constant for the column STRUCTURE_VERSION in the STRUCTURE tables.

See Also:
Constant Field Values

COLUMN_PROJECTS_PROJECT_NAME

protected static final java.lang.String COLUMN_PROJECTS_PROJECT_NAME
Constant for the column PROJECT_NAME of the CMS_PROJECTS table.

See Also:
Constant Field Values

COLUMN_PROJECTS_TASK_ID

protected static final java.lang.String COLUMN_PROJECTS_TASK_ID
Constant for the column TASK_ID of the CMS_PROJECTS table.

See Also:
Constant Field Values

COLUMN_RESOURCES_DATE_CONTENT

protected static final java.lang.String COLUMN_RESOURCES_DATE_CONTENT
Constant for the new column DATE_CONTENT of the CMS_RESOURCES tables.

See Also:
Constant Field Values

COLUMN_RESOURCES_RESOURCE_VERSION

protected static final java.lang.String COLUMN_RESOURCES_RESOURCE_VERSION
Constant for the new column RESOURCE_VERSION of the CMS_RESOURCES tables.

See Also:
Constant Field Values

REPLACEMENT_TABLENAME

protected static final java.lang.String REPLACEMENT_TABLENAME
Constant for the sql replacement of the tablename.

See Also:
Constant Field Values

TABLE_CMS_OFFLINE_CONTENTS

protected static final java.lang.String TABLE_CMS_OFFLINE_CONTENTS
Constant for the table name CMS_OFFLINE_CONTENTS.

See Also:
Constant Field Values

TABLE_CMS_PROJECTS

protected static final java.lang.String TABLE_CMS_PROJECTS
Constant for the table name CMS_PROJECTS.

See Also:
Constant Field Values
Constructor Detail

CmsUpdateDBAlterTables

public CmsUpdateDBAlterTables()
                       throws java.io.IOException
Default constructor.

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

internalExecute

public void internalExecute(CmsSetupDb dbCon)
                     throws java.sql.SQLException
Description copied from class: A_CmsUpdateDBPart
Does the hard work.

Specified by:
internalExecute in class A_CmsUpdateDBPart
Parameters:
dbCon - the db connection interface
Throws:
java.sql.SQLException - if somethign goes wrong
See Also:
A_CmsUpdateDBPart.internalExecute(org.opencms.setup.CmsSetupDb)