Examples of SbiResources


Examples of it.eng.spagobi.kpi.model.metadata.SbiResources

      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);
      }
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiResources

    Double weight = null;
    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: "
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiResources

    Double weight = null;
    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: "
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiResources

   *
   * @throws EMFUserError
   */
  private void importResources(boolean overwrite) throws EMFUserError {
    logger.debug("IN");
    SbiResources exportedResource = null;
    try {
      List exportedResources = importer.getAllExportedSbiObjects(sessionExpDB, "SbiResources", null);
      Iterator iterSbiResource = exportedResources.iterator();
      while (iterSbiResource.hasNext()) {
        exportedResource = (SbiResources) iterSbiResource.next();
        Integer oldId = exportedResource.getResourceId();
        Integer existingResourceId = null;
        Map resourcesIdAss = metaAss.getResourcesIDAssociation();
        Set resourcesIdAssSet = resourcesIdAss.keySet();
        if (resourcesIdAssSet.contains(oldId) && !overwrite) {
          metaLog.log("Exported resources" + exportedResource.getResourceName() + " not inserted"
              + " because it has the same name of an existing resource");
          continue;
        } else {
          existingResourceId = (Integer) resourcesIdAss.get(oldId);
        }
        if (existingResourceId != null) {
          logger.info("The resource with id:[" + exportedResource.getResourceId() + "] is just present. It will be updated.");
          metaLog.log("The resource with name = [" + exportedResource.getResourceName() + "] will be updated.");
          SbiResources existingResources = ImportUtilities.modifyExistingSbiResources(exportedResource, sessionCurrDB, existingResourceId, metaAss,importer);
          sessionCurrDB.update(existingResources);
        } else {
          SbiResources newResource = ImportUtilities.makeNewSbiResources(exportedResource, sessionCurrDB, metaAss, importer);
          sessionCurrDB.save(newResource);
          metaLog.log("Inserted new resource " + newResource.getResourceName());
          Integer newId = newResource.getResourceId();
          metaAss.insertCoupleResources(oldId, newId);
        }
      }
    } catch (Exception e) {
      if (exportedResource != null) {
View Full Code Here

Examples of it.eng.spagobi.kpi.model.metadata.SbiResources

      String resourceDescription = resource.getDescr();
      String resourceCode = resource.getCode();

      SbiDomains sbiDomain = (SbiDomains) aSession.load(SbiDomains.class,
          resource.getTypeId());
      SbiResources sbiResource = (SbiResources) aSession.load(
          SbiResources.class, resource.getId());

      sbiResource.setTableName(tableName);
      sbiResource.setColumnName(columnName);
      sbiResource.setResourceName(resourceName);
      sbiResource.setResourceDescr(resourceDescription);
      sbiResource.setResourceCode(resourceCode);
      sbiResource.setType(sbiDomain);
      updateSbiCommonInfo4Update(sbiResource);
      aSession.update(sbiResource);
      tx.commit();

    } catch (ConstraintViolationException cve) {
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.