| 1 | |
package org.kuali.student.enrollment.class1.hold.dao; |
| 2 | |
|
| 3 | |
import java.util.List; |
| 4 | |
|
| 5 | |
import org.kuali.student.enrollment.class1.hold.model.RestrictionEntity; |
| 6 | |
import org.kuali.student.enrollment.dao.GenericEntityDao; |
| 7 | |
|
| 8 | 0 | public class RestrictionDao extends GenericEntityDao<RestrictionEntity>{ |
| 9 | |
|
| 10 | |
@SuppressWarnings("unchecked") |
| 11 | |
public List<RestrictionEntity> getByRestrictionTypeId(String restrictionTypeKey) { |
| 12 | 0 | return em.createQuery("from RestrictionEntity r where r.restrictionType.id=:restrictionTypeId").setParameter("restrictionTypeId", restrictionTypeKey).getResultList(); |
| 13 | |
} |
| 14 | |
|
| 15 | |
@SuppressWarnings("unchecked") |
| 16 | |
public List<RestrictionEntity> getByIssueId(String issueId) { |
| 17 | 0 | return em.createQuery("select rel.restriction from IssueRestrictionRelationEntity rel where rel.issue.id=:issueId").setParameter("issueId", issueId).getResultList(); |
| 18 | |
} |
| 19 | |
|
| 20 | |
} |