| 1 | |
package org.kuali.student.r2.core.process.dao; |
| 2 | |
|
| 3 | |
import org.kuali.student.enrollment.dao.GenericEntityDao; |
| 4 | |
import org.kuali.student.r2.core.process.model.InstructionEntity; |
| 5 | |
|
| 6 | |
import java.util.List; |
| 7 | |
|
| 8 | 0 | public class InstructionDao extends GenericEntityDao<InstructionEntity> { |
| 9 | |
|
| 10 | |
public List<InstructionEntity> getByInstructionTypeId(String instructionTypeId) { |
| 11 | 0 | return em.createQuery("from InstructionEntity a where a.instructionType.id=:instructionTypeId").setParameter("instructionTypeId", instructionTypeId).getResultList(); |
| 12 | |
} |
| 13 | |
|
| 14 | |
public List<InstructionEntity> getByProcess(String processId) { |
| 15 | 0 | return em.createQuery("from InstructionEntity a where a.process.id=:processId").setParameter("processId", processId).getResultList(); |
| 16 | |
} |
| 17 | |
|
| 18 | |
public List<InstructionEntity> getByCheck(String checkId) { |
| 19 | 0 | return em.createQuery("from InstructionEntity a where a.check.id=:checkId").setParameter("checkId", checkId).getResultList(); |
| 20 | |
} |
| 21 | |
|
| 22 | |
public List<InstructionEntity> getByProcessAndCheck(String processId, String checkId) { |
| 23 | 0 | return em.createQuery("from InstructionEntity a where a.process.id=:processId and a.check.id=:checkId").setParameter("processId", processId).setParameter("checkId", checkId).getResultList(); |
| 24 | |
} |
| 25 | |
} |