public interface Database
| Modifier and Type | Method and Description |
|---|---|
<T> List<T> |
getMultiple(Query query,
ObjectCreator<T> objectCreator)
Returns multiple query results.
|
<T> T |
getSingle(Query query,
ObjectCreator<T> objectCreator)
Returns a single object from a database.
|
long |
insert(Query query)
Inserts an object into the database and returns the automatically
generated ID, if any.
|
void |
process(Query query,
ResultProcessor resultProcessor)
Processes the results of the given query with the given result processor.
|
int |
update(Query query)
Updates objects in the database.
|
<T> T getSingle(Query query, ObjectCreator<T> objectCreator) throws DatabaseException
T - The type of the objectquery - The query to executeobjectCreator - The object creatornull if the query did not
yield any resultsDatabaseException - if a database error occurs<T> List<T> getMultiple(Query query, ObjectCreator<T> objectCreator) throws DatabaseException
T - The type of the resultsquery - The query to executeobjectCreator - The object creatorDatabaseException - if a database error occurslong insert(Query query) throws DatabaseException
query - The query to execute-1 if no ID was
generatedDatabaseException - if a database error occursint update(Query query) throws DatabaseException
query - The query to executeDatabaseException - if a database error occursvoid process(Query query, ResultProcessor resultProcessor) throws DatabaseException
query - The query to executeresultProcessor - The result processor used to process the result setDatabaseException - if a database error occursCopyright © 2026. All rights reserved.