public abstract class BaseDB
extends Object
implements com.liferay.portal.kernel.dao.db.DB
Modifier and Type | Field and Description |
---|---|
protected static String |
ALTER_COLUMN_NAME |
protected static String |
ALTER_COLUMN_TYPE |
protected static String |
ALTER_TABLE_NAME |
protected static String |
CREATE_TABLE |
protected static String |
DROP_INDEX |
protected static String |
DROP_PRIMARY_KEY |
protected static String[] |
RENAME_TABLE_TEMPLATE |
protected static String[] |
REWORD_TEMPLATE |
protected static String[] |
TEMPLATE |
Modifier | Constructor and Description |
---|---|
protected |
BaseDB(com.liferay.portal.kernel.dao.db.DBType dbType,
int majorVersion,
int minorVersion) |
Modifier and Type | Method and Description |
---|---|
void |
addIndexes(Connection con,
String indexesSQL,
Set<String> validIndexNames) |
protected String[] |
buildColumnNameTokens(String line) |
protected String[] |
buildColumnTypeTokens(String line) |
void |
buildCreateFile(String sqlDir,
String databaseName)
Deprecated.
As of Athanasius (7.3.x), with no direct replacement
|
void |
buildCreateFile(String sqlDir,
String databaseName,
int population)
Deprecated.
As of Athanasius (7.3.x), with no direct replacement
|
abstract String |
buildSQL(String template) |
void |
buildSQLFile(String sqlDir,
String fileName)
Deprecated.
As of Athanasius (7.3.x), with no direct replacement
|
protected String[] |
buildTableNameTokens(String line) |
protected Set<String> |
dropIndexes(Connection con,
String tablesSQL,
String indexesSQL,
List<com.liferay.portal.kernel.dao.db.Index> indexes) |
com.liferay.portal.kernel.dao.db.DBType |
getDBType() |
List<com.liferay.portal.kernel.dao.db.Index> |
getIndexes(Connection con) |
int |
getMajorVersion() |
int |
getMinorVersion() |
Integer |
getSQLType(String templateType) |
protected abstract int[] |
getSQLTypes() |
protected abstract String[] |
getTemplate() |
String |
getTemplateBlob() |
String |
getTemplateFalse() |
String |
getTemplateTrue() |
String |
getVersionString() |
long |
increment()
Deprecated.
As of Athanasius (7.3.x), replaced by
CounterLocalServiceUtil.increment() |
long |
increment(String name)
Deprecated.
As of Athanasius (7.3.x), replaced by
CounterLocalServiceUtil.increment(String) |
long |
increment(String name,
int size)
Deprecated.
As of Athanasius (7.3.x), replaced by
CounterLocalServiceUtil.increment(String, int) |
boolean |
isSupportsAlterColumnName() |
boolean |
isSupportsAlterColumnType() |
boolean |
isSupportsInlineDistinct() |
boolean |
isSupportsQueryingAfterException() |
boolean |
isSupportsScrollableResults() |
boolean |
isSupportsStringCaseSensitiveQuery() |
boolean |
isSupportsUpdateWithInnerJoin() |
protected String |
replaceTemplate(String template) |
protected abstract String |
reword(String data) |
void |
runSQL(Connection con,
String sql) |
void |
runSQL(Connection con,
String[] sqls) |
void |
runSQL(String sql) |
void |
runSQL(String[] sqls) |
void |
runSQLTemplate(String path)
Deprecated.
As of Athanasius (7.3.x), replaced by
DBProcess#runSQLTemplate(String) |
void |
runSQLTemplate(String path,
boolean failOnError)
Deprecated.
As of Athanasius (7.3.x), replaced by
DBProcess#runSQLTemplate(String, boolean) |
void |
runSQLTemplateString(Connection connection,
String template,
boolean failOnError) |
void |
runSQLTemplateString(Connection connection,
String template,
boolean evaluate,
boolean failOnError)
Deprecated.
As of Athanasius (7.3.x), replaced by
runSQLTemplateString(Connection, String, boolean) |
void |
runSQLTemplateString(String template,
boolean failOnError) |
void |
runSQLTemplateString(String template,
boolean evaluate,
boolean failOnError)
Deprecated.
As of Athanasius (7.3.x), replaced by
runSQLTemplateString(String, boolean) |
void |
setSupportsStringCaseSensitiveQuery(boolean supportsStringCaseSensitiveQuery) |
void |
updateIndexes(Connection con,
String tablesSQL,
String indexesSQL,
boolean dropIndexes) |
protected static final String ALTER_COLUMN_NAME
protected static final String ALTER_COLUMN_TYPE
protected static final String ALTER_TABLE_NAME
protected static final String CREATE_TABLE
protected static final String DROP_INDEX
protected static final String DROP_PRIMARY_KEY
protected static final String[] RENAME_TABLE_TEMPLATE
protected static final String[] REWORD_TEMPLATE
protected static final String[] TEMPLATE
protected BaseDB(com.liferay.portal.kernel.dao.db.DBType dbType, int majorVersion, int minorVersion)
public void addIndexes(Connection con, String indexesSQL, Set<String> validIndexNames) throws IOException
addIndexes
in interface com.liferay.portal.kernel.dao.db.DB
IOException
@Deprecated public void buildCreateFile(String sqlDir, String databaseName) throws IOException
buildCreateFile
in interface com.liferay.portal.kernel.dao.db.DB
IOException
@Deprecated public void buildCreateFile(String sqlDir, String databaseName, int population) throws IOException
buildCreateFile
in interface com.liferay.portal.kernel.dao.db.DB
IOException
public abstract String buildSQL(String template) throws IOException, SQLException
buildSQL
in interface com.liferay.portal.kernel.dao.db.DB
IOException
SQLException
@Deprecated public void buildSQLFile(String sqlDir, String fileName) throws IOException
buildSQLFile
in interface com.liferay.portal.kernel.dao.db.DB
IOException
public com.liferay.portal.kernel.dao.db.DBType getDBType()
getDBType
in interface com.liferay.portal.kernel.dao.db.DB
public List<com.liferay.portal.kernel.dao.db.Index> getIndexes(Connection con) throws SQLException
getIndexes
in interface com.liferay.portal.kernel.dao.db.DB
SQLException
public int getMajorVersion()
getMajorVersion
in interface com.liferay.portal.kernel.dao.db.DB
public int getMinorVersion()
getMinorVersion
in interface com.liferay.portal.kernel.dao.db.DB
public Integer getSQLType(String templateType)
getSQLType
in interface com.liferay.portal.kernel.dao.db.DB
public String getTemplateBlob()
getTemplateBlob
in interface com.liferay.portal.kernel.dao.db.DB
public String getTemplateFalse()
getTemplateFalse
in interface com.liferay.portal.kernel.dao.db.DB
public String getTemplateTrue()
getTemplateTrue
in interface com.liferay.portal.kernel.dao.db.DB
public String getVersionString()
getVersionString
in interface com.liferay.portal.kernel.dao.db.DB
@Deprecated public long increment()
CounterLocalServiceUtil.increment()
increment
in interface com.liferay.portal.kernel.dao.db.DB
@Deprecated public long increment(String name)
CounterLocalServiceUtil.increment(String)
increment
in interface com.liferay.portal.kernel.dao.db.DB
@Deprecated public long increment(String name, int size)
CounterLocalServiceUtil.increment(String, int)
increment
in interface com.liferay.portal.kernel.dao.db.DB
public boolean isSupportsAlterColumnName()
isSupportsAlterColumnName
in interface com.liferay.portal.kernel.dao.db.DB
public boolean isSupportsAlterColumnType()
isSupportsAlterColumnType
in interface com.liferay.portal.kernel.dao.db.DB
public boolean isSupportsInlineDistinct()
isSupportsInlineDistinct
in interface com.liferay.portal.kernel.dao.db.DB
public boolean isSupportsQueryingAfterException()
isSupportsQueryingAfterException
in interface com.liferay.portal.kernel.dao.db.DB
public boolean isSupportsScrollableResults()
isSupportsScrollableResults
in interface com.liferay.portal.kernel.dao.db.DB
public boolean isSupportsStringCaseSensitiveQuery()
isSupportsStringCaseSensitiveQuery
in interface com.liferay.portal.kernel.dao.db.DB
public boolean isSupportsUpdateWithInnerJoin()
isSupportsUpdateWithInnerJoin
in interface com.liferay.portal.kernel.dao.db.DB
public void runSQL(Connection con, String sql) throws IOException, SQLException
runSQL
in interface com.liferay.portal.kernel.dao.db.DB
IOException
SQLException
public void runSQL(Connection con, String[] sqls) throws IOException, SQLException
runSQL
in interface com.liferay.portal.kernel.dao.db.DB
IOException
SQLException
public void runSQL(String sql) throws IOException, SQLException
runSQL
in interface com.liferay.portal.kernel.dao.db.DB
IOException
SQLException
public void runSQL(String[] sqls) throws IOException, SQLException
runSQL
in interface com.liferay.portal.kernel.dao.db.DB
IOException
SQLException
@Deprecated public void runSQLTemplate(String path) throws IOException, javax.naming.NamingException, SQLException
DBProcess#runSQLTemplate(String)
runSQLTemplate
in interface com.liferay.portal.kernel.dao.db.DB
IOException
javax.naming.NamingException
SQLException
@Deprecated public void runSQLTemplate(String path, boolean failOnError) throws IOException, javax.naming.NamingException, SQLException
DBProcess#runSQLTemplate(String, boolean)
runSQLTemplate
in interface com.liferay.portal.kernel.dao.db.DB
IOException
javax.naming.NamingException
SQLException
public void runSQLTemplateString(Connection connection, String template, boolean failOnError) throws IOException, javax.naming.NamingException, SQLException
runSQLTemplateString
in interface com.liferay.portal.kernel.dao.db.DB
IOException
javax.naming.NamingException
SQLException
@Deprecated public void runSQLTemplateString(Connection connection, String template, boolean evaluate, boolean failOnError) throws IOException, javax.naming.NamingException, SQLException
runSQLTemplateString(Connection, String, boolean)
runSQLTemplateString
in interface com.liferay.portal.kernel.dao.db.DB
IOException
javax.naming.NamingException
SQLException
public void runSQLTemplateString(String template, boolean failOnError) throws IOException, javax.naming.NamingException, SQLException
runSQLTemplateString
in interface com.liferay.portal.kernel.dao.db.DB
IOException
javax.naming.NamingException
SQLException
@Deprecated public void runSQLTemplateString(String template, boolean evaluate, boolean failOnError) throws IOException, javax.naming.NamingException, SQLException
runSQLTemplateString(String, boolean)
runSQLTemplateString
in interface com.liferay.portal.kernel.dao.db.DB
IOException
javax.naming.NamingException
SQLException
public void setSupportsStringCaseSensitiveQuery(boolean supportsStringCaseSensitiveQuery)
setSupportsStringCaseSensitiveQuery
in interface com.liferay.portal.kernel.dao.db.DB
public void updateIndexes(Connection con, String tablesSQL, String indexesSQL, boolean dropIndexes) throws IOException, SQLException
updateIndexes
in interface com.liferay.portal.kernel.dao.db.DB
IOException
SQLException
protected String[] buildColumnNameTokens(String line)
protected String[] buildColumnTypeTokens(String line)
protected String[] buildTableNameTokens(String line)
protected Set<String> dropIndexes(Connection con, String tablesSQL, String indexesSQL, List<com.liferay.portal.kernel.dao.db.Index> indexes) throws IOException, SQLException
IOException
SQLException
protected abstract int[] getSQLTypes()
protected abstract String[] getTemplate()
protected String replaceTemplate(String template)
protected abstract String reword(String data) throws IOException, SQLException
IOException
SQLException