Package org.openbravo.model.ad.access

Examples of org.openbravo.model.ad.access.RoleOrganization


        setCurrentOrganization(o);
      } else if (getUser().getDefaultOrganization() != null
          && getUser().getDefaultOrganization().isActive()) {
        setCurrentOrganization(getUser().getDefaultOrganization());
      } else {
        final RoleOrganization roa = getOne(RoleOrganization.class, "select roa from "
            + RoleOrganization.class.getName() + " roa where roa." + RoleOrganization.PROPERTY_ROLE
            + "." + Organization.PROPERTY_ID + "='" + getRole().getId() + "' and roa."
            + RoleOrganization.PROPERTY_ACTIVE + "='Y' and roa."
            + RoleOrganization.PROPERTY_ORGANIZATION + "." + Organization.PROPERTY_ACTIVE
            + "='Y' order by roa." + RoleOrganization.PROPERTY_ORGANIZATION + "."
            + Organization.PROPERTY_ID + " desc", false);
        Hibernate.initialize(roa.getOrganization());
        setCurrentOrganization(roa.getOrganization());

        // if no client id then use the client of the role
        if (localClientId == null) {
          localClientId = roa.getClient().getId();
        }
      }

      Check.isNotNull(getCurrentOrganization(), "Organization may not be null");
View Full Code Here

TOP

Related Classes of org.openbravo.model.ad.access.RoleOrganization

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.