Package org.hibernate

Examples of org.hibernate.Session.update()


          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
                                      // pour ce update, lors d'un mergeEventsSimple() : Illegal attempt to associate a collection with two open sessions
                if (match.find() == true) {
                  final int delay = new Integer(match.group(2)).intValue();

                  getTarget().addEvent(new EventReachable(true, new Integer(match.group(2)).intValue()));
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 EventReachable(false));
            // mettre un setstatus comme pour IPv4
            setDescription(getGUI().getConfig().getString("unreachable"));
View Full Code Here

        synchronized (synchro) {
          synchronized (sync_tree) {
            final Session session = synchro.getSessionFactory().getCurrentSession();
            session.beginTransaction();
            try  {
              session.update(querier);
              if (dialog.getVersion() != version) querier.setVersion(dialog.getVersion());
              if (dialog.getSec() != sec) querier.setSec(dialog.getSec());
              if (dialog.getRetries() != port_src) querier.setRetries(dialog.getRetries());
              if (dialog.getTimeout() != timeout) querier.setTimeout(dialog.getTimeout());
              if (dialog.getPort() != port) querier.setPort(dialog.getPort());
View Full Code Here

        synchronized (synchro) {
          synchronized (sync_tree) {
            final Session session = synchro.getSessionFactory().getCurrentSession();
            session.beginTransaction();
            try  {
              session.update(querier);
              if (dialog.getTOS() != tos) querier.setTos(dialog.getTOS());
              if (dialog.getPortSrc() != port_src) querier.setPortSrc(dialog.getPortSrc());
              if (dialog.getPortDst() != port_dst) querier.setPortDst(dialog.getPortDst());
              if (dialog.getPDUMaxSize() != pdu_max_size) querier.setPDUMaxSize(dialog.getPDUMaxSize());
              querier.update();
View Full Code Here

        synchronized (synchro) {
          synchronized (sync_tree) {
            final Session session = synchro.getSessionFactory().getCurrentSession();
            session.beginTransaction();
            try  {
              session.update(querier);
              if (dialog.getNParallel() != nparallel) querier.setNParallel(dialog.getNParallel());
              if (dialog.getProxyHost() != proxy_host) querier.setProxyHost(dialog.getProxyHost());
              if (dialog.getProxyPort() != proxy_port) querier.setProxyPort(dialog.getProxyPort());
              if (dialog.getURL() != URL) querier.setURL(dialog.getURL());
//              if (dialog.getReconnect() != reconnect) querier.setReconnect(dialog.getReconnect());
View Full Code Here

          synchronized (sync_tree) {
            final Session session = synchro.getSessionFactory().getCurrentSession();
            session.beginTransaction();

            try {
              session.update(querier);
              if (dialog.getTitle() != title) querier.setTitle(dialog.getTitle());
              if (dialog.getCommandLine() != cmdline) querier.setCommandLine(dialog.getCommandLine());
              if (dialog.getWorkdir() != workdir) querier.setWorkingDirectory(dialog.getWorkdir());
              if (dialog.getFilename() != filename) querier.setFileName(dialog.getFilename());
              if (dialog.getUnit() != unit) querier.setUnit(dialog.getUnit());
View Full Code Here

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

        // get events inside the range
        final EventList el = eventLists.get(clazz.toString());
        java.util.List results =
          session.createQuery("from EventGeneric as ev where ev.eventList = :event_list " +
View Full Code Here

    session.beginTransaction();

    try {
      // get events inside the range
        // j'ai eu �a ici et plus loin : Illegal attempt to associate a collection with two open sessions
      session.update(this);
      final EventList el = eventLists.get(clazz.toString());

      java.util.List results =
        session.createQuery("from EventGeneric as ev where ev.eventList = :event_list " +
        "and ev.date >= :start_date and ev.date <= :stop_date " +
View Full Code Here

    if (found == false) getGUI().informTargetHasNewEventClass(this, event.getClass());

    // save this event into persistent area
    final Session session = getGUI().getSynchro().getSessionFactory().getCurrentSession();
    // j'ai eu �a ici et avant : Illegal attempt to associate a collection with two open sessions
    session.update(this);
    EventList el = eventLists.get(event.getClass().toString());
    if (el == null) eventLists.put(event.getClass().toString(), el = new EventList());
    event.setEventList(el);
    session.save(event);
  }
View Full Code Here

          found = true;
    if (found == false) new GenericSrcView(null, this);

    // save this event into persistent area
    final Session session = synchro.getSessionFactory().getCurrentSession();
    session.update(this);
    EventList el = eventLists.get(event.getClass().toString());
    if (el == null) eventLists.put(event.getClass().toString(), el = new EventList());
    event.setEventList(el);
    session.save(event);
  }
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.