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

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

public class ViewpointDAOHimpl
extends AbstractHibernateDAO
implements IViewpointDAO

Defines the Hibernate implementations for all DAO methods, for a viewpoint.

Author:
Giachino

Constructor Summary
ViewpointDAOHimpl()
           
 
Method Summary
 void eraseViewpoint(java.lang.Integer id)
          Erase viewpoint.
 void insertViewpoint(Viewpoint viewpoint)
          Insert viewpoint.
 java.util.List loadAccessibleViewpointsByObjId(java.lang.Integer objId, it.eng.spago.security.IEngUserProfile userProfile)
          Loads all detail information for all viewpoints of a object specified accessibile to the user profile at input.
 java.util.List loadAllViewpoints()
          Load all viewpoints.
 java.util.List loadAllViewpointsByObjID(java.lang.Integer objId)
          Load all viewpoints by obj id.
 Viewpoint loadViewpointByID(java.lang.Integer id)
          Load viewpoint by id.
 Viewpoint loadViewpointByNameAndBIObjectId(java.lang.String name, java.lang.Integer biobjectId)
          Load viewpoint by name and document identifier.
 Viewpoint toViewpoint(SbiViewpoints hibViewpoint)
          From the hibernate BI value viewpoint at input, gives the corrispondent Viepoint object.
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
commitIfActiveAndClose, getSession, getUserProfile, logException, rollbackIfActiveAndClose, 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, setUserID, setUserProfile
 

Constructor Detail

ViewpointDAOHimpl

public ViewpointDAOHimpl()
Method Detail

loadAllViewpoints

public java.util.List loadAllViewpoints()
                                 throws it.eng.spago.error.EMFUserError
Load all viewpoints.

Specified by:
loadAllViewpoints in interface IViewpointDAO
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IViewpointDAO.loadAllViewpoints()

loadAllViewpointsByObjID

public java.util.List loadAllViewpointsByObjID(java.lang.Integer objId)
                                        throws it.eng.spago.error.EMFUserError
Load all viewpoints by obj id.

Specified by:
loadAllViewpointsByObjID in interface IViewpointDAO
Parameters:
objId - the obj id
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IViewpointDAO.loadAllViewpoints()

loadViewpointByID

public Viewpoint loadViewpointByID(java.lang.Integer id)
                            throws it.eng.spago.error.EMFUserError
Load viewpoint by id.

Specified by:
loadViewpointByID in interface IViewpointDAO
Parameters:
id - the id
Returns:
the viewpoint
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IViewpointDAO.loadViewpointByID(java.lang.Integer)

loadViewpointByNameAndBIObjectId

public Viewpoint loadViewpointByNameAndBIObjectId(java.lang.String name,
                                                  java.lang.Integer biobjectId)
                                           throws it.eng.spago.error.EMFUserError
Load viewpoint by name and document identifier.

Specified by:
loadViewpointByNameAndBIObjectId in interface IViewpointDAO
Parameters:
name - the name of the viewpoint
name - The id of the document
Returns:
the viewpoint
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.document.dao.IViewpointDAO#loadViewpointByName(java.lang.String)

eraseViewpoint

public void eraseViewpoint(java.lang.Integer id)
                    throws it.eng.spago.error.EMFUserError
Erase viewpoint.

Specified by:
eraseViewpoint in interface IViewpointDAO
Parameters:
id - the id
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.document.dao.IViewpointDAO#eraseViewpoint(it.eng.spagobi.analiticalmodel.document.bo.Viewpoint)

insertViewpoint

public void insertViewpoint(Viewpoint viewpoint)
                     throws it.eng.spago.error.EMFUserError
Insert viewpoint.

Specified by:
insertViewpoint in interface IViewpointDAO
Parameters:
viewpoint - the viewpoint
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IViewpointDAO.insertViewpoint(it.eng.spagobi.analiticalmodel.document.bo.Viewpoint)

toViewpoint

public Viewpoint toViewpoint(SbiViewpoints hibViewpoint)
From the hibernate BI value viewpoint at input, gives the corrispondent Viepoint object.

Parameters:
hibViewpoint - The hybernate viewpoint at input
Returns:
The corrispondent Viewpoint object

loadAccessibleViewpointsByObjId

public java.util.List loadAccessibleViewpointsByObjId(java.lang.Integer objId,
                                                      it.eng.spago.security.IEngUserProfile userProfile)
                                               throws it.eng.spago.error.EMFUserError
Description copied from interface: IViewpointDAO
Loads all detail information for all viewpoints of a object specified accessibile to the user profile at input. For each of them, detail information is stored into a ViewPoint object. After that, all value constraints are stored into a List, which is returned.

Specified by:
loadAccessibleViewpointsByObjId in interface IViewpointDAO
Returns:
A list containing all viewpoints objects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred