1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.kew.rule.dao.impl;
18
19 import org.apache.ojb.broker.query.QueryByCriteria;
20 import org.kuali.rice.kew.rule.RuleResponsibility;
21 import org.kuali.rice.kew.rule.dao.RuleResponsibilityDAO;
22 import org.springmodules.orm.ojb.support.PersistenceBrokerDaoSupport;
23
24
25 public class RuleResponsibilityDAOOjbImpl extends PersistenceBrokerDaoSupport implements RuleResponsibilityDAO {
26
27
28
29
30
31
32 public void delete(Long ruleResponsibilityId) {
33 this.getPersistenceBrokerTemplate().delete(findByRuleResponsibilityId(ruleResponsibilityId));
34 }
35
36
37
38
39
40
41 public RuleResponsibility findByRuleResponsibilityId(Long ruleResponsibilityId) {
42 RuleResponsibility ruleResponsibility = new RuleResponsibility();
43 ruleResponsibility.setRuleResponsibilityKey(ruleResponsibilityId);
44 return (RuleResponsibility) this.getPersistenceBrokerTemplate().getObjectByQuery(new QueryByCriteria(ruleResponsibility));
45 }
46 }