Package org.hibernate

Examples of org.hibernate.Session.update()


        DiaryReplyBean prb = (DiaryReplyBean)rpls.get(i);
        if(prb.getUser()!=null)
          prb.getUser().getCount().incArticleReply(1);
      }     
     
      ssn.update(log);
      commit();     
    }catch(HibernateException e){
      rollback();
      throw e;
    }
View Full Code Here


    Session ssn = getSession();
    try{
      beginTransaction();
      ssn.save(site);
      site.getOwner().setOwnSiteId(site.getId());
      ssn.update(site.getOwner());
      commit();     
    }catch(HibernateException e){
      rollback();
      throw e;
    }
View Full Code Here

        "from ProcessInstanceLog as log where log.processInstanceId = ? and log.end is null")
            .setLong(0, processInstanceId).list();
        if (result != null && result.size() != 0) {
          ProcessInstanceLog log = result.get(result.size() - 1);
          log.setEnd(new Date());
          session.update(log);
        }
        session.getTransaction().commit();
    }
   
    private void addNodeEnterLog(long processInstanceId, String processId, String nodeInstanceId, String nodeId, String nodeName) {
View Full Code Here

    if (parameters.length == 0)
      return null;
    Session session = getContext().getSession();
    if (parameters[0].getClass().isArray()) {
      for (Object entity : (Object[]) parameters[0]) {
        session.update(entity);
      }
    } else {
      session.update(parameters[0]);
    }
    return null;
View Full Code Here

    if (parameters[0].getClass().isArray()) {
      for (Object entity : (Object[]) parameters[0]) {
        session.update(entity);
      }
    } else {
      session.update(parameters[0]);
    }
    return null;
  }

  @Override
View Full Code Here

    return object;
  }

  public void update(Object feature) throws LayerException {
    Session session = getSessionFactory().getCurrentSession();
    session.update(feature);
  }

  public Envelope getBounds() throws LayerException {
    return getBounds(filterService.createTrueFilter());
  }
View Full Code Here

        synchronized (getGUI().getSynchro()) {
          synchronized (getGUI().sync_tree) {
            final Session session = getGUI().getSynchro().getSessionFactory().getCurrentSession();
            session.beginTransaction();
            try {
              session.update(this); // pour le setDescription() => � enlever qd la description ne sera plus persistente
              if (match.find()) {
                final int value = new Integer(match.group(1)).intValue();
                getTarget().addEvent(new EventGenericProcess(true, value));
                getGUI().setStatus(getGUI().getConfig().getPattern("process_returned", GenericTools.formatNumericString(getGUI().getConfig(), new Integer(value).toString())));
                setDescription("" + GenericTools.formatNumericString(getGUI().getConfig(), new Integer(value).toString()) + " " + querier.getUnit());
View Full Code Here

      synchronized (getGUI().getSynchro()) {
        synchronized (getGUI().sync_tree) {
          final Session session = getGUI().getSynchro().getSessionFactory().getCurrentSession();
          session.beginTransaction();
          try {
            session.update(this); // pour le setDescription() => � enlever qd la description ne sera plus persistente

            getTarget().addEvent(new EventGenericProcess(false));
            // mettre un setstatus comme pour IPv4
//            setDescription(getGUI().getConfig().getString("unreachable"));
View Full Code Here

          synchronized (getGUI().getSynchro()) {
            synchronized (getGUI().sync_tree) {
              final Session session = getGUI().getSynchro().getSessionFactory().getCurrentSession();
              session.beginTransaction();
              try {
                session.update(this);

                getTarget().addEvent(new EventFlood(new Double(((double) 8 * 1000 * bytes_sent) / (System.currentTimeMillis() - last_time)).intValue()));

                setDescription(GenericTools.formatNumericString(getGUI().getConfig(), "" + new Double(((double) 8 * 1000 * bytes_sent) / (System.currentTimeMillis() - last_time)).intValue()) + " bit/s");

View Full Code Here

            if (event != null && event.getResponse() != null && event.getResponse().size() > 0 &&
                event.getResponse().get(0) != null && event.getResponse().get(0).getVariable() != null) {
              final Session session = getGUI().getSynchro().getSessionFactory().getCurrentSession();
              session.beginTransaction();
              try {
              session.update(_this);
              setType(event.getResponse().get(0).getVariable().toString());
              session.getTransaction().commit();
              } catch (final Exception ex) {
                log.error("Exception", ex);
                session.getTransaction().rollback();
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.