Package nl.gx.webmanager.handler.util
Class DatabaseUtil
- java.lang.Object
-
- nl.gx.webmanager.handler.util.DatabaseUtil
-
public final class DatabaseUtil extends Object
Static database utility methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Integer
executeIntegerQuery(DataSource datasource, String statement, Class[] types, Object[] arguments)
Execute a query that returns an integer (for example a select will return the number of records.static Integer
executeIntegerQuery(DataSource datasource, String statement, Object[] arguments)
Execute a query that returns an integer (for example a select will return the number of records.static Integer[]
executeIntegersQuery(DataSource datasource, String statement, Class[] types, Object[] arguments)
Execute a query that returns integers.static Integer[]
executeIntegersQuery(DataSource datasource, String statement, Object[] arguments)
Execute a query that returns integers.
-
-
-
Method Detail
-
executeIntegerQuery
public static Integer executeIntegerQuery(DataSource datasource, String statement, Object[] arguments) throws SQLException
Execute a query that returns an integer (for example a select will return the number of records. in the resultset)- Parameters:
datasource
-statement
-arguments
-- Returns:
- the integer returned by executing the query
- Throws:
SQLException
-
executeIntegerQuery
public static Integer executeIntegerQuery(DataSource datasource, String statement, Class[] types, Object[] arguments) throws SQLException
Execute a query that returns an integer (for example a select will return the number of records. in the resultset)- Parameters:
datasource
-statement
-types
-arguments
-- Returns:
- the integer returned by executing the query
- Throws:
SQLException
-
executeIntegersQuery
public static Integer[] executeIntegersQuery(DataSource datasource, String statement, Object[] arguments) throws SQLException
Execute a query that returns integers.- Parameters:
datasource
-statement
-arguments
-- Returns:
- array of integers
- Throws:
SQLException
-
executeIntegersQuery
public static Integer[] executeIntegersQuery(DataSource datasource, String statement, Class[] types, Object[] arguments) throws SQLException
Execute a query that returns integers.- Parameters:
datasource
-statement
-types
-arguments
-- Returns:
- array of integers
- Throws:
SQLException
-
-