Examples of SbiBinContents


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

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiSubObjects hibSubobject = (SbiSubObjects)aSession.load(SbiSubObjects.class, idSub);
      SbiBinContents hibBinCont = hibSubobject.getSbiBinContents();
      aSession.delete(hibSubobject);
      aSession.delete(hibBinCont);
      tx.commit();
    } catch (HibernateException he) {
      logger.error(he);
View Full Code Here

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

    Integer subObjId = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiObjects hibBIObject = (SbiObjects) aSession.load(SbiObjects.class, idBIObj);
      SbiBinContents hibBinContent = new SbiBinContents();
      byte[] bytes = null;
      try {
        bytes = subObj.getContent();
      } catch (EMFInternalError e) {
        logger.error("Could not retrieve content of SubObject object in input.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
      }
      hibBinContent.setContent(bytes);
      updateSbiCommonInfo4Insert(hibBinContent);
      Integer idBin = (Integer)aSession.save(hibBinContent);
      // recover the saved binary hibernate object
      hibBinContent = (SbiBinContents) aSession.load(SbiBinContents.class, idBin);
      // store the subobject
View Full Code Here

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

    Integer subObjId = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiObjects hibBIObject = (SbiObjects) aSession.load(SbiObjects.class, idBIObj);
      SbiBinContents hibBinContent = new SbiBinContents();
      byte[] bytes = null;
      try {
        bytes = subObj.getContent();
      } catch (EMFInternalError e) {
        logger.error("Could not retrieve content of SubObject object in input.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
      }
      hibBinContent.setContent(bytes);
      updateSbiCommonInfo4Insert(hibBinContent);
      Integer idBin = (Integer)aSession.save(hibBinContent);
      // recover the saved binary hibernate object
      hibBinContent = (SbiBinContents) aSession.load(SbiBinContents.class, idBin);
      // store the subobject
View Full Code Here

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

      aSession = getSession();
      tx = aSession.beginTransaction();
      Date now = new Date();
      String execReq = objNote.getExecReq();
      SbiObjects hibBIObject = (SbiObjects) aSession.load(SbiObjects.class, biobjId);
      SbiBinContents hibBinContent = new SbiBinContents();
      hibBinContent.setContent(objNote.getContent());
      Integer idBin = (Integer)aSession.save(hibBinContent);
      // recover the saved binary hibernate object
      hibBinContent = (SbiBinContents) aSession.load(SbiBinContents.class, idBin);
      // store the object note
      SbiObjNotes hibObjNote = new SbiObjNotes();
View Full Code Here

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

      tx = aSession.beginTransaction();
     
      Date now = new Date();
     
      SbiObjNotes hibObjNote = (SbiObjNotes)aSession.load(SbiObjNotes.class, objNote.getId());
      SbiBinContents hibBinCont = hibObjNote.getSbiBinContents();
      hibBinCont.setContent(objNote.getContent());
      hibObjNote.setExecReq(objNote.getExecReq());
      hibObjNote.setIsPublic(objNote.getIsPublic());
      hibObjNote.setLastChangeDate(now);
      updateSbiCommonInfo4Update(hibObjNote);
      tx.commit();
View Full Code Here

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

      query.setInteger(0, biobjId.intValue());
      List notes = query.list();
      Iterator notesIt = notes.iterator();
      while (notesIt.hasNext()) {
        SbiObjNotes note = (SbiObjNotes) notesIt.next();
        SbiBinContents noteBinContent = note.getSbiBinContents();
        aSession.delete(note);
        aSession.delete(noteBinContent);
      }
      tx.commit();
    } catch (HibernateException he) {
View Full Code Here

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

     
      List notes = query.list();
      Iterator notesIt = notes.iterator();
      while (notesIt.hasNext()) {
        SbiObjNotes note = (SbiObjNotes) notesIt.next();
        SbiBinContents noteBinContent = note.getSbiBinContents();
        aSession.delete(note);
        aSession.delete(noteBinContent);
      }
      tx.commit();
    } catch (HibernateException he) {
View Full Code Here

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

      query.setInteger(0, dossierId.intValue());
      query.setInteger(1, versionId.intValue());
     
      SbiDossierPresentations hibObjTemp = (SbiDossierPresentations) query.uniqueResult();
      if (hibObjTemp != null) {
        SbiBinContents hibBinCont = hibObjTemp.getSbiBinaryContent();
        // deletes association first
        aSession.delete(hibObjTemp);
        // deletes binary contest at last
        aSession.delete(hibBinCont);
      } else {
View Full Code Here

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 = null;
      try {
        bytes = dossierPresentation.getContent();
      } catch (EMFInternalError e) {
        logger.error("Could not retrieve content of DossierPresentation object in input.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
      }
      hibBinContent.setContent(bytes);
      Integer idBin = (Integer)aSession.save(hibBinContent);
      // recover the saved binary hibernate object
      hibBinContent = (SbiBinContents) aSession.load(SbiBinContents.class, idBin);
      // recover the associated biobject
      SbiObjects obj = (SbiObjects) aSession.load(SbiObjects.class, dossierPresentation.getBiobjectId());
View Full Code Here

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

      query.setInteger(0, dossierId.intValue());
      List list = query.list();
      Iterator it = list.iterator();
      while (it.hasNext()) {
        SbiDossierPresentations hibObjTemp = (SbiDossierPresentations) it.next();
        SbiBinContents hibBinCont = hibObjTemp.getSbiBinaryContent();
        // deletes association first
        aSession.delete(hibObjTemp);
        // deletes binary contest at last
        aSession.delete(hibBinCont);
      }
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.