org.gcube.data.spd.flora.dbconnection
Class ConnectionPool

java.lang.Object
  extended by org.gcube.data.spd.flora.dbconnection.ConnectionPool

public class ConnectionPool
extends Object


Method Summary
 Connection getConnection()
          get a free connection or create a new one
static ConnectionPool getConnectionPool()
          get connection pool
 boolean insertPreStatement(String query)
           
 boolean preStatement(String query, ArrayList<String> terms)
          Update
 void releaseConnection(Connection con)
          Release the connection and put it in the queue
 ResultSet selectPrestatement(String query, String term)
          Select using preStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnectionPool

public static ConnectionPool getConnectionPool()
                                        throws ConnectionPoolException
get connection pool

Throws:
ConnectionPoolException

getConnection

public Connection getConnection()
                         throws ConnectionPoolException
get a free connection or create a new one

Throws:
ConnectionPoolException

releaseConnection

public void releaseConnection(Connection con)
Release the connection and put it in the queue


preStatement

public boolean preStatement(String query,
                            ArrayList<String> terms)
Update


selectPrestatement

public ResultSet selectPrestatement(String query,
                                    String term)
Select using preStatement


insertPreStatement

public boolean insertPreStatement(String query)


Copyright © 2013. All Rights Reserved.