Package it.eng.spagobi.commons.metadata

Examples of it.eng.spagobi.commons.metadata.SbiEventRole


        continue;
      }
      SbiEventRoleId eventRoleId = new SbiEventRoleId();
      eventRoleId.setEvent(hibEventLog);
      eventRoleId.setRole(aHibRole);
      SbiEventRole aSbiEventRole = new SbiEventRole(eventRoleId);
      session.save(aSbiEventRole);
      hibEventRoles.add(aSbiEventRole);
    }
    hibEventLog.setRoles(hibEventRoles);
    tx.commit();
View Full Code Here


      tx = aSession.beginTransaction();     
      SbiEventsLog hibEventLog = (SbiEventsLog) aSession.load(SbiEventsLog.class, eventLog.getId());
      Set roles = hibEventLog.getRoles();
      Iterator rolesIt = roles.iterator();
      while (rolesIt.hasNext()) {
        SbiEventRole aSbiEventRole = (SbiEventRole) rolesIt.next();
        aSession.delete(aSbiEventRole);
      }
      aSession.delete(hibEventLog);
      tx.commit();
    } catch (HibernateException he) {
View Full Code Here

      while (it.hasNext()) {
        SbiEventsLog aSbiEventsLog = (SbiEventsLog) it.next();
        Set roles = aSbiEventsLog.getRoles();
        Iterator rolesIt = roles.iterator();
        while (rolesIt.hasNext()) {
          SbiEventRole aSbiEventRole = (SbiEventRole) rolesIt.next();
          aSession.delete(aSbiEventRole);
        }
        aSession.delete((SbiEventsLog) it.next());
      }     
      tx.commit();
View Full Code Here

    eventLog.setHandler(hibEventLog.getHandlerClass());
    List roles = new ArrayList();
    Set rolesSet = hibEventLog.getRoles();
    Iterator rolesIt = rolesSet.iterator();
    while (rolesIt.hasNext()) {
      SbiEventRole hibEventRole = (SbiEventRole) rolesIt.next();
      SbiExtRoles hibRole = hibEventRole.getId().getRole();
      roles.add(hibRole.getName());
    }
    eventLog.setRoles(roles);
    logger.debug("OUT");
    return eventLog;
View Full Code Here

      Query hibQuery = aSession.createQuery(" from SbiEventRole ser where ser.id.role.extRoleId = ?" );
      hibQuery.setInteger(0, hibRole.getExtRoleId().intValue());
      List eventsRole = hibQuery.list();
      Iterator it = eventsRole.iterator();
      while (it.hasNext()) {
        SbiEventRole eventRole = (SbiEventRole) it.next();
        SbiEventsLog event = eventRole.getId().getEvent();
        aSession.delete(eventRole);
        aSession.flush();
        aSession.refresh(event);
        Set roles = event.getRoles();
        if (roles.isEmpty()) {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.commons.metadata.SbiEventRole

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.