Examples of OrganizationalUnitGrant


Examples of it.eng.spagobi.kpi.ou.bo.OrganizationalUnitGrant

   * @param JSONGrant the JSON representation of the OrganizationalUnitGrant object
   * @return the OrganizationalUnitGrant
   * @throws Exception
   */
  private OrganizationalUnitGrant deserializeOrganizationalUnitGrant(JSONObject JSONGrant) throws Exception{
    OrganizationalUnitGrant organizationalUnitGrant = new OrganizationalUnitGrant();
    organizationalUnitGrant.setDescription(JSONGrant.getString("description"));
   
        SingletonConfig config = SingletonConfig.getInstance();
        String format = config.getConfigValue("SPAGOBI.DATE-FORMAT-SERVER.format");
     
    organizationalUnitGrant.setEndDate(toDate(JSONGrant.getString("enddate"), format));
    organizationalUnitGrant.setStartDate(toDate(JSONGrant.getString("startdate"), format));
    organizationalUnitGrant.setLabel(JSONGrant.getString("label"));
    organizationalUnitGrant.setName(JSONGrant.getString("name"));
    try{
      organizationalUnitGrant.setId(JSONGrant.getInt("id"));
    }catch(JSONException e){}
    int hierarchyId = JSONGrant.getInt("hierarchy");
    int modelInstanceId = JSONGrant.getInt("modelinstance");
    ModelInstance modelInstance = DAOFactory.getModelInstanceDAO().loadModelInstanceWithChildrenById(modelInstanceId);
    OrganizationalUnitHierarchy organizationalUnitHierarchy = orUnitDao.getHierarchy(hierarchyId);
    organizationalUnitGrant.setModelInstance(modelInstance);
    organizationalUnitGrant.setHierarchy(organizationalUnitHierarchy);
   
    return organizationalUnitGrant;
  }
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.