Examples of SbiSubObjects


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

   *
   * @return the sbi sub objects
   */
  public static SbiSubObjects makeNewSbiSubObjects(SbiSubObjects obj){
    logger.debug("IN");
    SbiSubObjects newObj = new SbiSubObjects();
    newObj.setCreationDate(obj.getCreationDate());
    newObj.setDescription(obj.getDescription());
    newObj.setIsPublic(obj.getIsPublic());
    newObj.setLastChangeDate(obj.getLastChangeDate());
    newObj.setName(obj.getName());
    newObj.setOwner(obj.getOwner());
    logger.debug("OUT");
    return newObj;
 
View Full Code Here

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

      Integer newSubObjId=(Integer)subObjectIdAss.get(oldSubObjId);
      if(newSubObjId==null) {
        logger.error("could not find subobject associated "+exportedMetacontents.getSbiSubObjects().getName());
      }
      else{
        SbiSubObjects newSbiSubObjects = (SbiSubObjects) sessionCurrDB.load(SbiSubObjects.class, newSubObjId);
        existingMetacontents.setSbiSubObjects(newSbiSubObjects);
      }
    }

    // Binary contents will be always inserted as new
View Full Code Here

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

    Session aSession = null;
    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiSubObjects hibSubobject = (SbiSubObjects)aSession.load(SbiSubObjects.class, idSub);
      SbiBinContents hibBinCont = hibSubobject.getSbiBinContents();
     
      //delete metadata eventually associated
      List metadata = DAOFactory.getObjMetadataDAO().loadAllObjMetadata();
      IObjMetacontentDAO objMetaContentDAO = DAOFactory.getObjMetacontentDAO();
      if (metadata != null && !metadata.isEmpty()) {
        Iterator it = metadata.iterator();
        while (it.hasNext()) {
          ObjMetadata objMetadata = (ObjMetadata) it.next();
          ObjMetacontent objMetacontent = (ObjMetacontent) DAOFactory.getObjMetacontentDAO().loadObjMetacontent(objMetadata.getObjMetaId(), hibSubobject.getSbiObject().getBiobjId(), hibSubobject.getSubObjId());
          if(objMetacontent!=null){
            objMetaContentDAO.eraseObjMetadata(objMetacontent);
          }
        }
      }     
View Full Code Here

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

  public void deleteSubObjectSameConnection(Integer idSub, Session aSession) throws EMFUserError {
    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.analiticalmodel.document.metadata.SbiSubObjects

    Session aSession = null;
    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiSubObjects hibSub = (SbiSubObjects)aSession.load(SbiSubObjects.class, idSubObj);
      sub = toSubobject(hibSub);
      tx.commit();
    } catch (HibernateException he) {
      logger.error(he);
      if (tx != null)
View Full Code Here

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

      Integer idBin = (Integer)aSession.save(hibBinContent);
      // recover the saved binary hibernate object
      hibBinContent = (SbiBinContents) aSession.load(SbiBinContents.class, idBin);
      // store the subobject
      Date now = new Date();
      SbiSubObjects hibSub = new SbiSubObjects();
      hibSub.setOwner(subObj.getOwner());
      hibSub.setLastChangeDate(now);
      hibSub.setIsPublic(subObj.getIsPublic());
      hibSub.setCreationDate(now);
      hibSub.setDescription(subObj.getDescription());
      hibSub.setName(subObj.getName());
      hibSub.setSbiBinContents(hibBinContent);
      hibSub.setSbiObject(hibBIObject);
      updateSbiCommonInfo4Insert(hibSub);
      aSession.save(hibSub);
      subObjId = hibSub.getSubObjId();
      tx.commit();
    } catch (HibernateException he) {
      logger.error(he);
      if (tx != null)
        tx.rollback();
View Full Code Here

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

      // recover the saved binary hibernate object
      hibBinContent = (SbiBinContents) aSession.load(SbiBinContents.class, idBin);
      // store the subobject
      Date now = new Date();
      subObjId = subObj.getId();
      SbiSubObjects hibSub = (SbiSubObjects)aSession.load(SbiSubObjects.class, subObj.getId());
      hibSub.setOwner(subObj.getOwner());
      hibSub.setLastChangeDate(now);
      hibSub.setIsPublic(subObj.getIsPublic());
      hibSub.setCreationDate(now);
      hibSub.setDescription(subObj.getDescription());
      hibSub.setName(subObj.getName());
      hibSub.setSbiBinContents(hibBinContent);
      hibSub.setSbiObject(hibBIObject);
      updateSbiCommonInfo4Update(hibSub);
      aSession.save(hibSub);
     
      tx.commit();
    } catch (HibernateException 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.