org.gcube.data.figis.tmplugin.dbconnection
Class ConnectionPool

java.lang.Object
  extended by org.gcube.data.figis.tmplugin.dbconnection.ConnectionPool

public class ConnectionPool
extends Object

Author:
"Valentina Marioli valentina.marioli@isti.cnr.it"

Field Summary
static String dbJdbc
           
 
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, PreparedStatement stmt)
          Update
 void releaseConnection(Connection con)
          Release the connection and put it in the queue
 ResultSet selectPreStatement(String query)
          select
 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
 

Field Detail

dbJdbc

public static String dbJdbc
Method Detail

getConnectionPool

public static ConnectionPool getConnectionPool()
                                        throws ConnectionPoolException
get connection pool

Throws:
ConnectionPoolException

getConnection

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

Throws:
SQLException
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,
                            PreparedStatement stmt)
Update

Parameters:
stmtInsert -

insertPreStatement

public boolean insertPreStatement(String query)

selectPreStatement

public ResultSet selectPreStatement(String query)
select


selectPrestatement

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



Copyright © 2013. All Rights Reserved.