/**
  * 插入规则
  *
  * @see
  *     com.yunat.workflow.development.service.DevelopmentService#insertRule(com.yunat.workflow.development.domain.RuleDomain)
  * @author: 邱路平 - [email protected]
  * @date: Created on Jul 10, 2013 5:46:02 PM
  */
 @Transactional
 public void insertRule(RuleDomain ruleDomain) {
   Rule rp = new Rule();
   rp.setRid(UUID.randomUUID().toString().replace("-", ""));
   rp.setOriginal_value(ruleDomain.getOriginal_value());
   rp.setNew_value(ruleDomain.getNew_value());
   rp.setRule_type(ruleDomain.getRule_type());
   rp.setTask_id(ruleDomain.getTask_id());
   ruleDAO.insertRule(rp);
 }
 /**
  * 查询规则
  *
  * @see
  *     com.yunat.workflow.development.service.DevelopmentService#queryRuleByTaskId(java.lang.String)
  * @author: 邱路平 - [email protected]
  * @date: Created on Jul 10, 2013 5:46:02 PM
  */
 @Transactional
 public List<RuleDomain> queryRuleByTaskId(String task_id) {
   List<Rule> attachmentPojo = ruleDAO.queryRuleList(task_id);
   List<RuleDomain> ruleDomain = new ArrayList<RuleDomain>();
   for (Rule rp : attachmentPojo) {
     RuleDomain rd = new RuleDomain();
     rd.setRid(rp.getRid());
     rd.setTask_id(rp.getTask_id());
     rd.setOriginal_value(rp.getOriginal_value());
     rd.setNew_value(rp.getNew_value());
     rd.setRule_type(rp.getRule_type());
     ruleDomain.add(rd);
   }
   return ruleDomain;
 }
 /**
  * 删除规则
  *
  * @see
  *     com.yunat.workflow.development.service.DevelopmentService#deleteRule(com.yunat.workflow.development.domain.RuleDomain)
  * @author: 邱路平 - [email protected]
  * @date: Created on Jul 10, 2013 5:46:02 PM
  */
 @Transactional
 public void deleteRule(RuleDomain ruleDomain) {
   Rule rp = new Rule();
   rp.setRid(ruleDomain.getRid());
   ruleDAO.deleteRule(rp);
 }