Package net.sf.hibernate

Examples of net.sf.hibernate.Query.iterate()


        if (!enabled) return;

        try {
            if (pmgr != null) {
                Query query = pmgr.createQuery("select from YLogIdentifier where case_id=" + caseid);
                for (Iterator it = query.iterate(); it.hasNext();) {
                    YLogIdentifier logid = (YLogIdentifier) it.next();
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here


            //restore users
            logger.info("Restoring Users");
            Query query = pmgr.createQuery("from au.edu.qut.yawl.admintool.model.Resource" +
                    " where IsOfResourceType = 'Human'");

            for (Iterator it = query.iterate(); it.hasNext();) {
                HumanResource user = (HumanResource) it.next();
                logger.debug("Restoring user '" + user.getRsrcID() + "'");
                UserList.getInstance().addUser(
                        user.getRsrcID(),
                        user.getPassword(),
View Full Code Here

            //Lachlan: later we delete these loaded services and reload them anew
            //this seems kind of redundant, don't you think?
            logger.info("Restoring Services");
            query = pmgr.createQuery("from au.edu.qut.yawl.elements.YAWLServiceReference");

            for (Iterator it = query.iterate(); it.hasNext();) {
                YAWLServiceReference service = (YAWLServiceReference) it.next();
                addYawlService(service);
            }

            logger.info("Restoring Specifications - Starts");
View Full Code Here

            }

            logger.info("Restoring Specifications - Starts");
            query = pmgr.createQuery("from au.edu.qut.yawl.engine.YSpecFile");

            for (Iterator it = query.iterate(); it.hasNext();) {
                YSpecFile spec = (YSpecFile) it.next();
                String xml = spec.getXML();

                {
                    logger.debug("Restoring specification " + spec.getId());
View Full Code Here

            }
            logger.info("Restoring Specifications - Ends");

            logger.info("Restoring process instances - Starts");
            query = pmgr.createQuery("from au.edu.qut.yawl.engine.YNetRunner order by case_id");
            for (Iterator it = query.iterate(); it.hasNext();) {
                YNetRunner runner = (YNetRunner) it.next();
                runners.add(runner);
            }

            HashMap map = new HashMap();
View Full Code Here

            HashMap map = new HashMap();
            for (int i = 0; i < runners.size(); i++) {
                YNetRunner runner = (YNetRunner) runners.get(i);
                String id = runner.get_caseID();
                query = pmgr.createQuery("select from au.edu.qut.yawl.engine.YLogIdentifier where case_id = '" + id + "'");
                for (Iterator it = query.iterate(); it.hasNext();) {
                    YLogIdentifier ylogid = (YLogIdentifier) it.next();
                    map.put(ylogid.getIdentifier(), ylogid);
                }
            }
            YawlLogServletInterface.getInstance().setListofcases(map);
View Full Code Here

            logger.info("Restoring process instances - Ends");

            logger.info("Restoring work items - Starts");
            query = pmgr.createQuery("from au.edu.qut.yawl.engine.YWorkItem");
            for (Iterator it = query.iterate(); it.hasNext();) {
                YWorkItem witem = (YWorkItem) it.next();

                if (witem.getStatus().equals(YWorkItem.statusEnabled)) {
                    witem.setStatus(YWorkItem.statusEnabled);
                }
View Full Code Here

                // if its a runner, remove it
                Query query = pmgr.getSession().createQuery(
                               "from au.edu.qut.yawl.engine.YNetRunner where case_id = '"
                               + id.toString() + "'");
                for (Iterator it = query.iterate(); it.hasNext();) {
                    pmgr.deleteObject(it.next());
                    runnerfound = true;
                }

                // it's not a runner, so remove the P_YIdentifier only
View Full Code Here

                // it's not a runner, so remove the P_YIdentifier only
                if (!runnerfound) {
                    Query quer = pmgr.getSession().createQuery(
                                 "from au.edu.qut.yawl.engine.P_YIdentifier where id = '"
                                 + id.toString() + "'");
                    Iterator itx = quer.iterate();

                    // check the p_yid hasn't already been removed (can be one at most)
                    if (itx.hasNext())  {
                        pmgr.deleteObject(itx.next());
                    }
View Full Code Here

            else {
              queryObject.setParameter(i, values[i]);
            }
          }
        }
        return queryObject.iterate();
      }
    }, true);
  }

  public void closeIterator(Iterator it) throws DataAccessException {
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.