Package javax.persistence

Examples of javax.persistence.EntityTransaction.commit()


          } else {
            if (!session.contains(userContacts)) {
              session.merge(userContacts);
          }
      }
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
     
    } catch (Exception e) {
      log.error("[updateContact]",e);
    }
View Full Code Here


      tx.begin();
     
      ac = session.merge(ac);
      Long category_id = ac.getTypId();

      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
     
      return category_id;
    } catch (Exception ex2) {
      log.error("[addAppointmentReminderTyps]: ",ex2);
View Full Code Here

      Query q = session.createQuery(hql);
     
      q.setParameter("organisation_id", organisation_id);
      q.setParameter("deleted", "true");
      List<Rooms_Organisation> ll = q.getResultList();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);

      return ll.size();     
    } catch (Exception ex2) {
      log.error("[selectMaxFromRooms] ", ex2);
View Full Code Here

            if (!session.contains(ac)) {
              session.merge(ac);
          }
      }
           
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      return typId;
    } catch (Exception ex2) {
      log.error("[deleteAppointmentReminderTyp]: " + ex2);
    }
View Full Code Here

      q.setParameter("deleted", "true");
      q.setFirstResult(start);
      q.setMaxResults(max);
      List<Rooms_Organisation> ll = q.getResultList();
     
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
     
      return ll;
    } catch (Exception ex2) {
      log.error("[getRoomsByOrganisation] ", ex2);
View Full Code Here

      Query query = session.createQuery(hql);
      query.setParameter("deleted", "true");
     
       
      List<AppointmentReminderTyps> listAppointmentReminderTyp = query.getResultList();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
     
      return listAppointmentReminderTyp;
    } catch (Exception ex2) {
      log.error("[getAppointmentReminderTypList]: " + ex2);
View Full Code Here

      q.setParameter("rooms_id", rooms_id);
      q.setParameter("organisation_id", organisation_id);
      q.setParameter("deleted", "true");
      List<Rooms_Organisation> ll = q.getResultList();
     
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      if (ll.size()>0){
        return (Rooms_Organisation)ll.get(0);
      }
    } catch (Exception ex2) {
View Full Code Here

      Query q = session.createQuery(hql);
     
      q.setParameter("rooms_id", rooms_id);
      q.setParameter("deleted", "true");
      List<Rooms_Organisation> ll = q.getResultList();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      return ll;
    } catch (Exception ex2) {
      log.error("[getRoomsByOrganisation] ", ex2);
    }
View Full Code Here

      CriteriaBuilder cb = session.getCriteriaBuilder();
      CriteriaQuery<Rooms_Organisation> cq = cb.createQuery(Rooms_Organisation.class);
      Root<Rooms_Organisation> c = cq.from(Rooms_Organisation.class);
      TypedQuery<Rooms_Organisation> q = session.createQuery(cq);
      List<Rooms_Organisation> ll = q.getResultList();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      return ll;
    } catch (Exception ex2) {
      log.error("[getRoomsByOrganisation] ", ex2);
    }
View Full Code Here

              } else {
                if (!session.contains(r)) {
                  session.merge(r);
              }
          }
          tx.commit();
          PersistenceSessionUtil.closeSession(idf);
        }
      }
    } catch (Exception ex2) {
      log.error("[updateRoom] ", ex2);
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.