Coverage Report - org.kuali.student.r2.core.class1.atp.dao.AtpMilestoneRelationDao
 
Classes in this File Line Coverage Branch Coverage Complexity
AtpMilestoneRelationDao
0%
0/7
N/A
1
 
 1  
 package org.kuali.student.r2.core.class1.atp.dao;
 2  
 
 3  
 import java.util.List;
 4  
 
 5  
 import javax.persistence.Query;
 6  
 
 7  
 import org.kuali.student.enrollment.dao.GenericEntityDao;
 8  
 import org.kuali.student.r2.core.class1.atp.model.AtpMilestoneRelationEntity;
 9  
 
 10  0
 public class AtpMilestoneRelationDao extends GenericEntityDao<AtpMilestoneRelationEntity> {
 11  
 
 12  
     @SuppressWarnings("unchecked")
 13  
     public List<AtpMilestoneRelationEntity> getByMilestoneId(String milestoneId) {
 14  0
         return em.createQuery("from AtpMilestoneRelationEntity amRel where amRel.milestoneId=:milestoneId")
 15  
                 .setParameter("milestoneId", milestoneId).getResultList();
 16  
     }
 17  
 
 18  
     @SuppressWarnings("unchecked")
 19  
     public List<AtpMilestoneRelationEntity> getByAtpId(String atpId) {
 20  0
         return em.createQuery("from AtpMilestoneRelationEntity amRel where amRel.atpId=:atpId")
 21  
                 .setParameter("atpId", atpId).getResultList();
 22  
     }
 23  
 
 24  
     @SuppressWarnings("unchecked")
 25  
     public List<String> getIdsByAtpAndMilestone(String atpId, String milestoneId) {
 26  0
         Query query = em
 27  
                 .createQuery("select amRel.id from AtpMilestoneRelationEntity amRel where amRel.atpId=:atpId and amRel.milestoneId=:milestoneId");
 28  0
         query.setParameter("atpId", atpId);
 29  0
         query.setParameter("milestoneId", milestoneId);
 30  0
         return query.getResultList();
 31  
     }
 32  
 
 33  
 }