org.kuali.student.r2.common.criteria.impl
Class CriteriaLookupDaoJpaImpl
java.lang.Object
org.kuali.student.r2.common.criteria.impl.CriteriaLookupDaoJpaImpl
public class CriteriaLookupDaoJpaImpl
- extends Object
This class is a copy of the org.kuali.rice.krad.criteria.CriteriaLookupDaoJpa
implementation in KRAD.
It should be removed once these problems are solved.
1) lookup: Replace "new Criteria(queryClass.getClass().getName());" with
new Criteria(queryClass.getName());
2) forRowResults: jpaQuery.setFirstResult(criteria.getStartAtIndex() != null ? criteria.getStartAtIndex() : 0);
instead of final int startAtIndex = criteria.getStartAtIndex() != null ? criteria.getStartAtIndex() + 1 : 1;
jpaQuery.setFirstResult(startAtIndex);
and
jpaQuery.setMaxResults(criteria.getMaxResults() + 1);
and
rows.remove(criteria.getMaxResults().intValue() + 1);
- Author:
- Kuali Rice Team (kuali-rice@googlegroups.com)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CriteriaLookupDaoJpaImpl
public CriteriaLookupDaoJpaImpl()
lookup
public <T> GenericQueryResults<T> lookup(Class<T> queryClass,
QueryByCriteria criteria,
LookupCustomizer<T> customizer)
lookupIds
public <T> GenericQueryResults<String> lookupIds(Class<T> queryClass,
QueryByCriteria criteria,
LookupCustomizer<T> customizer)
genericLookup
public <T> GenericQueryResults<List<String>> genericLookup(Class<T> queryClass,
QueryByCriteria criteria,
LookupCustomizer<T> customizer,
List<String> fields)
setEntityManager
public void setEntityManager(EntityManager entityManager)
- Parameters:
entityManager
- the entityManager to set
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.