public abstract class AbstractDbmsBean extends Object implements DbmsBean
Constructor and Description |
---|
AbstractDbmsBean() |
Modifier and Type | Method and Description |
---|---|
boolean |
dropColumn(Connection connection,
String tableName,
String columnName)
Checks whether given table contains the specified column and drops it
|
boolean |
dropColumn(Connection connection,
String tableName,
String columnName,
List<String> defaultConstraintNames,
String indexName)
Checks whether given table contains the specified column and drops it, as well as foreign key constraints and index on the column.
|
protected void |
dropConstraints(Statement statement,
String tableName,
String columnName,
List<String> defaultConstraintNames) |
protected void |
dropIndex(Statement statement,
String indexName) |
boolean |
isColumnPresent(Connection connection,
String tableName,
String columnName)
Checks whether given table contains the specified column.
|
boolean |
isColumnPresent(Statement statement,
String tableName,
String columnName)
Checks whether given table contains the specified column.
|
boolean |
isHsqldb() |
boolean |
isMsSqlServer() |
boolean |
isMySql() |
boolean |
isOracle() |
boolean |
isPostgreSql() |
boolean |
isTablePresent(Connection connection,
String tableName)
Checks whether given table is present in the database
|
boolean |
isTablePresent(Statement statement,
String tableName)
Checks whether given table is present in the database
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConcat, getDatabaseType, getQuery, prepareStatement, resizeVarcharColumn
public boolean isColumnPresent(@NotNull Connection connection, @NotNull String tableName, @NotNull String columnName) throws SQLException
DbmsBean
isColumnPresent
in interface DbmsBean
SQLException
public boolean isColumnPresent(@NotNull Statement statement, @NotNull String tableName, @NotNull String columnName) throws SQLException
DbmsBean
isColumnPresent
in interface DbmsBean
SQLException
public boolean dropColumn(@NotNull Connection connection, @NotNull String tableName, @NotNull String columnName, @NotNull List<String> defaultConstraintNames, @Nullable String indexName) throws SQLException
DbmsBean
dropColumn
in interface DbmsBean
SQLException
protected void dropConstraints(Statement statement, String tableName, String columnName, List<String> defaultConstraintNames)
protected void dropIndex(Statement statement, String indexName) throws SQLException
SQLException
public boolean dropColumn(@NotNull Connection connection, @NotNull String tableName, @NotNull String columnName) throws SQLException
DbmsBean
dropColumn
in interface DbmsBean
SQLException
public boolean isTablePresent(@NotNull Connection connection, @NotNull String tableName) throws SQLException
DbmsBean
isTablePresent
in interface DbmsBean
connection
- connection used to verify DB table existencetableName
- name of DB tableSQLException
- if a database error occurs or connection is closedpublic boolean isTablePresent(@NotNull Statement statement, @NotNull String tableName)
DbmsBean
isTablePresent
in interface DbmsBean
statement
- statement used to verify DB table existencetableName
- name of DB tablepublic boolean isHsqldb()
public boolean isMsSqlServer()
isMsSqlServer
in interface DbmsBean
public boolean isMySql()
public boolean isOracle()
public boolean isPostgreSql()
isPostgreSql
in interface DbmsBean
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.