public class SelectStatement<T> extends AbstractStatement<T>
| Constructor and Description |
|---|
SelectStatement(Class<T> cls,
Connection connection)
Creates a new Select Statement for table cls
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
byId(UUID id,
Map<Object,Object> handledObjects)
Selects an Object directly by its Id or returns a cached Object of the
current session.
|
List<T> |
execute()
Executes the Query.
|
List<T> |
execute(Collection<?> args)
Executes a prepared statement by handing over the query arguments.
|
protected static <S> AbstractStatement<S> |
select(Class<S> clazz,
Connection connection) |
add, add, and, assembleFullSelectQuery, assembleQuery, byId, getType, or, query, toStringexecuteQuery, executeQuery, getConnectionpublic SelectStatement(Class<T> cls, Connection connection)
cls - Class representing a database tableconnection - Database connectionprotected static <S> AbstractStatement<S> select(Class<S> clazz, Connection connection)
public List<T> execute(Collection<?> args)
execute in class AbstractStatement<T>args - Arguments for the prepared statementpublic List<T> execute()
execute in class AbstractStatement<T>protected T byId(UUID id, Map<Object,Object> handledObjects)
AbstractStatementbyId in class AbstractStatement<T>id - Id of the entryhandledObjects - Object cache of fetched entries in the same sessionCopyright © 2019. All rights reserved.