Examples of SbiBinContents


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

    Transaction tx = null;   
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      // store the binary content
      SbiBinContents hibBinContent = new SbiBinContents();
      byte[] bytes = objTemplate.getContent();
      hibBinContent.setContent(bytes);
      updateSbiCommonInfo4Insert(hibBinContent);
      Integer idBin = (Integer) aSession.save(hibBinContent);
      // recover the saved binary hibernate object
      hibBinContent = (SbiBinContents) aSession.load(SbiBinContents.class, idBin);
      // set to not active the current active template
View Full Code Here

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

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

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

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiObjects hibBIObject = (SbiObjects) aSession.load(SbiObjects.class, idBIObj);
      SbiBinContents hibBinContent = new SbiBinContents();
      hibBinContent.setContent(content);
      updateSbiCommonInfo4Insert(hibBinContent);
      Integer idBin = (Integer)aSession.save(hibBinContent);
      // recover the saved binary hibernate object
      hibBinContent = (SbiBinContents) aSession.load(SbiBinContents.class, idBin);
      // store the object note
View Full Code Here

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

    map.setMapId(getMapId());
    map.setName(getName());
    map.setDescr(getDescr());
    map.setFormat(getFormat());
    map.setUrl(getUrl());
    SbiBinContents tmpBin = getBinContents();
    if (tmpBin != null) {
      map.setBinId(tmpBin.getId().intValue());
    }


    return map;
  }
View Full Code Here

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

        Query query = aSession.createQuery(hql);
        List templs = query.list();
        Iterator iterTempls = templs.iterator();
        while(iterTempls.hasNext()) {
          SbiObjTemplates hibObjTemp = (SbiObjTemplates)iterTempls.next();
          SbiBinContents hibBinCont = hibObjTemp.getSbiBinContents();
          aSession.delete(hibObjTemp);
          aSession.delete(hibBinCont);

        }
View Full Code Here

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

   *
   * @return the sbi bin contents
   */
  public static SbiBinContents makeNewSbiBinContents(SbiBinContents obj){
    logger.debug("IN");
    SbiBinContents newObj = new SbiBinContents();
    newObj.setContent(obj.getContent());
    logger.debug("OUT");
    return newObj;
 
View Full Code Here

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

      }
    }

    // Binary contents will be always inserted as new
    logger.debug("Insert the binary content associated");
    SbiBinContents exportedBinContent = exportedMetacontents.getSbiBinContents();
    SbiBinContents newBinContents = new SbiBinContents();
    newBinContents.setContent(exportedBinContent.getContent());
    sessionCurrDB.save(newBinContents);
    existingMetacontents.setSbiBinContents(newBinContents);

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

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

    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();

      //inserts the svg file into sbi_binary_contents
      SbiBinContents hibBinContents = null;

      Integer binId = Integer.valueOf(aMap.getBinId());
      if (binId != null && binId > new Integer("0")){
        hibBinContents = (SbiBinContents) tmpSession.load(SbiBinContents.class, binId);
        hibBinContents.setContent(content);
        updateSbiCommonInfo4Insert(hibBinContents);
        tmpSession.save(hibBinContents);
      } else {
        hibBinContents = new SbiBinContents();
        hibBinContents.setContent(content);
        Integer idBin = (Integer)tmpSession.save(hibBinContents);
        // recover the saved binary hibernate object
        hibBinContents = (SbiBinContents) tmpSession.load(SbiBinContents.class, idBin);
      }
      SbiGeoMaps hibMap = (SbiGeoMaps) tmpSession.load(SbiGeoMaps.class, new Integer(aMap.getMapId()));
View Full Code Here

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

    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();

      //inserts the svg file into sbi_binary_contents
      SbiBinContents hibBinContents = new SbiBinContents();
      hibBinContents.setContent(content);
      Integer idBin = (Integer)tmpSession.save(hibBinContents);
      // recover the saved binary hibernate object
      hibBinContents = (SbiBinContents) tmpSession.load(SbiBinContents.class, idBin);

      SbiGeoMaps hibMap = new SbiGeoMaps();
View Full Code Here

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

          new Integer(aMap.getMapId()));

      tmpSession.delete(hibMap);

      // delete template from sbi_binary_contents
      SbiBinContents hibBinCont = hibMap.getBinContents();
      if (hibBinCont != null) tmpSession.delete(hibBinCont);

      tx.commit();
    } catch (HibernateException he) {
      logException(he);
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.