#1297 - ENH: Add DtoQuery ... such that we can map native SQL queries automatically into "DTO beans"

This commit is contained in:
Rob Bygrave
2018-03-02 23:32:01 +13:00
parent 5801f7620d
commit aad5b33db2
47 changed files with 2293 additions and 273 deletions
@@ -0,0 +1,27 @@
package io.ebeaninternal.server.dto;
import io.ebeaninternal.metric.QueryPlanCollector;
import io.ebeaninternal.server.type.DataReader;
import java.sql.SQLException;
/**
* Knows how to read and map rows into a Bean.
*/
public interface DtoQueryPlan {
/**
* Read the row data and return the DTO bean.
*/
Object readRow(DataReader dataReader) throws SQLException;
/**
* Add an event to the query execution statistics.
*/
void collect(long exeMicros, int rows);
/**
* Collect the query plan statistics.
*/
void collectStats(QueryPlanCollector collector);
}