Package org.openmeetings.app.persistence.beans.domain

Examples of org.openmeetings.app.persistence.beans.domain.Organisation_Users


      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
      List<Users> userL = new LinkedList<Users>();
      for (Iterator<Organisation_Users> it = userOrg.iterator(); it
          .hasNext();) {
        Organisation_Users us = it.next();
        userL.add(UsersDaoImpl.getInstance().getUser(us.getUser_id()));
      }
      Collections.sort(userL, new UsersLoginComperator());
      return userL;

    } catch (Exception ex2) {
View Full Code Here


   * @throws Exception
   */
  private boolean checkOrgInStoredList(long orgId, List org) throws Exception {
    // log.debug("checkOrgInStoredList "+orgId);
    for (Iterator it = org.iterator(); it.hasNext();) {
      Organisation_Users orgUsers = (Organisation_Users) it.next();
      // log.debug("checkOrgInStoredList 2 "+orgUsers.getOrganisation().getOrganisation_id());
      if (orgUsers.getOrganisation().getOrganisation_id().equals(orgId)) {
        // log.debug("checkOrgInStoredList 3 found");
        return true;
      }
    }
    return false;
View Full Code Here

            orgIdsToAdd.add(orgIdToAdd);
        }

        for (Iterator it = us.getOrganisation_users().iterator(); it
            .hasNext();) {
          Organisation_Users orgUsers = (Organisation_Users) it
              .next();
          Long orgIdStored = orgUsers.getOrganisation()
              .getOrganisation_id();
          // log.error("updateUserOrganisationsByUser check1 : "+orgIdStored);
          boolean shouldBeStored = this.checkOrgInList(orgIdStored,
              organisations);
          if (!shouldBeStored)
View Full Code Here

     
      Users us = UsersDaoImpl.getInstance().getUser(user_id);
      List s = us.getOrganisation_users();
   
      for (Iterator it = s.iterator(); it.hasNext();){
        Organisation_Users orgUsers = (Organisation_Users) it.next();
        long organisation_id = orgUsers.getOrganisation().getOrganisation_id();
        List ll = this.getRoomsOrganisationByOrganisationId(3, organisation_id);
        for (Iterator it2 = ll.iterator(); it2.hasNext(); ){
          Rooms_Organisation roomOrg = (Rooms_Organisation) it2.next();
          if(roomOrg.getRoom().getRooms_id()==rooms_id){
            return true;
View Full Code Here

    Users u = getValidUser();
    Long orgId = u.getOrganisation_users().get(0).getOrganisation().getOrganisation_id();
    List<Users> ul = orgManagement.getUsersByOrganisationId(orgId, 0, 9999, "login", true);
    assertTrue("Default Organisation should contain at least 1 user: " + ul.size(), ul.size() > 0);
   
    Organisation_Users ou = orgManagement.getOrganisation_UserByUserAndOrganisation(u.getUser_id(), orgId);
    assertNotNull("Unable to found [organisation, user] pair - [" + orgId + "," + u.getUser_id() + "]", ou);
  }
View Full Code Here

  }
 
  public Organisation_Users getOrgUser(Long organisation_id,
      Long insertedby) {
   
    Organisation_Users orgUser = new Organisation_Users();
    orgUser.setOrganisation(getOrganisationById(organisation_id));
    orgUser.setDeleted("false");
   
    return orgUser;
  }
View Full Code Here

        } else {

          log.debug("user_id, organisation_id" + user_id + ", "
              + organisation_id);

          Organisation_Users ou = organisationmanagement
              .getOrganisation_UserByUserAndOrganisation(user_id,
                  organisation_id);

          log.debug("ou: " + ou);

          if (ou != null) {
            if (ou.getIsModerator() != null && ou.getIsModerator()) {
              return 2L;
            } else {
              return us.getLevel_id();
            }
          } else {
View Full Code Here

      Users us = usersDao.getUser(user_id);
      List<Organisation_Users> s = us.getOrganisation_users();

      for (Iterator<Organisation_Users> it = s.iterator(); it.hasNext();) {
        Organisation_Users orgUsers = it.next();
        long organisation_id = orgUsers.getOrganisation()
            .getOrganisation_id();
        List<Rooms_Organisation> ll = this
            .getRoomsOrganisationByOrganisationId(3,
                organisation_id);
        for (Iterator<Rooms_Organisation> it2 = ll.iterator(); it2
View Full Code Here

                Boolean isModerator = importBooleanType(unformatString(organisationObject
                    .element("isModerator").getText()));
                String deleted = unformatString(organisationObject
                    .element("deleted").getText());

                Organisation_Users orgUser = new Organisation_Users();
                orgUser.setOrganisation(organisationmanagement
                    .getOrganisationByIdBackup(organisation_id));
                orgUser.setIsModerator(isModerator);
                orgUser.setStarttime(new Date());
                orgUser.setDeleted(deleted);

                orgUsers.add(orgUser);

              }

            }

            log.debug("Import User ID " + userId);
            us.setStarttime(new Date());
            Long actualNewUserId = userManagement.addUserBackup(us);
            usersMap.put(userId, actualNewUserId);

            for (Iterator<Organisation_Users> orgUserIterator = orgUsers
                .iterator(); orgUserIterator.hasNext();) {

              Organisation_Users organisationUsers = orgUserIterator
                  .next();

              organisationmanagement
                  .addOrganisationUserObj(actualNewUserId, organisationUsers);
View Full Code Here

      Element user_organisations = user.addElement("organisations");
      // List<String> organisations = new LinkedList();
      for (Iterator<Organisation_Users> iterObj = u
          .getOrganisation_users().iterator(); iterObj.hasNext();) {
        Organisation_Users orgUsers = iterObj.next();
        user_organisations.addElement("organisation_id").addText(
            orgUsers.getOrganisation().getOrganisation_id()
                .toString());
      }

      // Not need at the moment
      // Element user_groups = user.addElement("groups");
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.domain.Organisation_Users

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.