1 | |
package org.kuali.student.r2.core.class1.state.dao; |
2 | |
|
3 | |
import java.util.List; |
4 | |
|
5 | |
import org.kuali.student.enrollment.dao.GenericEntityDao; |
6 | |
import org.kuali.student.r2.core.class1.state.model.StateEntity; |
7 | |
|
8 | 0 | public class StateDao extends GenericEntityDao<StateEntity>{ |
9 | |
public StateEntity getState(String stateKey){ |
10 | 0 | return (StateEntity)em.createQuery("from StateEntity se where se.id=:stateKey") |
11 | |
.setParameter("stateKey", stateKey) |
12 | |
.getSingleResult(); |
13 | |
} |
14 | |
|
15 | |
@SuppressWarnings("unchecked") |
16 | |
public List<StateEntity> getStatesByLifecycle(String processKey){ |
17 | 0 | return (List<StateEntity>)em.createQuery("from StateEntity se where se.lifecycleKey=:lifecycleKey") |
18 | |
.setParameter("lifecycleKey", processKey) |
19 | |
.getResultList(); |
20 | |
} |
21 | |
} |