public interface IQueryExecutor<C extends QDataContext>
| Modifier and Type | Method and Description |
|---|---|
void |
attach(C root,
Object o) |
void |
delete(C root,
Object o)
Cause the object to be deleted from the database.
|
<T> T |
find(C root,
Class<T> clz,
Object pk)
Load the persistent object with the specified type and primary key from the database.
|
<T> T |
find(C root,
ICriteriaTableDef<T> metatable,
Object pk) |
<T> T |
getInstance(C root,
Class<T> clz,
Object pk)
Load the persistent object with the specified type and primary key from the database.
|
<T> T |
getInstance(C root,
ICriteriaTableDef<T> clz,
Object pk) |
<T> List<T> |
query(C root,
QCriteria<T> q)
Execute the query specified by q and return a list of results.
|
List<Object[]> |
query(C root,
QSelection<?> sel)
Issue a selection query, where multiple fields or projections on fields are selected from a base class.
|
void |
refresh(C root,
Object o)
Refresh with latest content in the database.
|
void |
save(C root,
Object o)
Cause the object to be inserted in the database.
|
@Nonnull <T> List<T> query(@Nonnull C root, @Nonnull QCriteria<T> q) throws Exception
T - The return type for this query, a persistent class typeq - The selection criteriaException@Nonnull List<Object[]> query(@Nonnull C root, @Nonnull QSelection<?> sel) throws Exception
sel - Exception@Nullable <T> T find(@Nonnull C root, @Nonnull Class<T> clz, @Nonnull Object pk) throws Exception
T - The object type.clz - The persistent class for which an instance is being sought.pk - The PK for the instance required.Exception@Nullable <T> T find(@Nonnull C root, @Nonnull ICriteriaTableDef<T> metatable, @Nonnull Object pk) throws Exception
Exception@Nonnull <T> T getInstance(@Nonnull C root, @Nonnull Class<T> clz, @Nonnull Object pk) throws Exception
QDataContext.find(Class, Object).T - The object typeclz - The persistent class for which an instance is being sought.pk - The PK for the instance required.Exception@Nonnull <T> T getInstance(@Nonnull C root, @Nonnull ICriteriaTableDef<T> clz, @Nonnull Object pk) throws Exception
Exceptionvoid save(@Nonnull C root, @Nonnull Object o) throws Exception
o - Exceptionvoid refresh(@Nonnull C root, @Nonnull Object o) throws Exception
o - Exceptionvoid delete(@Nonnull C root, @Nonnull Object o) throws Exception
o - ExceptionCopyright © 2017 etc.to. All rights reserved.