Examples of SbiResources


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

        Integer resId=modRes.getResourceId();
        IResourceDAO resDAO=DAOFactory.getResourceDAO();
        Resource res=resDAO.loadResourceById(resId);

        insertResource(res, session);
        SbiResources sbiRes= (SbiResources) session.load(SbiResources.class, res.getId());
        if(sbiRes!=null){
          hibModRes.setSbiResources(sbiRes);
        }
      }
View Full Code Here

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

      if(!hibList.isEmpty()) {
        return;
      }

      // main attributes     
      SbiResources hibRes = new SbiResources();

      hibRes.setResourceId(res.getId());
      hibRes.setResourceCode(res.getCode());
      hibRes.setResourceName(res.getName());
      hibRes.setResourceDescr(res.getDescr());
      hibRes.setColumnName(res.getColumn_name());
      hibRes.setTableName(res.getTable_name());

      //sbi Domains
      if(res.getType()!=null){
        SbiDomains type=(SbiDomains)session.load(SbiDomains.class, res.getTypeId());     
        hibRes.setType(type);
      }

      Transaction tx = session.beginTransaction();     
      session.save(hibRes);
      tx.commit();
View Full Code Here

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

      return hibDs;
    }   else if (hibObj instanceof SbiResources) {
      String label = (String) unique;
      hql = "from SbiResources ds where ds.resourceCode = '" + label + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiResources hibDs = null;
      try{
        hibDs=(SbiResources) hqlQuery.uniqueResult();
      }
      catch (Exception e) {
        throw new EMFUserError(EMFErrorSeverity.ERROR, "9005", "component_impexp_messages");
View Full Code Here

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

    // get Resource
    Integer idResource=null;
    hql = "from SbiResources where resourceCode = '" + resourceCode + "'";
    hqlQuery = sessionCurrDB.createQuery(hql);
    SbiResources hibRes = (SbiResources) hqlQuery.uniqueResult();
    if(hibRes==null) return null;

    idResource=hibRes.getResourceId();

    // check now if association exists
    hql = "from SbiKpiModelResources where sbiKpiModelInst = '" + idModelInst + "' AND sbiResources ='"+ idResource +"'";
    hqlQuery = sessionCurrDB.createQuery(hql);
    SbiKpiModelResources hibModRes = (SbiKpiModelResources) hqlQuery.uniqueResult();
View Full Code Here

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

   *
   * @return the new hibernate parameter object
   */
  public static SbiResources makeNewSbiResources(SbiResources resource,Session sessionCurrDB, MetadataAssociations metaAss, ImporterMetadata importer){
    logger.debug("IN");
    SbiResources newResource = new SbiResources();
    try{
      newResource.setResourceName(resource.getResourceName());
      newResource.setResourceCode(resource.getResourceCode());
      newResource.setResourceDescr(resource.getResourceDescr());
      newResource.setColumnName(resource.getColumnName());
      newResource.setTableName(resource.getTableName());

      // associations
      entitiesAssociationsSbiResources(resource, newResource, sessionCurrDB, metaAss, importer);

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

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

   * @throws EMFUserError the EMF user error
   */
  public static SbiResources modifyExistingSbiResources(SbiResources exportedRes, Session sessionCurrDB,
      Integer existingId, MetadataAssociations metaAss, ImporterMetadata importer) throws EMFUserError {
    logger.debug("IN");
    SbiResources existingRes = null;
    try {
      // update th Value
      existingRes = (SbiResources) sessionCurrDB.load(SbiResources.class, existingId);
      existingRes.setResourceCode(exportedRes.getResourceCode());
      existingRes.setResourceName(exportedRes.getResourceName());
      existingRes.setResourceDescr(exportedRes.getResourceDescr());
      existingRes.setTableName(exportedRes.getTableName());
      existingRes.setColumnName(exportedRes.getColumnName());

      // associations
      entitiesAssociationsSbiResources(exportedRes, existingRes, sessionCurrDB, metaAss, importer);
    }

View Full Code Here

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

      if(newTypeId==null) {
        logger.error("could not find resource between association"+exportedModRes.getSbiResources().getResourceName());
      }
      else{
        // I must get the new SbiDomains object
        SbiResources newSbiType = (SbiResources) sessionCurrDB.load(SbiResources.class, newTypeId);
        existingModResources.setSbiResources(newSbiType);
      }
    }

    // Model instance
View Full Code Here

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

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

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

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

      tx = aSession.beginTransaction();
      SbiKpiModelResources aModelResources = new SbiKpiModelResources();
     
      SbiKpiModelInst aModelInst = (SbiKpiModelInst) aSession.load(
          SbiKpiModelInst.class, modelId);
      SbiResources aResource = (SbiResources) aSession.load(
          SbiResources.class, resourceId);
      aModelResources.setSbiKpiModelInst(aModelInst);
      aModelResources.setSbiResources(aResource);
     
      aSession.save(aModelResources);
View Full Code Here

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

  private List getModelResource(Session aSession, Integer modelId,
      Integer resourceId) {
    SbiKpiModelInst aModelInst = (SbiKpiModelInst) aSession.load(
        SbiKpiModelInst.class, modelId);
    SbiResources aResource = (SbiResources) aSession.load(
        SbiResources.class, resourceId);
    Criteria crit = aSession.createCriteria(SbiKpiModelResources.class);
    crit.add(Expression.eq("sbiKpiModelInst", aModelInst));
    crit.add(Expression.eq("sbiResources", aResource));
    return crit.list()
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.