public class DBFunctions extends Object
Modifier and Type | Method and Description |
---|---|
<RESULT> RESULT |
execute(Connection conn,
DBOperation<RESULT> op)
Executes a method using a functional interface using a connection.
|
<RESULT,PARAM> |
execute(Connection conn,
PARAM param,
DBOperationParam<RESULT,PARAM> op)
Executes a method using a functional interface using a connection.
|
<RESULT> RESULT |
execute(DBOperation<RESULT> op)
Executes a method using a functional interface, grabbing a connection from the connection pool.
|
<RESULT,PARAM> |
execute(PARAM param,
DBOperationParam<RESULT,PARAM> op)
Executes a method using a functional interface, grabbing a connection from the connection pool.
|
static DBFunctions |
getInstance()
Gets the DBFunctions instance.
|
public static DBFunctions getInstance() throws SQLException
SQLException
- For connection, class loader or instantiation failures.SecurityException
- When access is denied.public <RESULT> RESULT execute(Connection conn, DBOperation<RESULT> op) throws SQLException, NotFoundException
RESULT
- The return value.conn
- The connection.NotFoundException
- When searched element is not found.SQLException
- For SQL errors in getting the Connection as well as executing the SQL.ClassCastException
- When parameters are not well defined.public <RESULT,PARAM> RESULT execute(Connection conn, PARAM param, DBOperationParam<RESULT,PARAM> op) throws SQLException, NotFoundException
PARAM
- The parameter for the database operation.RESULT
- The return value.conn
- The connection.param
- The parameter.NotFoundException
- When searched element is not found.SQLException
- For SQL errors in getting the Connection as well as executing the SQL.ClassCastException
- When parameters are not well defined.public <RESULT> RESULT execute(DBOperation<RESULT> op) throws SQLException, NotFoundException
RESULT
- The return value.NotFoundException
- When searched element is not found.SQLException
- For SQL errors in getting the Connection as well as executing the SQL.ClassCastException
- When parameters are not well defined.public <RESULT,PARAM> RESULT execute(PARAM param, DBOperationParam<RESULT,PARAM> op) throws SQLException, NotFoundException
PARAM
- The parameter for the database operation.RESULT
- The return value.param
- The parameter.NotFoundException
- When searched element is not found.SQLException
- For SQL errors in getting the Connection as well as executing the SQL.ClassCastException
- When parameters are not well defined.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.