it.eng.spagobi.analiticalmodel.document.dao
Class SnapshotDAOHibImpl

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.analiticalmodel.document.dao.SnapshotDAOHibImpl
All Implemented Interfaces:
ISnapshotDAO, ISpagoBIDao

public class SnapshotDAOHibImpl
extends AbstractHibernateDAO
implements ISnapshotDAO


Field Summary
 
Fields inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
TENANT_FILTER_NAME
 
Constructor Summary
SnapshotDAOHibImpl()
           
 
Method Summary
 void deleteSnapshot(java.lang.Integer idSnap)
          Delete a snapshot.
 Snapshot getLastSnapshot(java.lang.Integer idBIObj)
          Gets the last snapshot that is children of a biobject.
 java.util.List getSnapshots(java.lang.Integer idBIObj)
          Gets the list of the snapshot details that are children of a biobject.
 Snapshot loadSnapshot(java.lang.Integer idSnap)
          Load a snapshot.
 void saveSnapshot(byte[] content, java.lang.Integer idBIObj, java.lang.String name, java.lang.String description)
          Save a snapshot of the object.
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
commitIfActiveAndClose, disableTenantFilter, enableTenantFilter, getSession, getTenant, getUserProfile, logException, rollbackIfActiveAndClose, setTenant, setUserID, setUserProfile, updateSbiCommonInfo4Insert, updateSbiCommonInfo4Update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.eng.spagobi.commons.dao.ISpagoBIDao
getUserProfile, setTenant, setUserID, setUserProfile
 

Constructor Detail

SnapshotDAOHibImpl

public SnapshotDAOHibImpl()
Method Detail

deleteSnapshot

public void deleteSnapshot(java.lang.Integer idSnap)
                    throws it.eng.spago.error.EMFUserError
Description copied from interface: ISnapshotDAO
Delete a snapshot.

Specified by:
deleteSnapshot in interface ISnapshotDAO
Parameters:
idSnap - the id of the snapshot
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

getSnapshots

public java.util.List getSnapshots(java.lang.Integer idBIObj)
                            throws it.eng.spago.error.EMFUserError
Description copied from interface: ISnapshotDAO
Gets the list of the snapshot details that are children of a biobject.

Specified by:
getSnapshots in interface ISnapshotDAO
Parameters:
idBIObj - the id of the biobject parent
Returns:
List of BIObject.BIObjectSnapshot objects
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

saveSnapshot

public void saveSnapshot(byte[] content,
                         java.lang.Integer idBIObj,
                         java.lang.String name,
                         java.lang.String description)
                  throws it.eng.spago.error.EMFUserError
Description copied from interface: ISnapshotDAO
Save a snapshot of the object.

Specified by:
saveSnapshot in interface ISnapshotDAO
Parameters:
content - byte array containing the content of the snapshot
idBIObj - the id of the biobject parent
name - the name of the new subobject
description - the description of the new subobject
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

loadSnapshot

public Snapshot loadSnapshot(java.lang.Integer idSnap)
                      throws it.eng.spago.error.EMFUserError
Description copied from interface: ISnapshotDAO
Load a snapshot.

Specified by:
loadSnapshot in interface ISnapshotDAO
Parameters:
idSnap - the id of the snapshot
Returns:
Snapshot the snapshot loaded
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

getLastSnapshot

public Snapshot getLastSnapshot(java.lang.Integer idBIObj)
                         throws it.eng.spago.error.EMFUserError
Description copied from interface: ISnapshotDAO
Gets the last snapshot that is children of a biobject.

Specified by:
getLastSnapshot in interface ISnapshotDAO
Parameters:
idBIObj - the id of the biobject parent
Returns:
Snapshot the snapshot loaded
Throws:
it.eng.spago.error.EMFUserError - the EMF user error