public abstract class DbContext extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
ERROR_CLOSED_CONNECTION |
Modifier | Constructor and Description |
---|---|
protected |
DbContext() |
Modifier and Type | Method and Description |
---|---|
protected static void |
close(WrappedResultSet resultSet) |
void |
closeQuietly()
Close without causing exceptions.
|
protected int |
execute(String query)
Execute general query.
|
protected int |
execute(String query,
Object... objects)
Execute general query with parameters.
|
protected int |
executeNullsAlllowed(String query,
Object... objects)
Execute general query with parameters, nulls parameters are allowed.
|
protected VirtuosoConnectionWrapper |
getConnection() |
protected WrappedResultSet |
select(String query)
Select query.
|
protected WrappedResultSet |
select(String query,
Object... objects)
Select query with parameters.
|
protected void |
setConnection(JDBCConnectionCredentials connectionCredentials)
Set connections to database.
|
protected static final String ERROR_CLOSED_CONNECTION
protected void setConnection(JDBCConnectionCredentials connectionCredentials) throws ConnectionException
connectionCredentials
- credentials for connections to databaseConnectionException
protected VirtuosoConnectionWrapper getConnection()
public void closeQuietly()
protected WrappedResultSet select(String query) throws ConnectionException, QueryException
query
- ConnectionException
QueryException
protected WrappedResultSet select(String query, Object... objects) throws ConnectionException, QueryException
query
- objects
- ConnectionException
QueryException
protected int execute(String query) throws ConnectionException, QueryException
query
- ConnectionException
QueryException
protected int execute(String query, Object... objects) throws ConnectionException, QueryException
query
- objects
- ConnectionException
QueryException
protected int executeNullsAlllowed(String query, Object... objects) throws ConnectionException, QueryException
query
- objects
- ConnectionException
QueryException
protected static void close(WrappedResultSet resultSet)
Copyright © 2013. All Rights Reserved.