Package it.eng.spagobi.kpi.model.bo

Examples of it.eng.spagobi.kpi.model.bo.Resource


      logger.debug("Kpi Instance ID: "
          + (kpiInstanceId != null ? kpiInstanceId.toString()
              : "Kpi Instance ID null"));
      SbiKpiInstance sbiKpiInstance = (SbiKpiInstance) aSession.load(
          SbiKpiInstance.class, kpiInstanceId);
      Resource r = value.getR();
      if (r != null) {
        IResourceDAO resDaoImpl=DAOFactory.getResourceDAO();
        SbiResources sbiResources = resDaoImpl.toSbiResource(r);
        logger.debug("Resource: "
            + (r.getName() != null ? r.getName()
                : "Resource name null"));
        hibKpiValue.setSbiResources(sbiResources);
      }
      OrganizationalUnitGrantNode grantNode = value.getGrantNodeOU();
      if (grantNode != null) {
View Full Code Here


    Double target = null;
    String scaleCode = null;
    String scaleName = null;

    SbiResources res = value.getSbiResources();
    Resource r = null;
    IResourceDAO resDao=DAOFactory.getResourceDAO();
    if (res != null) {
      r = resDao.toResource(res);
      logger.debug("SbiKpiValue resource: "
          + (r.getColumn_name() != null ? r.getColumn_name()
              : "resource name null"));
    }

    kpiInstanceID = value.getSbiKpiInstance().getIdKpiInstance();
    logger.debug("SbiKpiValue kpiInstanceID: "
View Full Code Here

    Double target = null;
    String scaleCode = null;
    String scaleName = null;

    SbiResources res = value.getSbiResources();
    Resource r = null;
    IResourceDAO resDao=DAOFactory.getResourceDAO();
    if (res != null) {
      r = resDao.toResource(res);
      logger.debug("SbiKpiValue resource: "
          + (r.getColumn_name() != null ? r.getColumn_name() : "resource name null"));
    }
    SbiOrgUnit sbiOrgUnit = value.getSbiOrgUnit();
    OrganizationalUnit orgUnit = null;
    if(sbiOrgUnit != null){
      orgUnit = DAOFactory.getOrganizationalUnitDAO().getOrganizationalUnit(sbiOrgUnit.getId())
View Full Code Here

  }
 
  public SourceBean newResource(KpiResourceBlock thisBlock){
    logger.debug("IN");
    SourceBean toReturn = null;
    Resource res=thisBlock.getR();
     
      try{
        SourceBean bandRes=new SourceBean(resourceBlockS);
        KpiLine lineRoot=thisBlock.getRoot();
        SourceBean modelNodeLine = newLine(lineRoot);
       
        if(res!=null){         
          bandRes.setAttribute("name",res.getName()!=null?res.getName():"");
          bandRes.setAttribute(modelNodeLine);
          toReturn = bandRes;
        }else{
          toReturn = modelNodeLine;
        }   
View Full Code Here

          logger.error("Resource type CD does not exist");
          throw new SpagoBIServiceException(SERVICE_NAME,  "Resource Type ID is undefined");
        }

      if (name != null && resourceTypeID != null && code != null) {
        Resource res = new Resource();
        res.setName(name);
        res.setType(resourceTypeCD);
        res.setTypeId(resourceTypeID);
        res.setCode(code);
       
        if(description != null){
          res.setDescr(description);
       
        if(tablename != null){
          res.setTable_name(tablename);
        }
        if(columnname != null){
          res.setColumn_name(columnname);
        }       
       
        try {
          if(id != null && !id.equals("") && !id.equals("0")){             
            res.setId(Integer.valueOf(id));
            resDao.modifyResource(res);
            logger.debug("Resource "+id+" updated");
            JSONObject attributesResponseSuccessJSON = new JSONObject();
            attributesResponseSuccessJSON.put("success", true);
            attributesResponseSuccessJSON.put("responseText", "Operation succeded");
View Full Code Here

    if( !(o instanceof Resource) ) {
      throw new SerializationException("ResourceJSONSerializer is unable to serialize object of type: " + o.getClass().getName());
    }
   
    try {
      Resource res = (Resource)o;
      result = new JSONObject();
     
      result.put(RESOURCE_ID, res.getId() );
      result.put(RESOURCE_NAME, res.getName() );
      result.put(RESOURCE_DESCRIPTION, res.getDescr() );
      result.put(RESOURCE_CODE, res.getCode() );
      result.put(RESOURCE_COL_NAME, res.getColumn_name() );
      result.put(RESOURCE_TAB_NAME, res.getTable_name() );
      result.put(RESOURCE_TYPE_ID, res.getTypeId() );
      result.put(RESOURCE_TYPE_CD, res.getType());     
     
    } catch (Throwable t) {
      throw new SerializationException("An error occurred while serializing object: " + o, t);
    } finally {
     
View Full Code Here

    return idToReturn;
  }

  public Resource loadResourceById(Integer id) throws EMFUserError {
    logger.debug("IN");
    Resource toReturn = null;
    Session aSession = null;
    Transaction tx = null;

    try {
      aSession = getSession();
View Full Code Here

  }

  public Resource toResource(SbiResources r) {

    logger.debug("IN");
    Resource toReturn = new Resource();

    String coumn_name = r.getColumnName();
    String name = r.getResourceName();
    String table_name = r.getTableName();
    String descr = r.getResourceDescr();
    String code = r.getResourceCode();
    SbiDomains d = r.getType();
    String type = d.getValueCd();
    Integer resourceId = r.getResourceId();
    Integer typeId = d.getValueId();

    toReturn.setColumn_name(coumn_name);
    logger.debug("Resource columnName setted:" + coumn_name);
    toReturn.setName(name);
    logger.debug("Resource name setted:" + name);
    toReturn.setDescr(descr);
    logger.debug("Resource description setted:" + descr);
    toReturn.setCode(code);
    logger.debug("Resource code setted:" + code);
    toReturn.setTable_name(table_name);
    logger.debug("Resource table_name setted:" + table_name);
    toReturn.setType(type);
    logger.debug("Resource type setted:" + type);
    toReturn.setTypeId(typeId);
    logger.debug("Resource typeID setted");
    toReturn.setId(resourceId);
    logger.debug("Resource ID setted");

    logger.debug("OUT");
    return toReturn;
  }
View Full Code Here

  }

  public Resource toResource(SbiKpiModelResources re) {

    logger.debug("IN");
    Resource toReturn = new Resource();

    SbiResources r = re.getSbiResources();
    toReturn = toResource(r);
    logger.debug("OUT");
    return toReturn;
View Full Code Here

      }

      if(toTransform != null){
        for (Iterator iterator = toTransform.iterator(); iterator.hasNext();) {
          SbiResources hibResource = (SbiResources) iterator.next();
          Resource resource = toResource(hibResource);
          toReturn.add(resource);
        }
      }

    } catch (HibernateException he) {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.kpi.model.bo.Resource

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.