com.ibm.jbatch.tck.artifacts.chunkartifacts
Class ConnectionHelper

java.lang.Object
  extended by com.ibm.jbatch.tck.artifacts.chunkartifacts.ConnectionHelper

public class ConnectionHelper
extends Object


Field Summary
static String COUNT_ORDERS
           
static String DELETE_ALL_ORDERS
           
static String DELETE_INVENTORY
           
static String INSERT_INVENTORY
           
static String INSERT_ORDER
           
static String jndiName
           
static String SELECT_INVENTORY
           
static String UPDATE_INVENTORY
           
 
Constructor Summary
ConnectionHelper()
           
 
Method Summary
static void cleanupConnection(Connection conn, ResultSet rs, PreparedStatement statement)
          closes connection to DB
static Connection getConnection(DataSource dataSource)
           
static Connection getConnection(DataSource dataSource, boolean autoCommit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jndiName

public static final String jndiName
See Also:
Constant Field Values

INSERT_INVENTORY

public static final String INSERT_INVENTORY
See Also:
Constant Field Values

UPDATE_INVENTORY

public static final String UPDATE_INVENTORY
See Also:
Constant Field Values

SELECT_INVENTORY

public static final String SELECT_INVENTORY
See Also:
Constant Field Values

DELETE_INVENTORY

public static final String DELETE_INVENTORY
See Also:
Constant Field Values

DELETE_ALL_ORDERS

public static final String DELETE_ALL_ORDERS
See Also:
Constant Field Values

INSERT_ORDER

public static final String INSERT_ORDER
See Also:
Constant Field Values

COUNT_ORDERS

public static final String COUNT_ORDERS
See Also:
Constant Field Values
Constructor Detail

ConnectionHelper

public ConnectionHelper()
Method Detail

getConnection

public static Connection getConnection(DataSource dataSource)
                                throws SQLException
Throws:
SQLException

getConnection

public static Connection getConnection(DataSource dataSource,
                                       boolean autoCommit)
                                throws SQLException
Throws:
SQLException

cleanupConnection

public static void cleanupConnection(Connection conn,
                                     ResultSet rs,
                                     PreparedStatement statement)
closes connection to DB

Parameters:
conn - - connection object to close
rs - - result set object to close
statement - - statement object to close


Copyright © 2013. All Rights Reserved.