org.opencms.setup.update6to7.generic
Class CmsUpdateDBContentTables

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

public class CmsUpdateDBContentTables
extends A_CmsUpdateDBPart

This class creates the table CMS_CONTENTS and fills it with data from the tables CMS_BACKUP_CONTENTS and CMS_ONLINE_CONTENTS.

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

Field Summary
protected static java.lang.String QUERY_CREATE_CMS_CONTENTS_TABLE
          Constant for the sql query to create the CMS_CONTENTS table.
protected static java.lang.String QUERY_TRANSFER_ONLINE_CONTENTS
          Constant for the sql query to transfer the online contents.
protected static java.lang.String TABLE_CMS_CONTENTS
          Constant for the table CMS_CONTENTS.
 
Fields inherited from class org.opencms.setup.update6to7.A_CmsUpdateDBPart
m_poolData, m_queries, QUERY_PROPERTIES_PREFIX
 
Constructor Summary
CmsUpdateDBContentTables()
          Constructor.
 
Method Summary
protected  void createContentsTable(CmsSetupDb dbCon)
          Creates the CMS_CONTENTS table if it does not exist yet.
protected  void internalExecute(CmsSetupDb dbCon)
          Does the hard work.
protected  void transferOnlineContents(CmsSetupDb dbCon, int pubTag)
          Transfers the online content.
 
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

QUERY_CREATE_CMS_CONTENTS_TABLE

protected static final java.lang.String QUERY_CREATE_CMS_CONTENTS_TABLE
Constant for the sql query to create the CMS_CONTENTS table.

See Also:
Constant Field Values

QUERY_TRANSFER_ONLINE_CONTENTS

protected static final java.lang.String QUERY_TRANSFER_ONLINE_CONTENTS
Constant for the sql query to transfer the online contents.

See Also:
Constant Field Values

TABLE_CMS_CONTENTS

protected static final java.lang.String TABLE_CMS_CONTENTS
Constant for the table CMS_CONTENTS.

See Also:
Constant Field Values
Constructor Detail

CmsUpdateDBContentTables

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

Throws:
java.io.IOException - if the query properties cannot be read
Method Detail

createContentsTable

protected void createContentsTable(CmsSetupDb dbCon)
                            throws java.sql.SQLException
Creates the CMS_CONTENTS table if it does not exist yet.

Parameters:
dbCon - the db connection interface
Throws:
java.sql.SQLException - if soemthing goes wrong

internalExecute

protected 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)

transferOnlineContents

protected void transferOnlineContents(CmsSetupDb dbCon,
                                      int pubTag)
                               throws java.sql.SQLException
Transfers the online content.

Parameters:
dbCon - the db connection interface
pubTag - the publish tag to use
Throws:
java.sql.SQLException - if something goes wrong