Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.kuali.rice.kew.rule.dao.impl;
 
 import java.util.List;
 import java.util.Map;
 
 
 
 
 public class RuleDelegationDAOJpaImpl implements RuleDelegationDAO {
 
 	@PersistenceContext(unitName="kew-unit")
 
     public List<RuleDelegationBofindByDelegateRuleId(String ruleId) {
         Criteria crit = new Criteria(RuleDelegationBo.class.getName());
         crit.eq("delegateRuleId"ruleId);
         return (Listnew QueryByCriteria(crit).toQuery().getResultList();
     }
 
     public void save(RuleDelegationBo ruleDelegation) {
     	if(ruleDelegation.getRuleDelegationId()==null){
     		.persist(ruleDelegation);
     	}else{
     		OrmUtils.merge(ruleDelegation);
     	}
     }
         Criteria crit = new Criteria(RuleDelegationBo.class.getName());
         crit.eq("delegationRuleBaseValues.currentInd"true);
         return (Listnew QueryByCriteria(crit).toQuery().getResultList();
     }
 
     public RuleDelegationBo findByRuleDelegationId(String ruleDelegationId){
         return .find(RuleDelegationBo.classruleDelegationId);
 
     }
     public void delete(String ruleDelegationId){
     	.remove(findByRuleDelegationId(ruleDelegationId));
     }
 
     public EntityManager getEntityManager() {
         return this.;
     }
 
     public void setEntityManager(EntityManager entityManager) {
         this. = entityManager;
     }
 
     public List<RuleDelegationBofindByResponsibilityIdWithCurrentRule(String responsibilityId) {
     	Criteria crit = new Criteria(RuleDelegationBo.class.getName());
     	crit.eq("responsibilityId"responsibilityId);
     	crit.eq("delegationRuleBaseValues.currentInd"true);
     	Collection delegations = new QueryByCriteria(crit).toQuery().getResultList();
     	return new ArrayList<RuleDelegationBo>(delegations);
     }

    
 
     public List<RuleDelegationBosearch(String parentRuleBaseVaueIdString parentResponsibilityIdString docTypeNameString ruleId,
             String ruleTemplateIdString ruleDescriptionString workgroupId,
             String workflowIdString delegationTypeBoolean activeInd,
             Map extensionValuesString workflowIdDirective) {
         // TODO jjhanso - THIS METHOD NEEDS JAVADOCS
         return null;
     }

    
 
     public List<RuleDelegationBosearch(String parentRuleBaseVaueIdString parentResponsibilityIdString docTypeNameString ruleTemplateId,
            String ruleDescriptionCollection<StringworkgroupIds,
            String workflowIdString delegationTypeBoolean activeInd,
            Map extensionValuesCollection actionRequestCodes) {
        // TODO jjhanso - THIS METHOD NEEDS JAVADOCS
        return null;
    }
New to GrepCode? Check out our FAQ X