com.liferay.portal.dao.db
Class DB2DB

java.lang.Object
  extended by com.liferay.portal.dao.db.BaseDB
      extended by com.liferay.portal.dao.db.DB2DB
All Implemented Interfaces:
com.liferay.portal.kernel.dao.db.DB

public class DB2DB
extends BaseDB

View Source

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

Field Summary
 
Fields inherited from class com.liferay.portal.dao.db.BaseDB
ALTER_COLUMN_NAME, ALTER_COLUMN_TYPE, DROP_INDEX, DROP_PRIMARY_KEY, REWORD_TEMPLATE, TEMPLATE
 
Fields inherited from interface com.liferay.portal.kernel.dao.db.DB
MINIMAL, POPULATED, SHARDED, TYPE_ALL, TYPE_DB2, TYPE_DERBY, TYPE_FIREBIRD, TYPE_HYPERSONIC, TYPE_INFORMIX, TYPE_INGRES, TYPE_INTERBASE, TYPE_JDATASTORE, TYPE_MYSQL, TYPE_ORACLE, TYPE_POSTGRESQL, TYPE_SAP, TYPE_SQLSERVER, TYPE_SYBASE
 
Constructor Summary
protected DB2DB()
           
 
Method Summary
protected  java.lang.String buildCreateFileContent(java.lang.String sqlDir, java.lang.String databaseName, int population)
           
 java.lang.String buildSQL(java.lang.String template)
           
static com.liferay.portal.kernel.dao.db.DB getInstance()
           
protected  java.lang.String getServerName()
           
protected  java.lang.String[] getTemplate()
           
 boolean isSupportsAlterColumnType()
           
 boolean isSupportsInlineDistinct()
           
 boolean isSupportsScrollableResults()
           
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.dao.db.BaseDB
addIndexes, buildColumnNameTokens, buildColumnTypeTokens, buildCreateFile, buildCreateFile, buildSQLFile, buildTemplate, convertTimestamp, dropIndexes, evaluateVM, getIndexes, getSuffix, getTemplateFalse, getTemplateTrue, getType, increment, isSupportsAlterColumnName, isSupportsDateMilliseconds, isSupportsStringCaseSensitiveQuery, isSupportsUpdateWithInnerJoin, readFile, readSQL, removeBooleanIndexes, removeInserts, removeLongInserts, removeNull, replaceTemplate, runSQL, runSQL, runSQLTemplate, runSQLTemplate, runSQLTemplateString, setSupportsStringCaseSensitiveQuery, updateIndexes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DB2DB

protected DB2DB()
Method Detail

getInstance

public static com.liferay.portal.kernel.dao.db.DB getInstance()

buildSQL

public java.lang.String buildSQL(java.lang.String template)
                          throws java.io.IOException
Specified by:
buildSQL in interface com.liferay.portal.kernel.dao.db.DB
Specified by:
buildSQL in class BaseDB
Throws:
java.io.IOException

isSupportsAlterColumnType

public boolean isSupportsAlterColumnType()
Specified by:
isSupportsAlterColumnType in interface com.liferay.portal.kernel.dao.db.DB
Overrides:
isSupportsAlterColumnType in class BaseDB

isSupportsInlineDistinct

public boolean isSupportsInlineDistinct()
Specified by:
isSupportsInlineDistinct in interface com.liferay.portal.kernel.dao.db.DB
Overrides:
isSupportsInlineDistinct in class BaseDB

isSupportsScrollableResults

public boolean isSupportsScrollableResults()
Specified by:
isSupportsScrollableResults in interface com.liferay.portal.kernel.dao.db.DB
Overrides:
isSupportsScrollableResults in class BaseDB

runSQL

public void runSQL(java.lang.String template)
            throws java.io.IOException,
                   java.sql.SQLException
Specified by:
runSQL in interface com.liferay.portal.kernel.dao.db.DB
Overrides:
runSQL in class BaseDB
Throws:
java.io.IOException
java.sql.SQLException

runSQL

public void runSQL(java.lang.String[] templates)
            throws java.io.IOException,
                   java.sql.SQLException
Specified by:
runSQL in interface com.liferay.portal.kernel.dao.db.DB
Overrides:
runSQL in class BaseDB
Throws:
java.io.IOException
java.sql.SQLException

buildCreateFileContent

protected java.lang.String buildCreateFileContent(java.lang.String sqlDir,
                                                  java.lang.String databaseName,
                                                  int population)
                                           throws java.io.IOException
Specified by:
buildCreateFileContent in class BaseDB
Throws:
java.io.IOException

getServerName

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

getTemplate

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

reword

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