mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1297 - ENH: Add DtoQuery ... such that we can map native SQL queries automatically into "DTO beans"
This commit is contained in:
@@ -20,6 +20,8 @@ import io.ebeaninternal.server.query.CQuery;
|
||||
import io.ebeaninternal.server.transaction.RemoteTransactionEvent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Service Provider extension to EbeanServer.
|
||||
@@ -224,4 +226,24 @@ public interface SpiEbeanServer extends EbeanServer, BeanLoader, BeanCollectionL
|
||||
*/
|
||||
void scopedTransactionExit(Object returnOrThrowable, int opCode);
|
||||
|
||||
/**
|
||||
* DTO findList query.
|
||||
*/
|
||||
<T> List<T> findDtoList(SpiDtoQuery<T> query);
|
||||
|
||||
/**
|
||||
* DTO findOne query.
|
||||
*/
|
||||
<T> T findDtoOne(SpiDtoQuery<T> query);
|
||||
|
||||
/**
|
||||
* DTO findEach query.
|
||||
*/
|
||||
<T> void findDtoEach(SpiDtoQuery<T> query, Consumer<T> consumer);
|
||||
|
||||
/**
|
||||
* DTO findEachWhile query.
|
||||
*/
|
||||
<T> void findDtoEachWhile(SpiDtoQuery<T> query, Predicate<T> consumer);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user