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:
@@ -0,0 +1,46 @@
|
||||
package io.ebeaninternal.api;
|
||||
|
||||
import io.ebean.DtoQuery;
|
||||
import io.ebeaninternal.server.dto.DtoMappingRequest;
|
||||
import io.ebeaninternal.server.dto.DtoQueryPlan;
|
||||
|
||||
/**
|
||||
* Internal extension to DtoQuery.
|
||||
*/
|
||||
public interface SpiDtoQuery<T> extends DtoQuery<T>, SpiSqlBinding {
|
||||
|
||||
/**
|
||||
* Return the key for query plan.
|
||||
*/
|
||||
String planKey();
|
||||
|
||||
/**
|
||||
* Get the query plan for the cache.
|
||||
*/
|
||||
DtoQueryPlan getQueryPlan(String planKey);
|
||||
|
||||
/**
|
||||
* Build the query plan.
|
||||
*/
|
||||
DtoQueryPlan buildPlan(DtoMappingRequest request);
|
||||
|
||||
/**
|
||||
* Put the query plan into the cache.
|
||||
*/
|
||||
void putQueryPlan(String planKey, DtoQueryPlan plan);
|
||||
|
||||
/**
|
||||
* Return true if the query is in relaxed mapping mode.
|
||||
*/
|
||||
boolean isRelaxedMode();
|
||||
|
||||
/**
|
||||
* Return the label for the query.
|
||||
*/
|
||||
String getLabel();
|
||||
|
||||
/**
|
||||
* Return the associated DTO bean type.
|
||||
*/
|
||||
Class<T> getType();
|
||||
}
|
||||
Reference in New Issue
Block a user