Package org.openmeetings.app.persistence.beans.basic

Examples of org.openmeetings.app.persistence.beans.basic.Sessiondata


      TypedQuery<Sessiondata> query = em.createQuery(hql, Sessiondata.class);
      query.setParameter("session_id", SID);

      List<Sessiondata> sessions = query.getResultList();

      Sessiondata sessiondata = null;
      if (sessions != null && sessions.size() > 0) {
        sessiondata = sessions.get(0);
      }

      if (sessiondata == null) {
        log.error("Could not find session to Update");
        return false;
      }
      log.debug("Found session to update: " + sessiondata.getSession_id()
          + " userId: " + USER_ID);

      sessiondata.setRefresh_time(new Date());
      // session.refresh(sd);
      sessiondata.setUser_id(USER_ID);
      if (sessiondata.getId() == null) {
        em.persist(sessiondata);
      } else {
        if (!em.contains(sessiondata)) {
          em.merge(sessiondata);
        }
View Full Code Here


        log.error("Could not find session to update: " + SID);
        return false;
      } else {
        // log.error("Found session to update: "+SID);
      }
      Sessiondata sd = fullList.get(0);
      // log.debug("Found session to update: "+sd.getSession_id()+
      // " userId: "+USER_ID);

      sd.setRefresh_time(new Date());
      sd.setSessionXml(sessionXml);

      if (sd.getId() == null) {
        em.persist(sd);
      } else {
        if (!em.contains(sd)) {
          em.merge(sd);
        }
View Full Code Here

      if (fullList.size() == 0) {
        log.error("Found NO session to updateSession: ");

      } else {
        // log.debug("Found session to updateSession: ");
        Sessiondata sd = fullList.iterator().next();
        // log.debug("Found session to updateSession sd "+sd.getUser_id()+" "+sd.getSession_id());
        sd.setRefresh_time(new Date());

        if (sd.getId() == null) {
          em.persist(sd);
        } else {
          if (!em.contains(sd)) {
            em.merge(sd);
          }
View Full Code Here

      Calendar rightNow = Calendar.getInstance();
      rightNow.setTimeInMillis(rightNow.getTimeInMillis() - 1800000);
      List<Sessiondata> l = this.getSessionToDelete(rightNow.getTime());
      log.debug("clearSessionTable: " + l.size());
      for (Iterator<Sessiondata> it = l.iterator(); it.hasNext();) {
        Sessiondata sData = it.next();
        sData = em.find(Sessiondata.class, sData.getId());
        em.remove(sData);
      }
    } catch (Exception err) {
      log.error("clearSessionTable", err);
    }
View Full Code Here

        int end_pos = init_pos + 32;
        if (end_pos > aux.length())
          end_pos = aux.length();
        String SID = aux.substring(init_pos, end_pos);

        Sessiondata sData = this.getSessionByHash(SID);

        sData = em.find(Sessiondata.class, sData.getId());
        em.remove(sData);
      }

    } catch (Exception err) {
      log.error("clearSessionByRoomId", err);
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.basic.Sessiondata

Copyright © 2018 www.massapicom. 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.