Package it.eng.spagobi.commons.bo

Examples of it.eng.spagobi.commons.bo.Domain


      if (ds == null) {
    logger.error("The data source with id " + obj.getDataSourceId() + " is not found on the database.");
    return null;
      }
     
      Domain dialectHB = DAOFactory.getDomainDAO().loadDomainById(ds.getDialectId());
      if (ds == null) {
    logger.error("The data source with id " + obj.getDataSourceId() + " is not found on the database.");
    return null;
      }     
      sbds = new SpagoBiDataSource();
      sbds.setLabel(ds.getLabel());
      sbds.setJndiName(ds.getJndi());
      sbds.setUrl(ds.getUrlConnection());
      sbds.setUser(ds.getUser());
      sbds.setPassword(ds.getPwd());
      sbds.setDriver(ds.getDriver());
      sbds.setHibDialectName(dialectHB.getValueName());
//change
//      sbds.setHibDialectClass(dialectHB.getValueDescription());
      sbds.setHibDialectClass(dialectHB.getValueCd());
      logger.info("read DS: Label="+sbds.getLabel()+" Jndi="+sbds.getJndiName()+" HIB="+sbds.getHibDialectClass());
     
      //gets dialect informations
      IDomainDAO domaindao = DAOFactory.getDomainDAO();
      Domain doDialect = domaindao.loadDomainById(ds.getDialectId());
      sbds.setHibDialectClass(doDialect.getValueCd());
      sbds.setHibDialectName(doDialect.getValueName());
      sbds.setMultiSchema(ds.getMultiSchema());
      sbds.setSchemaAttribute(ds.getSchemaAttribute());

  } catch (Exception e) {
      logger.error("The data source is not correctly returned", e);
View Full Code Here


      sbds.setMultiSchema(ds.getMultiSchema());
      sbds.setSchemaAttribute(ds.getSchemaAttribute());
     
    //gets dialect informations
      IDomainDAO domaindao = DAOFactory.getDomainDAO();
      Domain doDialect = domaindao.loadDomainById(ds.getDialectId());
      sbds.setHibDialectClass(doDialect.getValueCd());
      sbds.setHibDialectName(doDialect.getValueName());
     
  } catch (Exception e) {
      logger.error("The data source is not correctly returned", e);
  }
  logger.debug("OUT");
View Full Code Here

    sbds.setUser(ds.getUser());
    sbds.setPassword(ds.getPwd());
    sbds.setDriver(ds.getDriver());
    //gets dialect informations
      IDomainDAO domaindao = DAOFactory.getDomainDAO();
      Domain doDialect = domaindao.loadDomainById(ds.getDialectId());
      sbds.setHibDialectClass(doDialect.getValueCd());
      sbds.setHibDialectName(doDialect.getValueName());
      sbds.setMultiSchema(ds.getMultiSchema());
      sbds.setSchemaAttribute(ds.getSchemaAttribute());
     
    tmpList.add(sbds);
      }
View Full Code Here

      try {
        String name = getAttributeAsString(NAME);
        String label = getAttributeAsString(LABEL);
        String description = getAttributeAsString(DESCRIPTION);
        String typeStr = getAttributeAsString(TYPE);     
        Domain tmpDomain = daoDomain.loadDomainByCodeAndValue(UDP_TYPES, typeStr);
        Integer type = tmpDomain.getValueId();
        String familyStr = getAttributeAsString(FAMILY);
        tmpDomain = daoDomain.loadDomainByCodeAndValue(UDP_FAMILIES, familyStr);
        Integer family = tmpDomain.getValueId();
        Boolean isMultivalue = Boolean.valueOf(getAttributeAsBoolean(IS_MULTIVALUE));
       
        String id = getAttributeAsString(ID);
       
        SbiUdp udp = new SbiUdp();
View Full Code Here

    toReturn.setFamilyId(sbiUdp.getFamilyId());
    toReturn.setMultivalue(sbiUdp.isIsMultivalue());

    // get the type ValueCd
    if (sbiUdp.getTypeId() != null){
      Domain domain;
      try {
        domain = DAOFactory.getDomainDAO().loadDomainById(sbiUdp.getTypeId());
        toReturn.setDataTypeValeCd(domain.getValueCd());
      } catch (EMFUserError e) {
        logger.error("error in loading domain with Id "+sbiUdp.getTypeId(), e);
      }
    }
    logger.debug("OUT");
View Full Code Here

    DataResult dr = null;
    DataConnection dataConnection = null;
    Integer returnValue = null;
    try {
      IDomainDAO domdao = DAOFactory.getDomainDAO();
      Domain dom = domdao.loadDomainByCodeAndValue(domainCode, valueCode);
      returnValue = dom.getValueId();
    catch (Exception ex) {
      SpagoBITracer.major(SpagoBIConstants.NAME_MODULE,this.getClass().toString(),
      "findSBIDomainValueID", " An exception has occurred ", ex);
    } finally {
      Utils.releaseResources(dataConnection, cmd, dr);
View Full Code Here

    List<Domain> domainsDs = (List<Domain>)getSessionContainer().getAttribute("dsTypesList");   
    String dsType = "";
    if(domainsDs!=null && !domainsDs.isEmpty()){
      Iterator it = domainsDs.iterator();
      while(it.hasNext()){
        Domain d = (Domain)it.next();
        if(d!=null && d.getValueCd().equalsIgnoreCase(dsTypeCd)){
          dsType = d.getValueName();
          break;
        }
      }
    }     
   
View Full Code Here

    }
    String dsType = "";
    if(domainsDs!=null && !domainsDs.isEmpty()){
      Iterator it = domainsDs.iterator();
      while(it.hasNext()){
        Domain d = (Domain)it.next();
        if(d!=null && d.getValueCd().equalsIgnoreCase(dsTypeCd)){
          dsType = d.getValueName();
          break;
        }
      }
    } 
View Full Code Here

    toReturn.setLabel(sbiUdpValue.getSbiUdp().getLabel()); //denormilized
    toReturn.setName(sbiUdpValue.getSbiUdp().getName())//denormilized   

    try{
      IDomainDAO aDomainDAO = DAOFactory.getDomainDAO();
      Domain familyDomain = aDomainDAO.loadDomainById(sbiUdpValue.getSbiUdp().getFamilyId());
      toReturn.setFamily(familyDomain.getValueCd()); //denormilized
    } catch (Exception he) {
      logger.error(he);
    }

    Integer typeId = sbiUdpValue.getSbiUdp().getTypeId();
    if(typeId != null){
      try{
        IDomainDAO aDomainDAO = DAOFactory.getDomainDAO();
        Domain typeDomain = aDomainDAO.loadDomainById(typeId);
        toReturn.setTypeLabel(typeDomain.getValueCd()); //denormilized
      } catch (Exception he) {
        logger.error(he);
      }
    }
View Full Code Here

        l.add(objLabel);
        throw new EMFUserError(EMFErrorSeverity.ERROR, "1005", l, messageBundle);
      }
      Engine engine = obj.getEngine();
      // GET THE TYPE OF ENGINE (INTERNAL / EXTERNAL) AND THE SUITABLE BIOBJECT TYPES
      Domain engineType = null;
      Domain compatibleBiobjType = null;
      try {
        engineType = DAOFactory.getDomainDAO().loadDomainById(engine.getEngineTypeId());
        compatibleBiobjType = DAOFactory.getDomainDAO().loadDomainById(engine.getBiobjTypeId());
      } catch (EMFUserError error) {
        logger.error("Error retrieving document's engine information", error);
        return "1009|";
      } catch (Exception error) {
        logger.error("Error retrieving document's engine information", error);
        return "1009|";
      }

      String compatibleBiobjTypeCd = compatibleBiobjType.getValueCd();
      String biobjTypeCd = obj.getBiObjectTypeCode();

      // CHECK IF THE BIOBJECT IS COMPATIBLE WITH THE TYPES SUITABLE FOR THE ENGINE
      if (!compatibleBiobjTypeCd.equalsIgnoreCase(biobjTypeCd)) {
        // the engine document type and the biobject type are not compatible
View Full Code Here

TOP

Related Classes of it.eng.spagobi.commons.bo.Domain

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.