com.liferay.portal.tools.sql
Class DB2Util

java.lang.Object
  extended by com.liferay.portal.tools.sql.DBUtil
      extended by com.liferay.portal.tools.sql.DB2Util

public class DB2Util
extends DBUtil

View Source

Author:
Alexander Chow, Bruno Farache, Sandeep Soni, Ganesh Ram

Field Summary
 
Fields inherited from class com.liferay.portal.tools.sql.DBUtil
ALTER_COLUMN_NAME, ALTER_COLUMN_TYPE, DROP_PRIMARY_KEY, REWORD_TEMPLATE, TEMPLATE, TYPE_ALL, TYPE_DB2, TYPE_DERBY, TYPE_FIREBIRD, TYPE_HYPERSONIC, TYPE_INFORMIX, TYPE_INTERBASE, TYPE_JDATASTORE, TYPE_MYSQL, TYPE_ORACLE, TYPE_POSTGRESQL, TYPE_SAP, TYPE_SQLSERVER, TYPE_SYBASE
 
Constructor Summary
protected DB2Util()
           
 
Method Summary
protected  void buildCreateFile(java.lang.String databaseName, boolean minimal)
           
 java.lang.String buildSQL(java.lang.String template)
           
static DBUtil getInstance()
           
protected  java.lang.String getServerName()
           
protected  java.lang.String[] getTemplate()
           
protected  java.lang.String reword(java.lang.String data)
           
 void runSQL(java.lang.String template)
           
 void runSQL(java.lang.String[] templates)
           
 
Methods inherited from class com.liferay.portal.tools.sql.DBUtil
buildColumnNameTokens, buildColumnTypeTokens, buildCreateFile, buildSQLFile, buildTemplate, convertTimestamp, evaluateVM, getInstance, getMinimalSuffix, getTemplateFalse, getTemplateTrue, getType, readSQL, removeBooleanIndexes, removeInserts, removeLongInserts, removeNull, replaceTemplate, runSQLTemplate, runSQLTemplate, runSQLTemplateString, setInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DB2Util

protected DB2Util()
Method Detail

getInstance

public static DBUtil getInstance()

buildSQL

public java.lang.String buildSQL(java.lang.String template)
                          throws java.io.IOException
Specified by:
buildSQL in class DBUtil
Throws:
java.io.IOException

runSQL

public void runSQL(java.lang.String template)
            throws java.io.IOException,
                   javax.naming.NamingException,
                   java.sql.SQLException
Overrides:
runSQL in class DBUtil
Throws:
java.io.IOException
javax.naming.NamingException
java.sql.SQLException

runSQL

public void runSQL(java.lang.String[] templates)
            throws java.io.IOException,
                   javax.naming.NamingException,
                   java.sql.SQLException
Overrides:
runSQL in class DBUtil
Throws:
java.io.IOException
javax.naming.NamingException
java.sql.SQLException

buildCreateFile

protected void buildCreateFile(java.lang.String databaseName,
                               boolean minimal)
                        throws java.io.IOException
Specified by:
buildCreateFile in class DBUtil
Throws:
java.io.IOException

getServerName

protected java.lang.String getServerName()
Specified by:
getServerName in class DBUtil

getTemplate

protected java.lang.String[] getTemplate()
Specified by:
getTemplate in class DBUtil

reword

protected java.lang.String reword(java.lang.String data)
                           throws java.io.IOException
Specified by:
reword in class DBUtil
Throws:
java.io.IOException