com.liferay.portal.kernel.upgrade
Class UpgradeProcess

java.lang.Object
  extended by com.liferay.portal.kernel.upgrade.UpgradeProcess
Direct Known Subclasses:
BaseUpgradePortletPreferences

public abstract class UpgradeProcess
extends java.lang.Object

Author:
Brian Wing Shun Chan, Alexander Chow

Constructor Summary
UpgradeProcess()
           
 
Method Summary
protected  void doUpgrade()
           
 int getThreshold()
           
 boolean hasTable(java.lang.String tableName)
           
 long increment()
           
 long increment(java.lang.String name)
           
 boolean isSupportsAlterColumnName()
           
 boolean isSupportsAlterColumnType()
           
 boolean isSupportsStringCaseSensitiveQuery()
           
 boolean isSupportsUpdateWithInnerJoin()
           
 void runSQL(java.lang.String template)
           
 void runSQL(java.lang.String[] templates)
           
 void runSQLTemplate(java.lang.String path)
           
 void runSQLTemplate(java.lang.String path, boolean failOnError)
           
 boolean tableHasColumn(java.lang.String tableName, java.lang.String columnName)
           
 boolean tableHasData(java.lang.String tableName)
           
 void upgrade()
           
 void upgrade(java.lang.Class<?> upgradeProcessClass)
           
 void upgrade(UpgradeProcess upgradeProcess)
           
protected  void upgradeTable(java.lang.String tableName, java.lang.Object[][] tableColumns)
           
protected  void upgradeTable(java.lang.String tableName, java.lang.Object[][] tableColumns, java.lang.String sqlCreate, java.lang.String[] sqlAddIndexes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpgradeProcess

public UpgradeProcess()
Method Detail

getThreshold

public int getThreshold()

hasTable

public boolean hasTable(java.lang.String tableName)
                 throws java.lang.Exception
Throws:
java.lang.Exception

increment

public long increment()
               throws SystemException
Throws:
SystemException

increment

public long increment(java.lang.String name)
               throws SystemException
Throws:
SystemException

isSupportsAlterColumnName

public boolean isSupportsAlterColumnName()

isSupportsAlterColumnType

public boolean isSupportsAlterColumnType()

isSupportsStringCaseSensitiveQuery

public boolean isSupportsStringCaseSensitiveQuery()

isSupportsUpdateWithInnerJoin

public boolean isSupportsUpdateWithInnerJoin()

runSQL

public void runSQL(java.lang.String template)
            throws java.io.IOException,
                   java.sql.SQLException
Throws:
java.io.IOException
java.sql.SQLException

runSQL

public void runSQL(java.lang.String[] templates)
            throws java.io.IOException,
                   java.sql.SQLException
Throws:
java.io.IOException
java.sql.SQLException

runSQLTemplate

public void runSQLTemplate(java.lang.String path)
                    throws java.io.IOException,
                           javax.naming.NamingException,
                           java.sql.SQLException
Throws:
java.io.IOException
javax.naming.NamingException
java.sql.SQLException

runSQLTemplate

public void runSQLTemplate(java.lang.String path,
                           boolean failOnError)
                    throws java.io.IOException,
                           javax.naming.NamingException,
                           java.sql.SQLException
Throws:
java.io.IOException
javax.naming.NamingException
java.sql.SQLException

tableHasColumn

public boolean tableHasColumn(java.lang.String tableName,
                              java.lang.String columnName)
                       throws java.lang.Exception
Throws:
java.lang.Exception

tableHasData

public boolean tableHasData(java.lang.String tableName)
                     throws java.lang.Exception
Throws:
java.lang.Exception

upgrade

public void upgrade()
             throws UpgradeException
Throws:
UpgradeException

upgrade

public void upgrade(java.lang.Class<?> upgradeProcessClass)
             throws UpgradeException
Throws:
UpgradeException

upgrade

public void upgrade(UpgradeProcess upgradeProcess)
             throws UpgradeException
Throws:
UpgradeException

doUpgrade

protected void doUpgrade()
                  throws java.lang.Exception
Throws:
java.lang.Exception

upgradeTable

protected void upgradeTable(java.lang.String tableName,
                            java.lang.Object[][] tableColumns)
                     throws java.lang.Exception
Throws:
java.lang.Exception

upgradeTable

protected void upgradeTable(java.lang.String tableName,
                            java.lang.Object[][] tableColumns,
                            java.lang.String sqlCreate,
                            java.lang.String[] sqlAddIndexes)
                     throws java.lang.Exception
Throws:
java.lang.Exception