public interface Database
Modifier and Type | Interface and Description |
---|---|
static class |
Database.State |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.util.concurrent.Future<?> |
executeTransaction(Transaction transaction)
Execute an SQL Transaction.
|
Database.State |
getState() |
DBType |
getType()
Used to get the
DBType of the Database |
void |
init()
Initializes the Database.
|
<T> T |
query(Query<T> query)
Execute an SQL Query statement to get a result.
|
void init()
Queries can be performed after this request has completed all required transactions for the database operations.
DBInitException
- if Database fails to initiate.void close()
<T> T query(Query<T> query)
This method should only be called from an asynchronous thread.
T
- Type of the object to be returned.query
- QueryStatement to execute.java.util.concurrent.Future<?> executeTransaction(Transaction transaction)
transaction
- Transaction to execute.DBType getType()
DBType
of the DatabaseDBType
DBType
Database.State getState()