|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.utils.db.AbstractDbmsBean
public abstract class AbstractDbmsBean
Constructor Summary | |
---|---|
AbstractDbmsBean()
|
Method Summary | |
---|---|
boolean |
dropColumn(java.sql.Connection connection,
java.lang.String tableName,
java.lang.String columnName)
Checks whether given table contains the specified column and drops it |
boolean |
dropColumn(java.sql.Connection connection,
java.lang.String tableName,
java.lang.String columnName,
java.util.List<java.lang.String> defaultConstraintNames,
java.lang.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(java.sql.Statement statement,
java.lang.String tableName,
java.lang.String columnName,
java.util.List<java.lang.String> defaultConstraintNames)
|
protected void |
dropIndex(java.sql.Statement statement,
java.lang.String indexName)
|
boolean |
isColumnPresent(java.sql.Connection connection,
java.lang.String tableName,
java.lang.String columnName)
Checks whether given table contains the specified column. |
boolean |
isColumnPresent(java.sql.Statement statement,
java.lang.String tableName,
java.lang.String columnName)
Checks whether given table contains the specified column. |
boolean |
isHsqldb()
|
boolean |
isMsSqlServer()
|
boolean |
isMySql()
|
boolean |
isOracle()
|
boolean |
isPostgreSql()
|
boolean |
isTablePresent(java.sql.Connection connection,
java.lang.String tableName)
Checks whether given table is present in the database |
boolean |
isTablePresent(java.sql.Statement statement,
java.lang.String tableName)
Checks whether given table is present in the database |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.bamboo.utils.db.DbmsBean |
---|
getQuery, prepareStatement |
Constructor Detail |
---|
public AbstractDbmsBean()
Method Detail |
---|
public boolean isColumnPresent(@NotNull java.sql.Connection connection, @NotNull java.lang.String tableName, @NotNull java.lang.String columnName) throws java.sql.SQLException
DbmsBean
isColumnPresent
in interface DbmsBean
java.sql.SQLException
public boolean isColumnPresent(@NotNull java.sql.Statement statement, @NotNull java.lang.String tableName, @NotNull java.lang.String columnName) throws java.sql.SQLException
DbmsBean
isColumnPresent
in interface DbmsBean
java.sql.SQLException
public boolean dropColumn(@NotNull java.sql.Connection connection, @NotNull java.lang.String tableName, @NotNull java.lang.String columnName, @NotNull java.util.List<java.lang.String> defaultConstraintNames, @Nullable java.lang.String indexName) throws java.sql.SQLException
DbmsBean
dropColumn
in interface DbmsBean
java.sql.SQLException
protected void dropConstraints(java.sql.Statement statement, java.lang.String tableName, java.lang.String columnName, java.util.List<java.lang.String> defaultConstraintNames)
protected void dropIndex(java.sql.Statement statement, java.lang.String indexName) throws java.sql.SQLException
java.sql.SQLException
public boolean dropColumn(@NotNull java.sql.Connection connection, @NotNull java.lang.String tableName, @NotNull java.lang.String columnName) throws java.sql.SQLException
DbmsBean
dropColumn
in interface DbmsBean
java.sql.SQLException
public boolean isTablePresent(@NotNull java.sql.Connection connection, @NotNull java.lang.String tableName) throws java.sql.SQLException
DbmsBean
isTablePresent
in interface DbmsBean
connection
- connection used to verify DB table existencetableName
- name of DB table
java.sql.SQLException
- if a database error occurs or connection is closedpublic boolean isTablePresent(@NotNull java.sql.Statement statement, @NotNull java.lang.String tableName)
DbmsBean
isTablePresent
in interface DbmsBean
statement
- statement used to verify DB table existencetableName
- name of DB table
public boolean isHsqldb()
isHsqldb
in interface DbmsBean
public boolean isMsSqlServer()
isMsSqlServer
in interface DbmsBean
public boolean isMySql()
isMySql
in interface DbmsBean
public boolean isOracle()
isOracle
in interface DbmsBean
public boolean isPostgreSql()
isPostgreSql
in interface DbmsBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |