E
- the generic type of entities being queriedpublic class TransformedQuery<E extends SQLEntity> extends BaseQuery<TransformedQuery<E>,E>
SQLQuery
into one that returns entities rather than rows.
This can be used to generate complex SQL queries which still use to O/R mixing to return entity objects read from a query result.
Modifier and Type | Field and Description |
---|---|
protected String |
alias |
protected SQLQuery |
qry |
descriptor, limit, MAX_LIST_SIZE, mixing, skip
Modifier | Constructor and Description |
---|---|
protected |
TransformedQuery(EntityDescriptor descriptor,
String alias,
SQLQuery qry) |
Modifier and Type | Method and Description |
---|---|
protected Boolean |
invokeHandlerForRow(Function<E,Boolean> handler,
Row row) |
void |
iterate(Function<E,Boolean> handler)
Calls the given function on all items in the result, as long as it returns true.
|
String |
toString() |
failOnOverflow, first, getDescriptor, getLimit, iterateAll, limit, one, queryFirst, queryList, queryOne, skip
protected TransformedQuery(EntityDescriptor descriptor, String alias, SQLQuery qry)
public void iterate(Function<E,Boolean> handler)
BaseQuery
Note that this method is intended for large results as not all items in the result need to be kept in memory when iterating through them.
Copyright © 2018. All rights reserved.