public class QueryByObjectTransformer<T> extends EntityManagerLookupAware implements org.apache.commons.collections.Transformer, Serializable
Query or even take in a direct Query;
fetch the List of entity from QueryableDao.
Query.getPageInfo() is not null then QueryableDao.queryPage(Query) is used else QueryableDao.query(Query).| Constructor and Description |
|---|
QueryByObjectTransformer() |
QueryByObjectTransformer(QueryableDao<T> dao) |
| Modifier and Type | Method and Description |
|---|---|
QueryableDao<T> |
getDao()
AbstractQueryableDaoImpl type dao to support Query by object |
Class |
getType()
If not null then, then will try to convert output row into Object type
|
void |
setDao(QueryableDao<T> dao)
AbstractQueryableDaoImpl type dao to support Query by object |
void |
setType(Class type)
If not null then, then will try to convert output row into Object type
|
Object |
transform(Object input) |
getEntityManager, getEntityManagerProvider, setEntityManager, setEntityManagerProvider, updateContextpublic QueryByObjectTransformer()
public QueryByObjectTransformer(QueryableDao<T> dao)
public Object transform(Object input)
transform in interface org.apache.commons.collections.Transformerpublic QueryableDao<T> getDao()
AbstractQueryableDaoImpl type dao to support Query by objectpublic void setDao(QueryableDao<T> dao)
AbstractQueryableDaoImpl type dao to support Query by objectpublic Class getType()
public void setType(Class type)
Copyright © 2018. All rights reserved.