mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1460 - ENH: Add FetchGroup ... as a mechanism to specify select() + fetch() separately from Query
This commit is contained in:
1 parent
02fe956056
commit
471605619a
17 files changed
+569
-7
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package io.ebeaninternal.server.query;
|
||||
|
||||
import io.ebean.FetchGroup;
|
||||
import io.ebean.FetchGroupBuilder;
|
||||
import io.ebean.service.SpiFetchGroupService;
|
||||
import io.ebeaninternal.server.querydefn.OrmQueryDetail;
|
||||
|
||||
/**
|
||||
* Default implementation of SpiFetchGroupService.
|
||||
*/
|
||||
public final class DFetchGroupService implements SpiFetchGroupService {
|
||||
|
||||
@Override
|
||||
public FetchGroup of(String select) {
|
||||
return new DFetchGroup(detail(select));
|
||||
}
|
||||
|
||||
@Override
|
||||
public FetchGroupBuilder select(String select) {
|
||||
return new DFetchGroupBuilder(detail(select));
|
||||
}
|
||||
|
||||
private OrmQueryDetail detail(String select) {
|
||||
OrmQueryDetail detail = new OrmQueryDetail();
|
||||
detail.select(select);
|
||||
return detail;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user