📄 hibernatenodertdao.java
字号:
package cn.myapps.core.workflow.storage.runtime.dao;
import java.util.Collection;
import java.util.Iterator;
import cn.myapps.base.dao.HibernateBaseDAO;
import cn.myapps.core.user.action.WebUser;
import cn.myapps.core.workflow.storage.runtime.ejb.ActorRT;
import cn.myapps.core.workflow.storage.runtime.ejb.NodeRT;
public class HibernateNodeRTDAO extends HibernateBaseDAO implements NodeRTDAO {
public HibernateNodeRTDAO(String voClassName) {
super(voClassName);
}
public Collection queryNodeRTByDocidAndFlowid(String docid, String flowid)
throws Exception {
String hql = "FROM " + _voClazzName + " vo WHERE " + "vo.docid='"
+ docid + "' AND vo.flowid='" + flowid + "'";
return this.getDatas(hql, null);
}
public NodeRT findNodeRT(String docid, String flowid, WebUser user)
throws Exception {
Collection nodertList = query(docid, flowid);
for (Iterator iter = nodertList.iterator(); iter.hasNext();) {
NodeRT nodert = (NodeRT) iter.next();
Iterator it = nodert.getActorrts().iterator();
while (it.hasNext()) {
ActorRT actorrt = (ActorRT) it.next();
if ((actorrt).isEquals(user) && !actorrt.getIsprocessed()) {
return nodert;
}
}
}
return null;
}
public Collection query(String docid, String flowid) throws Exception {
String hql = "FROM " + _voClazzName + " vo WHERE " + "vo.docid='"
+ docid + "' AND vo.flowid='" + flowid + "'";
return this.getDatas(hql, null);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -