1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.user.pref.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.hr.time.user.pref.UserPreferences;
22 import org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb;
23
24 public class UserPreferenceDaoImpl extends PlatformAwareDaoBaseOjb implements UserPreferenceDao {
25
26
27 public UserPreferences getUserPreferences(String principalId){
28 Criteria crit = new Criteria();
29 crit.addEqualTo("principalId", principalId);
30 Query query = QueryFactory.newQuery(UserPreferences.class, crit);
31 return (UserPreferences)this.getPersistenceBrokerTemplate().getObjectByQuery(query);
32 }
33 }