Examples of SbiDossierPresentations


Examples of it.eng.spagobi.engines.dossier.metadata.SbiDossierPresentations

      String hql = "from SbiDossierPresentations sdp where sdp.sbiObject.biobjId= ?  and sdp.prog= ?" ;
      Query query = aSession.createQuery(hql);
      query.setInteger(0, dossierId.intValue());
      query.setInteger(1, versionId.intValue());
     
      SbiDossierPresentations hibObjTemp = (SbiDossierPresentations) query.uniqueResult();
      if (hibObjTemp == null) {
        return null;
      } else {
        toReturn = hibObjTemp.getSbiBinaryContent().getContent();
        return toReturn;
      }
    } catch (HibernateException he) {
      logException(he);
      if (tx != null) tx.rollback()
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.metadata.SbiDossierPresentations

        return null;
      } else {
        List toReturn = new ArrayList();
        Iterator it = list.iterator();
        while (it.hasNext()) {
          SbiDossierPresentations presentation = (SbiDossierPresentations) it.next();
          toReturn.add(toDossierPresentation(presentation));
        }
        return toReturn;
      }
    } catch (HibernateException he) {
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.metadata.SbiDossierPresentations

      String hql = "from SbiDossierPresentations sdp where sdp.sbiObject.biobjId=? and sdp.prog=?";
      Query query = aSession.createQuery(hql);
      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.engines.dossier.metadata.SbiDossierPresentations

      // 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());
      // store the object template
      SbiDossierPresentations hibObj = new SbiDossierPresentations();
      hibObj.setWorkflowProcessId(dossierPresentation.getWorkflowProcessId());
      hibObj.setCreationDate(new Date());
      hibObj.setName(dossierPresentation.getName());
      hibObj.setProg(null);
      hibObj.setSbiBinaryContent(hibBinContent);
      hibObj.setSbiObject(obj);
      hibObj.setApproved(null);
      updateSbiCommonInfo4Insert(hibObj);
      aSession.save(hibObj);
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.metadata.SbiDossierPresentations

    Session aSession = null;
    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiDossierPresentations hibObj = (SbiDossierPresentations) aSession.load(SbiDossierPresentations.class,
          dossierPresentation.getId());
      hibObj.setProg(dossierPresentation.getProg());
      boolean approved = dossierPresentation.getApproved().booleanValue();
      hibObj.setApproved(approved ? new Short((short) 1) : new Short((short) 0));
      updateSbiCommonInfo4Update(hibObj);
      aSession.save(hibObj);
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.metadata.SbiDossierPresentations

        "and sdp.workflowProcessId=?" ;
      Query query = aSession.createQuery(hql);
      query.setInteger(0, dossierId.intValue());
      query.setInteger(1, workflowProcessId.intValue());
     
      SbiDossierPresentations hibObjTemp = (SbiDossierPresentations) query.uniqueResult();
      if (hibObjTemp == null) {
        return null;
      } else {
        toReturn = toDossierPresentation(hibObjTemp);
        return toReturn;
View Full Code Here

Examples of it.eng.spagobi.engines.dossier.metadata.SbiDossierPresentations

      Query query = aSession.createQuery(hql);
      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.