Package it.eng.spagobi.commons.bo

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


   *            The hybernate Domain object
   *
   * @return The corrispondent <code>Domain</code>
   */
  public Domain toDomain(SbiDomains hibDomain) {
    Domain aDomain = new Domain();
    aDomain.setValueCd(hibDomain.getValueCd());
    aDomain.setValueId(hibDomain.getValueId());
    aDomain.setValueName(hibDomain.getValueNm());
    aDomain.setDomainCode(hibDomain.getDomainCd());
    aDomain.setDomainName(hibDomain.getDomainNm());
    aDomain.setValueDescription(hibDomain.getValueDs());
    return aDomain;
  }
View Full Code Here


   *
   * @see it.eng.spagobi.commons.dao.IDomainDAO#loadDomainById(java.lang.Integer)
   */
  public Domain loadDomainById(Integer id) throws EMFUserError {

    Domain toReturn = null;
    Session aSession = null;
    Transaction tx = null;

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

      tx = aSession.beginTransaction();
      Query hibQuery = aSession.createQuery(" from SbiDomains");
      List hibList = hibQuery.list();
      Iterator it = hibList.iterator();
      while (it.hasNext()) {
        Domain dom = toDomain((SbiDomains) it.next());
        domains.add(dom);
      }
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

   *             the EMF user error
   *
   */
  public void saveDomain(Domain domain) throws EMFUserError {
   
    Domain toSave = null;
    Session aSession = null;
    Transaction tx = null;

    logger.debug("IN");
    try {
View Full Code Here

      obj.setDataSetId(document.getDataSetId());

      IDomainDAO domainDAO = DAOFactory.getDomainDAO();

      // sets biobject type domain
      Domain type = domainDAO.loadDomainByCodeAndValue("BIOBJ_TYPE", document.getType());
      obj.setBiObjectTypeCode(type.getValueCd());
      obj.setBiObjectTypeID(type.getValueId());

      // sets biobject state domain
      Domain state = domainDAO.loadDomainByCodeAndValue("STATE", document.getState());
      obj.setStateCode(state.getValueCd());
      obj.setStateID(state.getValueId());

      // gets engine
      Engine engine = null;
      IEngineDAO engineDAO = DAOFactory.getEngineDAO();
      if (document.getEngineId() == null) {
View Full Code Here

      sdkEngine = new SDKEngine();
      sdkEngine.setId(engine.getId());
      sdkEngine.setName(engine.getName());
      sdkEngine.setLabel(engine.getLabel());
      sdkEngine.setDescription(engine.getDescription());
      Domain engineType = DAOFactory.getDomainDAO().loadDomainById(engine.getEngineTypeId());
      sdkEngine.setEngineType(engineType.getValueCd());
      Domain documentType = DAOFactory.getDomainDAO().loadDomainById(engine.getBiobjTypeId());
      sdkEngine.setDocumentType(documentType.getValueCd());
      sdkEngine.setClassName(engine.getClassName());
      sdkEngine.setUrl(engine.getUrl());
      sdkEngine.setDriverClassName(engine.getDriverName());
      sdkEngine.setDriverName(engine.getDriverName());
      sdkEngine.setUseDataSet(engine.getUseDataSet());
View Full Code Here

       */
     
      IDomainDAO domainDAO = DAOFactory.getDomainDAO();
      // sets dataset's transformer type domain
      if (dataset.getTransformer() != null) {
        Domain transformer = domainDAO.loadDomainByCodeAndValue("TRANSFORMER_TYPE", dataset.getTransformer());
        dsDetail.setTransformerCd(transformer.getValueCd());
        dsDetail.setTransformerId(transformer.getValueId());
      }
      // sets dataset's category domain
      if (dataset.getCategory() != null){
        Domain category = domainDAO.loadDomainByCodeAndValue("CATEGORY_TYPE", dataset.getCategory());
        dsDetail.setCategoryValueName(category.getValueCd());
        dsDetail.setCategoryId(category.getValueId());
      }
      ds.setActiveDetail(dsDetail);

    } catch (Exception e) {
      logger.error("Error while converting SDKDataSet into GuiGenericDataSet.", e);
View Full Code Here

          udpValue.setValue(value);
          udpValue.setReferenceId(model.getId());

          // get the UDP to get ID (otherwise could be taken in js page)
          Udp udp = DAOFactory.getUdpDAO().loadByLabelAndFamily(labelJ, "MODEL");
          Domain familyDomain = DAOFactory.getDomainDAO().loadDomainById(udp.getFamilyId());
          logger.debug("Udp value assigning value "+value+" to UDP with label "+udp.getLabel()+ " and Model Instance with label "+ model.getLabel());
          udpValue.setLabel(udp.getLabel());
          udpValue.setName(udp.getName());
          udpValue.setFamily(familyDomain != null ? familyDomain.getValueCd() : null);
          udpValue.setUdpId(udp.getUdpId());

          udpValues.add(udpValue);
        }
        model.setUdpValues(udpValues);
View Full Code Here

    Engine engine = null;
    if (engineIdStr == null || engineIdStr.equals("")) {
      // if engine id is not specified take the first engine for the biobject type
      List engines = DAOFactory.getEngineDAO().loadAllEnginesForBIObjectType(typeCode);
      if(engines.size() == 0) {
        Domain domain = DAOFactory.getDomainDAO().loadDomainById(typeIdInt);
        Vector vector = new Vector();
        vector.add(domain.getValueName());
        throw new EMFUserError(EMFErrorSeverity.ERROR, 1064, vector, new HashMap());
      }
      engine = (Engine) engines.get(0);
    } else {
      Integer engineIdInt = new Integer(engineIdStr);
View Full Code Here

    String resourceDescr = r.getDescr();
    String resourceCode = r.getCode();
    String tableName = r.getTable_name();
    Integer resourceId = r.getId();
    String type = r.getType();
    Domain domain = DAOFactory.getDomainDAO().loadDomainByCodeAndValue(
        "RESOURCE", type);
    SbiDomains sbiDomains = new SbiDomains();
    sbiDomains.setDomainCd(domain.getDomainCode());
    sbiDomains.setDomainNm(domain.getDomainName());
    sbiDomains.setValueCd(domain.getValueCd());
    sbiDomains.setValueDs(domain.getValueDescription());
    sbiDomains.setValueId(domain.getValueId());
    sbiDomains.setValueNm(domain.getValueName());

    toReturn.setColumnName(columnName);
    logger.debug("SbiResource columnName setted");
    toReturn.setResourceId(resourceId);
    logger.debug("SbiResource ID setted");
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.