1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.tklm.leave.accrual.dao;
17
18 import org.apache.ojb.broker.query.Criteria;
19 import org.apache.ojb.broker.query.Query;
20 import org.apache.ojb.broker.query.QueryFactory;
21 import org.kuali.kpme.tklm.leave.accrual.PrincipalAccrualRan;
22 import org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb;
23
24 public class PrincipalAccrualRanDaoOjbImpl extends PlatformAwareDaoBaseOjb implements PrincipalAccrualRanDao{
25
26 @Override
27 public PrincipalAccrualRan getLastPrincipalAccrualRan(String principalId) {
28 Criteria crit = new Criteria();
29 crit.addEqualTo("principalId", principalId);
30
31 Query query = QueryFactory.newQuery(PrincipalAccrualRan.class, crit);
32 return (PrincipalAccrualRan)this.getPersistenceBrokerTemplate().getObjectByQuery(query);
33 }
34
35 }