com.atlassian.bamboo.utils.db
Class JdbcUtils

java.lang.Object
  extended by com.atlassian.bamboo.utils.db.JdbcUtils

public class JdbcUtils
extends java.lang.Object


Method Summary
static boolean executeQuietly(java.sql.Statement statement, java.lang.String query)
           
static java.util.List<java.lang.Long> getListOfLong(java.sql.Connection connection, java.lang.String query)
           
static int runDeleteQuery(java.sql.Connection connection, java.lang.String query, java.lang.String entityName)
           
static int runDeleteQuery(java.sql.Connection connection, java.lang.String tableName, java.lang.String idColumn, java.lang.Iterable<? extends BambooIdProvider> objects)
           
static int runDeleteQuery(java.sql.PreparedStatement statement, java.lang.String query, java.lang.String entityName)
           
static int runUpdateQuery(java.sql.PreparedStatement statement, java.lang.String query, java.lang.String entityName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

executeQuietly

public static boolean executeQuietly(java.sql.Statement statement,
                                     java.lang.String query)

runDeleteQuery

public static int runDeleteQuery(@NotNull
                                 java.sql.Connection connection,
                                 @NotNull
                                 java.lang.String query,
                                 @NotNull
                                 java.lang.String entityName)
                          throws java.sql.SQLException
Throws:
java.sql.SQLException

runDeleteQuery

public static int runDeleteQuery(@NotNull
                                 java.sql.PreparedStatement statement,
                                 @NotNull
                                 java.lang.String query,
                                 @NotNull
                                 java.lang.String entityName)
                          throws java.sql.SQLException
Parameters:
statement - statement to be executed (caller is responsible for closing statement)
query -
entityName -
Returns:
Throws:
java.sql.SQLException

runUpdateQuery

public static int runUpdateQuery(@NotNull
                                 java.sql.PreparedStatement statement,
                                 @NotNull
                                 java.lang.String query,
                                 @NotNull
                                 java.lang.String entityName)
                          throws java.sql.SQLException
Parameters:
statement - statement to be executed (caller is responsible for closing statement)
query -
entityName -
Returns:
Throws:
java.sql.SQLException

getListOfLong

public static java.util.List<java.lang.Long> getListOfLong(@NotNull
                                                           java.sql.Connection connection,
                                                           @NotNull
                                                           java.lang.String query)
                                                    throws java.sql.SQLException
Throws:
java.sql.SQLException

runDeleteQuery

public static int runDeleteQuery(@NotNull
                                 java.sql.Connection connection,
                                 @NotNull
                                 java.lang.String tableName,
                                 @NotNull
                                 java.lang.String idColumn,
                                 @NotNull
                                 java.lang.Iterable<? extends BambooIdProvider> objects)
                          throws java.sql.SQLException
Throws:
java.sql.SQLException


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.