public class DatabaseUtils extends Object
Modifier and Type | Method and Description |
---|---|
void |
closeAllConnections(PreparedStatement preparedStatement,
Connection connection,
ResultSet resultSet)
Utility method to close the connection streams.
|
Connection |
getConnection()
Utility method to get a new database connection
|
static DatabaseUtils |
getInstance() |
void |
initialize(String dataSourceName) |
public static DatabaseUtils getInstance()
public void initialize(String dataSourceName) throws GeoLocationResolverException
GeoLocationResolverException
public Connection getConnection() throws SQLException
SQLException
- if failed to get Connectionpublic void closeAllConnections(PreparedStatement preparedStatement, Connection connection, ResultSet resultSet)
preparedStatement
- PreparedStatementconnection
- ConnectionresultSet
- ResultSetCopyright © 2018 WSO2. All rights reserved.