Examples of SessionData


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

  }
 
  public void testdeleteUsers(){
   
    MainService mService = new MainService();
    Sessiondata sessionData = mService.getsessiondata();
   
    Users us = (Users) mService.loginUser(sessionData.getSession_id(), "swagner6", "678101",false,null,-1L);
   
    System.out.println("us: "+us.getFirstname());
   
    Long delete = mService.deleteUserIDSelf(sessionData.getSession_id());
   
    System.out.println("deleteSelf "+delete);
  }
View Full Code Here

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

      List<Sessiondata> sessions = query.getResultList();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);

      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);

      idf = PersistenceSessionUtil.createSession();
      session = PersistenceSessionUtil.getSession();
      tx = session.getTransaction();
      tx.begin();
      sessiondata.setRefresh_time(new Date());
      // session.refresh(sd);
      sessiondata.setUser_id(USER_ID);
      if (storePermanent) {
        sessiondata.setStorePermanent(storePermanent);
      }
      sessiondata.setLanguage_id(language_id);
      if (sessiondata.getId() == null) {
        session.persist(sessiondata);
      } else {
        if (!session.contains(sessiondata)) {
          session.merge(sessiondata);
        }
View Full Code Here

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

      List<Sessiondata> sessions = query.getResultList();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);

      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()
          + " organisation_id: " + organization_id);

      idf = PersistenceSessionUtil.createSession();
      session = PersistenceSessionUtil.getSession();
      tx = session.getTransaction();
      tx.begin();
      sessiondata.setRefresh_time(new Date());
      // session.refresh(sd);
      sessiondata.setOrganization_id(organization_id);
      if (sessiondata.getId() == null) {
        session.persist(sessiondata);
      } else {
        if (!session.contains(sessiondata)) {
          session.merge(sessiondata);
        }
View Full Code Here

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

      List<Sessiondata> sessions = query.getResultList();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);

      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);

      idf = PersistenceSessionUtil.createSession();
      session = PersistenceSessionUtil.getSession();
      tx = session.getTransaction();
      tx.begin();
      sessiondata.setRefresh_time(new Date());
      // session.refresh(sd);
      sessiondata.setUser_id(USER_ID);
      if (sessiondata.getId() == null) {
        session.persist(sessiondata);
      } else {
        if (!session.contains(sessiondata)) {
          session.merge(sessiondata);
        }
View Full Code Here

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

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

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

      idf = PersistenceSessionUtil.createSession();
      session = PersistenceSessionUtil.getSession();
      tx = session.getTransaction();
      tx.begin();

      // session.refresh(sd);

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

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

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

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

        Object idf2 = PersistenceSessionUtil.createSession();
        EntityManager session2 = PersistenceSessionUtil.getSession();
        EntityTransaction tx2 = session2.getTransaction();
        tx2.begin();
        if (sd.getId() == null) {
          session2.persist(sd);
        } else {
          if (!session2.contains(sd)) {
            session2.merge(sd);
          }
View Full Code Here

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

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      for (Iterator it = l.iterator(); it.hasNext();) {
        Sessiondata sData = (Sessiondata) it.next();
        sData = session.find(Sessiondata.class, sData.getId());
        session.remove(sData);
      }
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
View Full Code Here

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

        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);

        Object idf = PersistenceSessionUtil.createSession();
        EntityManager session = PersistenceSessionUtil.getSession();
        EntityTransaction tx = session.getTransaction();
        tx.begin();
        sData = session.find(Sessiondata.class, sData.getId());
        session.remove(sData);
        PersistenceSessionUtil.closeSession(idf);
      }

    } catch (Exception err) {
View Full Code Here

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

      System.out.println("startsession :: startsession");
      log.debug("startsession :: startsession");

      long thistime = new Date().getTime();
      Sessiondata sessiondata = new Sessiondata();
      sessiondata.setSession_id(ManageCryptStyle.getInstance()
          .getInstanceOfCrypt()
          .createPassPhrase(String.valueOf(thistime).toString()));
      sessiondata.setRefresh_time(new Date());
      sessiondata.setStarttermin_time(new Date());
      sessiondata.setUser_id(null);

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
View Full Code Here

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

        return null;
      } else {
        // log.error("Found session to update: "+SID);
      }

      Sessiondata sd = (Sessiondata) fullList.get(0);

      return sd;
    } catch (Exception ex2) {
      log.error("[updateUser]: ", 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.