Package org.hibernate

Examples of org.hibernate.Query.executeUpdate()


                Query query1 = arg0.createQuery(hql1);
                query1.setInteger("state", ITaskInstance.CANCELED);
                query1.setDate("endTime", now);
                query1.setBoolean("canBewithdrawn", Boolean.FALSE);
                query1.setString("processInstanceId", processInstance.getId());
                query1.executeUpdate();
//更新所有工作项的状态为canceled

                String hql2 = "Update org.fireflow.engine.impl.WorkItem as m set m.state=:state,m.endTime=:endTime Where m.taskInstance in (From org.fireflow.engine.impl.TaskInstance n  Where n.processInstanceId=:processInstanceId)   And (m.state=0 Or m.state=1)";
                Query query2 = arg0.createQuery(hql2);
                query2.setInteger("state", IWorkItem.CANCELED);
View Full Code Here


                String hql2 = "Update org.fireflow.engine.impl.WorkItem as m set m.state=:state,m.endTime=:endTime Where m.taskInstance in (From org.fireflow.engine.impl.TaskInstance n  Where n.processInstanceId=:processInstanceId)   And (m.state=0 Or m.state=1)";
                Query query2 = arg0.createQuery(hql2);
                query2.setInteger("state", IWorkItem.CANCELED);
                query2.setDate("endTime", now);
                query2.setString("processInstanceId", processInstance.getId());
                query2.executeUpdate();
//删除所有的token
                String hql3 = "Delete org.fireflow.kernel.impl.Token where processInstanceId=:processInstanceId";
                Query query3 = arg0.createQuery(hql3);
                query3.setString("processInstanceId", processInstance.getId());
                query3.executeUpdate();
View Full Code Here

                query2.executeUpdate();
//删除所有的token
                String hql3 = "Delete org.fireflow.kernel.impl.Token where processInstanceId=:processInstanceId";
                Query query3 = arg0.createQuery(hql3);
                query3.setString("processInstanceId", processInstance.getId());
                query3.executeUpdate();

                return null;
            }
        });
    }
View Full Code Here

            public Object doInHibernate(Session arg0) throws HibernateException, SQLException {
                String hql = "delete from org.fireflow.kernel.impl.Token  where processInstanceId=:processInstanceId and nodeId in (:nodeId)";
                Query query = arg0.createQuery(hql);
                query.setString("processInstanceId", processInstanceId);
                query.setParameterList("nodeId", nodeIdsList);
                return query.executeUpdate();
            }
        });
    }

    /* (non-Javadoc)
 
View Full Code Here

            public Object doInHibernate(Session arg0) throws HibernateException, SQLException {
                String hql = "delete from org.fireflow.kernel.impl.Token  where processInstanceId=:processInstanceId and nodeId=:nodeId";
                Query query = arg0.createQuery(hql);
                query.setString("processInstanceId", processInstanceId);
                query.setString("nodeId", nodeId);
                return query.executeUpdate();
            }
        });
    }

    /* (non-Javadoc)
 
View Full Code Here

                Query query = arg0.createQuery(hql);
                query.setInteger("state", IWorkItem.CANCELED);
                query.setDate("endTime", now);
                query.setString("taskInstanceId", taskInstance.getId());

                query.executeUpdate();

                return null;
            }
        });
    }
View Full Code Here

                }
//                Query query4ProcessInstance = arg0.createQuery(deleteHql4ProcessInstance);
//                query4ProcessInstance.executeUpdate();

               Query query4WorkItem = arg0.createQuery(deleteHql4WorkItem);
                query4WorkItem.executeUpdate();

                Query query4TaskInstance = arg0.createQuery(deleteHql4TaskInstance);
                query4TaskInstance.executeUpdate();
View Full Code Here

               Query query4WorkItem = arg0.createQuery(deleteHql4WorkItem);
                query4WorkItem.executeUpdate();

                Query query4TaskInstance = arg0.createQuery(deleteHql4TaskInstance);
                query4TaskInstance.executeUpdate();

                Query query4Token = arg0.createQuery(deleteHql4Token);
                query4Token.executeUpdate();
View Full Code Here

                Query query4TaskInstance = arg0.createQuery(deleteHql4TaskInstance);
                query4TaskInstance.executeUpdate();

                Query query4Token = arg0.createQuery(deleteHql4Token);
                query4Token.executeUpdate();

                return null;
            }

        });
View Full Code Here

                +"where website=:site";
            Query update = session.createQuery(updateString);
            update.setParameter("allowed", website.getDefaultAllowComments());
            update.setParameter("days", new Integer(website.getDefaultCommentDays()));
            update.setParameter("site", website);
            update.executeUpdate();           
        } catch (Exception e) {
            log.error("EXCEPTION applying comment defaults",e);
        }
    }    
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.