Package org.apache.openmeetings.persistence.beans.domain

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


  public void delete(Organisation_Users entity, Long userId) {
    if (entity.getOrganisation_users_id() != null) {
      User u = usersDao.get(entity.getUser_id());
      int idx = u.getOrganisation_users().indexOf(entity);
      //entity has been detached need to re-fetch
      Organisation_Users ou = u.getOrganisation_users().remove(idx);
      em.remove(ou);
      usersDao.update(u, userId);
    }
  }
View Full Code Here


    }) {
      private static final long serialVersionUID = 8715559628755439596L;

      @Override
      protected void populateItem(Item<Organisation_Users> item) {
        final Organisation_Users orgUser = item.getModelObject();
        User u = orgUser.getUser();
        if (u != null) {
          item.add(new Label("label", Model.of(getUser(u))));
        } else {
          item.add(new Label("label", Model.of("")));
        }
View Full Code Here

              found = true;
              break;
            }
          }
          if (!found) {
            Organisation_Users orgUser = new Organisation_Users(organisation);
            orgUser.setDeleted(false);
            orgUsers.add(orgUser);
            userDao.update(u, WebSession.getUserId());
          }
        }
        target.appendJavaScript("$('#addUsers').dialog('close');");
View Full Code Here

    List<Organisation> orgList = Application.getBean(
        OrganisationManager.class).getOrganisations(3L);
    List<Organisation_Users> orgUsers = new ArrayList<Organisation_Users>(
        orgList.size());
    for (Organisation org : orgList) {
      orgUsers.add(new Organisation_Users(org));
    }
    ListMultipleChoice<Organisation_Users> orgChoiceList = new ListMultipleChoice<Organisation_Users>(
        "organisation_users", orgUsers,
        new ChoiceRenderer<Organisation_Users>("organisation.name",
            "organisation.organisation_id"));
View Full Code Here

    User u = getValidUser();
    Long orgId = u.getOrganisation_users().get(0).getOrganisation().getOrganisation_id();
    List<User> 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

        } else {

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

          Organisation_Users ou = organisationManager
              .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

      User us = usersDao.get(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<RoomOrganisation> ll = this
            .getRoomsOrganisationByOrganisationId(3,
                organisation_id);
        for (Iterator<RoomOrganisation> it2 = ll.iterator(); it2
View Full Code Here

    return null;
  }
 
  public Organisation_Users getOrgUser(Long organisation_id, Long insertedby) {
   
    Organisation_Users orgUser = new Organisation_Users(
        orgDao.get(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 = organisationManager
              .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

      User us = usersDao.get(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<RoomOrganisation> ll = this
            .getRoomsOrganisationByOrganisationId(3,
                organisation_id);
        for (Iterator<RoomOrganisation> it2 = ll.iterator(); it2
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.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.