Package javax.persistence

Examples of javax.persistence.EntityManager.merge()


      tx.begin();
      if (fId.getFlvRecordingId() == 0) {
        session.persist(fId);
          } else {
            if (!session.contains(fId)) {
              session.merge(fId);
          }
      }
      session.flush();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
View Full Code Here


      rtype.setDeleted("false");
      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      rtype = session.merge(rtype);
      session.flush();
      long returnId = rtype.getRoomtypes_id();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      return returnId;
View Full Code Here

      try {
        Object idf = PersistenceSessionUtil.createSession();
        EntityManager session = PersistenceSessionUtil.getSession();
        EntityTransaction tx = session.getTransaction();
        tx.begin();
        configuration = session.merge(configuration);
        session.flush();
        session.refresh(configuration);
        tx.commit();
        PersistenceSessionUtil.closeSession(idf);
        ret = "Erfolgreich";
View Full Code Here

      room.setStarttime(new Date());
      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      room = session.merge(room);
      long returnId = room.getRooms_id();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      return returnId;
    } catch (Exception ex2) {
View Full Code Here

    try {
      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      conf = session.merge(conf);
      Long configuration_id = conf.getConfiguration_id();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      return configuration_id;
    } catch (Exception ex2) {
View Full Code Here

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
     
      ap = session.merge(ap);
      session.flush();
      Long appointment_id = ap.getAppointmentId();

      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
View Full Code Here

      tx.begin();
      if (conf.getConfiguration_id() == null) {
        session.persist(conf);
          } else {
            if (!session.contains(conf)) {
              conf = session.merge(conf);
          }
      }
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      return conf.getConfiguration_id();
View Full Code Here

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
     
      ap = session.merge(ap);
      session.flush();
      Long appointment_id = ap.getAppointmentId();

      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
View Full Code Here

        tx.begin();
        if (appointment.getAppointmentId() == null) {
          session.persist(appointment);
            } else {
              if (!session.contains(appointment)) {
                session.merge(appointment);
            }
        }
        tx.commit();
        PersistenceSessionUtil.closeSession(idf);
        return appointment.getAppointmentId();
View Full Code Here

          ap.setUpdatetime(new Date());
          if (ap.getAppointmentId() == null) {
            session.persist(ap);
              } else {
                if (!session.contains(ap)) {
                  session.merge(ap);
              }
          }
         
        }
       
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.