Package it.eng.spagobi.analiticalmodel.document.metadata

Examples of it.eng.spagobi.analiticalmodel.document.metadata.SbiObjects


   *
   * @return the new hibernate biobject
   */
  public static SbiObjects makeNewSbiObject(SbiObjects obj, Integer id){
    logger.debug("IN");
    SbiObjects newObj = makeNewSbiObject(obj);
    newObj.setBiobjId(id);
    logger.debug("OUT");
    return newObj;
  }
View Full Code Here


   * @throws EMFUserError the EMF user error
   */
  public static SbiObjects modifyExistingSbiObject(SbiObjects exportedObj, Session sessionCurrDB,
      Integer existingId) throws EMFUserError {
    logger.debug("IN");
    SbiObjects existingObj = null;
    try {
      // update document
      existingObj = (SbiObjects) sessionCurrDB.load(SbiObjects.class, existingId);
      existingObj.setName(exportedObj.getName());
      existingObj.setDescr(exportedObj.getDescr());
      existingObj.setLabel(exportedObj.getLabel());
      existingObj.setExecModeCode(exportedObj.getExecModeCode());
      existingObj.setObjectTypeCode(exportedObj.getObjectTypeCode());
      existingObj.setPath(exportedObj.getPath());
      existingObj.setRelName(exportedObj.getRelName());
      existingObj.setStateConsiderationCode(exportedObj.getStateConsiderationCode());
      existingObj.setUuid(exportedObj.getUuid());
      existingObj.setEncrypt(exportedObj.getEncrypt());
      existingObj.setSbiEngines(exportedObj.getSbiEngines());
      existingObj.setSchedFl(exportedObj.getSchedFl());
      existingObj.setSbiObjStates(new HashSet());
      existingObj.setVisible(exportedObj.getVisible());
      existingObj.setProfiledVisibility(exportedObj.getProfiledVisibility());
      existingObj.setRefreshSeconds(exportedObj.getRefreshSeconds());

      // deletes existing associations between object and parameters
      Set objPars = existingObj.getSbiObjPars();
      Iterator objParsIt = objPars.iterator();
      while (objParsIt.hasNext()) {
        SbiObjPar objPar = (SbiObjPar) objParsIt.next();
        // for each biobjectparameter deletes all its dependencies, if any
        Query query = sessionCurrDB.createQuery(" from SbiObjParuse where id.sbiObjPar.objParId = " + objPar.getObjParId());
View Full Code Here

      Integer newObjId=(Integer)objectIdAss.get(oldObjId);
      if(newObjId==null) {
        logger.error("could not find object associated "+exportedMetacontents.getSbiObjects().getLabel());
      }
      else{
        SbiObjects newSbiObjects = (SbiObjects) sessionCurrDB.load(SbiObjects.class, newObjId);
        existingMetacontents.setSbiObjects(newSbiObjects);
      }
    }

    // SbiSubobject (if present)
View Full Code Here

    Transaction tx = null;
    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) {
View Full Code Here

    Transaction tx = null;
    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) {
View Full Code Here

    try {
      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);
View Full Code Here

      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());
      // store the object template
      SbiDossierPresentations hibObj = new SbiDossierPresentations();
      hibObj.setWorkflowProcessId(dossierPresentation.getWorkflowProcessId());
      hibObj.setCreationDate(new Date());
      hibObj.setName(dossierPresentation.getName());
View Full Code Here

      query.setInteger(2, workflowProcessId.intValue());
     
      SbiDossierPartsTemp hibObjTemp = (SbiDossierPartsTemp) query.uniqueResult();
      if (hibObjTemp == null) {
        hibObjTemp = new SbiDossierPartsTemp();
        SbiObjects objHib = (SbiObjects) aSession.load(SbiObjects.class, dossierId);
        hibObjTemp.setSbiObject(objHib);
        hibObjTemp.setPageId(pageId);
        hibObjTemp.setSbiDossierBinaryContentsTemps(new HashSet());
        hibObjTemp.setWorkflowProcessId(workflowProcessId);
        updateSbiCommonInfo4Insert(hibObjTemp);
View Full Code Here

      query.setInteger(2, workflowProcessId.intValue());
     
      SbiDossierPartsTemp hibObjTemp = (SbiDossierPartsTemp) query.uniqueResult();
      if (hibObjTemp == null) {
        hibObjTemp = new SbiDossierPartsTemp();
        SbiObjects objHib = (SbiObjects) aSession.load(SbiObjects.class, dossierId);
        hibObjTemp.setSbiObject(objHib);
        hibObjTemp.setPageId(pageId);
        hibObjTemp.setSbiDossierBinaryContentsTemps(new HashSet());
        hibObjTemp.setWorkflowProcessId(workflowProcessId);
        aSession.save(hibObjTemp);
View Full Code Here

TOP

Related Classes of it.eng.spagobi.analiticalmodel.document.metadata.SbiObjects

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.