Class DefaultMappedQuery<T,D>
java.lang.Object
io.ebeaninternal.server.querydefn.DefaultMappedQuery<T,D>
- All Implemented Interfaces:
io.ebean.MappedQuery<D>
Default implementation of
MappedQuery backing query.mapTo(dtoType).
Resolves the generated DtoMapper for the query's (entity, dto) pair, applies its
DtoMapper.fetchGroup() (derived from the target DTO's declared shape) - unless the
caller has already specified their own select()/fetch() spec, in which case
that manual spec is left untouched - and forces setUnmodifiable(true) on the
underlying query before it is executed, then maps the resulting entity graph into the
target DTO graph.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultMappedQuery(SpiEbeanServer server, SpiQuery<T> query, Class<D> dtoType) DefaultMappedQuery(SpiEbeanServer server, SpiQuery<T> query, Class<D> dtoType, io.ebean.DtoMapper<T, D> mapper) Use an already-resolved mapper instance directly - e.g. a named variant accessor on a generated mapper, such asquery.mapTo(User.class, userMapper.noFleets())- bypassingserver.dtoMapper(...)lookup entirely. -
Method Summary
Modifier and TypeMethodDescriptionfindList()findOne()io.ebean.PagedList<D> io.ebean.MappedQuery<D> usingConnection(Connection connection) io.ebean.MappedQuery<D> usingMaster(boolean useMaster) io.ebean.MappedQuery<D> usingTransaction(io.ebean.Transaction transaction) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.ebean.MappedQuery
findOneOrThrow
-
Constructor Details
-
DefaultMappedQuery
-
DefaultMappedQuery
public DefaultMappedQuery(SpiEbeanServer server, SpiQuery<T> query, Class<D> dtoType, io.ebean.DtoMapper<T, D> mapper) Use an already-resolved mapper instance directly - e.g. a named variant accessor on a generated mapper, such asquery.mapTo(User.class, userMapper.noFleets())- bypassingserver.dtoMapper(...)lookup entirely.
-
-
Method Details
-
findList
-
findOne
-
findOneOrEmpty
-
findOneOrThrow
-
findPagedList
-
findStream
-
usingMaster
-
usingTransaction
-
usingConnection
- Specified by:
usingConnectionin interfaceio.ebean.MappedQuery<T>
-