Package it.eng.spagobi.commons.metadata

Examples of it.eng.spagobi.commons.metadata.SbiBinContents


    IBinContentDAO binContentDAO=DAOFactory.getBinContentDAO();
    try{
      byte[] binContentsContent=binContentDAO.getBinContent(getBinId());
      if(binContentsContent!=null){
        Integer contentId=getBinId();
        SbiBinContents sbiBinContents=new SbiBinContents();
        sbiBinContents.setId(contentId);
        sbiBinContents.setContent(binContentsContent);
        sbm.setBinContents(sbiBinContents);
      }
    }
    catch (Exception e) {
      logger.error("Bin COntent not found");
View Full Code Here


          hibContents.setSbiSubObjects(subobj);
        }
      }
      updateSbiCommonInfo4Update(hibContents);
      // update content
      SbiBinContents binaryContent = hibContents.getSbiBinContents();
      if (binaryContent == null) {
        binaryContent = new SbiBinContents();
        binaryContent.setContent(aObjMetacontent.getContent());
      } else {
        binaryContent.setContent(aObjMetacontent.getContent());
      }
      updateSbiCommonInfo4Insert(binaryContent);
      aSession.save(binaryContent);
      hibContents.setSbiBinContents(binaryContent);
View Full Code Here

        criteria.add(aCriterion);
        SbiSubObjects subobj = (SbiSubObjects) criteria.uniqueResult();
        hibContents.setSbiSubObjects(subobj);
      }

      SbiBinContents binaryContent = new SbiBinContents();
      binaryContent.setContent(aObjMetacontent.getContent());
      updateSbiCommonInfo4Insert(binaryContent);
      aSession.save(binaryContent);
      hibContents.setSbiBinContents(binaryContent);

      hibContents.setObjmetaId(aObjMetacontent.getObjmetaId());
View Full Code Here

        hibObjMetacontents.setSbiSubObjects(sbiSubObjects);
        logger.debug("inserted sbi " + objMetacontent.getSubobjId() + " SubObject metacontent");
      }
      // get the content
      if (objMetacontent.getBinaryContentId() != null) {
        SbiBinContents sbiBinContents = (SbiBinContents) session.load(SbiBinContents.class, objMetacontent.getBinaryContentId());
        hibObjMetacontents.setSbiBinContents(sbiBinContents);
        // insert the binary content!!       
        logger.debug("inserted sbi " + objMetacontent.getBinaryContentId() + " Binary Content metacontent");
      }
View Full Code Here

      SbiObjects hibBIObj = new SbiObjects(biobj.getId());

      byte[] template = snapshot.getContent();

      SbiBinContents hibBinContent = new SbiBinContents();
      hibBinContent.setId(snapshot.getBinId());
      hibBinContent.setContent(template);

      SbiSnapshots sub=new SbiSnapshots();
      sub.setCreationDate(snapshot.getDateCreation());
      sub.setDescription(snapshot.getDescription());
      sub.setName(snapshot.getName());
View Full Code Here

        return;
      }

      SbiObjects hibBIObj = new SbiObjects(biobj.getId());

      SbiBinContents hibBinContent = new SbiBinContents();
      hibBinContent.setId(subObject.getBinaryContentId());
      hibBinContent.setContent(subObject.getContent());

      SbiSubObjects sub=new SbiSubObjects();
      sub.setCreationDate(subObject.getCreationDate());
      sub.setDescription(subObject.getDescription());
      sub.setIsPublic(subObject.getIsPublic());
View Full Code Here

        return;
      }

      byte[] template = biobjTempl.getContent();

      SbiBinContents hibBinContent = new SbiBinContents();
      SbiObjTemplates hibObjTemplate = new SbiObjTemplates();
      hibObjTemplate.setObjTempId(biobjTempl.getBiobjId());
      hibBinContent.setId(biobjTempl.getBinId());
      hibBinContent.setContent(template);


      hibObjTemplate.setActive(new Boolean(true));
      hibObjTemplate.setCreationDate(biobjTempl.getCreationDate());
      hibObjTemplate.setCreationUser(biobjTempl.getCreationUser());
View Full Code Here

        if (map.getBinId() == 0) {
          logger.warn("Map with id = " + map.getMapId() + " and name = " + map.getName() +
          " has not binary content!!");
          hibMap.setBinContents(null);
        } else {
          SbiBinContents hibBinContent = new SbiBinContents();
          hibBinContent.setId(map.getBinId());
          byte[] content = DAOFactory.getBinContentDAO().getBinContent(map.getBinId());
          hibBinContent.setContent(content);
          hibMap.setBinContents(hibBinContent);

          session.save(hibBinContent);
        }
View Full Code Here

      List hibRes = hibQuery.list();
      if(!hibRes.isEmpty()) {
        return;
      }

      SbiBinContents hibContent = new SbiBinContents();
      hibContent.setId(idContent);
      hibContent.setContent(content);
      Transaction tx = session.beginTransaction();     
      session.save(hibContent);
      tx.commit();

    } catch (Exception e) {
View Full Code Here

    Transaction tx = null;   
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiObjTemplates hibObjTemp = (SbiObjTemplates)aSession.load(SbiObjTemplates.class,  tempId);
      SbiBinContents hibBinCont = hibObjTemp.getSbiBinContents();
      aSession.delete(hibBinCont);
      aSession.delete(hibObjTemp);
      tx.commit();
    }catch(HibernateException he){
      logException(he);
View Full Code Here

TOP

Related Classes of it.eng.spagobi.commons.metadata.SbiBinContents

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.