1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.lm.leavedonation.dao;
17
18
19 import org.apache.log4j.Logger;
20 import org.apache.ojb.broker.query.Criteria;
21 import org.apache.ojb.broker.query.Query;
22 import org.apache.ojb.broker.query.QueryFactory;
23 import org.kuali.hr.lm.leavedonation.LeaveDonation;
24 import org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb;
25
26 public class LeaveDonationDaoSpringOjbImpl extends PlatformAwareDaoBaseOjb implements LeaveDonationDao {
27
28 private static final Logger LOG = Logger.getLogger(LeaveDonationDaoSpringOjbImpl.class);
29
30 @Override
31 public LeaveDonation getLeaveDonation(String lmLeaveDonationId) {
32 Criteria crit = new Criteria();
33 crit.addEqualTo("lmLeaveDonationId", lmLeaveDonationId);
34 Query query = QueryFactory.newQuery(LeaveDonation.class, crit);
35 return (LeaveDonation) this.getPersistenceBrokerTemplate().getObjectByQuery(query);
36 }
37
38 }