it.eng.spagobi.bo.dao.jdbc
Class BIObjectDAOImpl

java.lang.Object
  extended by it.eng.spagobi.bo.dao.jdbc.AbstractJdbcDAO
      extended by it.eng.spagobi.bo.dao.jdbc.BIObjectDAOImpl
All Implemented Interfaces:
IBIObjectDAO

public class BIObjectDAOImpl
extends AbstractJdbcDAO
implements IBIObjectDAO

Defines the JDBC implementations for all DAO methods, for a BI Object.

Author:
zoppello

Constructor Summary
BIObjectDAOImpl()
           
 
Method Summary
 void eraseBIObject(BIObject obj)
           
 void eraseBIObject(BIObject obj, java.lang.Integer idFunct)
          Deletes a BIObject from a functionality.
 void fillBIObjectTemplate(BIObject obj)
           
 java.util.List getBIObjectParameters(BIObject aBIObject)
          Gets the biparameters associated with to a biobject
 java.util.List getCorrectRolesForExecution(java.lang.Integer id)
          Gets the correct roles for Report execution, given only the Report's id.
 java.util.List getCorrectRolesForExecution(java.lang.Integer id, it.eng.spago.security.IEngUserProfile profile)
          Given the id for a report and the user profile, gets the corret roles for execution.
 java.util.List getCorrectRolesForExecution(java.lang.String pathReport)
           
 java.util.List getCorrectRolesForExecution(java.lang.String pathReport, it.eng.spago.security.IEngUserProfile profile)
           
 void insertBIObject(BIObject obj)
          Implements the query to insert a BIObject.
private  void internalModify(java.lang.Object obj, boolean version)
          Updates the CMS repository if the user has loaded a file template.
 java.util.List loadAllBIObjects()
          Loads all the BIObjects
 java.util.List loadAllBIObjectsFromInitialPath(java.lang.String initialPath)
          Loads all the BIObjects that belong to sub functionalities of the given functionality path
 BIObject loadBIObjectById(java.lang.Integer biObjectID)
          Loads all detail information for a BI Object identified by its biObjectID identifier.
 BIObject loadBIObjectByLabel(java.lang.String label)
          Loads all detail information for a BI Object identified by its label identifier.
private  BIObject loadBIObjectByPath(java.lang.String path)
           
 BIObject loadBIObjectForDetail(java.lang.Integer biObjectID)
          Loads all detail information for a BI Object identified by its id identifier integer.
 BIObject loadBIObjectForDetail(java.lang.String path)
          Loads all detail information for a BI Object identified by its path in the cms.
 BIObject loadBIObjectForExecutionByIdAndRole(java.lang.Integer id, java.lang.String role)
          Loads all information for the execution of a BI Object identified by its id and its role.
 BIObject loadBIObjectForExecutionByPathAndRole(java.lang.String path, java.lang.String role)
           
 BIObject loadBIObjectForTree(java.lang.Integer id)
          Loads all tree information for a BI Object identified by its id identifier Integer.
 BIObject loadBIObjectForTree(java.lang.String path)
           
 java.util.List loadBIObjectParametersForBIObject(BIObject biObject, java.lang.String role)
          Loads all the BI object parameters referring to a given BI Object, according to the particular role.
 void modifyBIObject(BIObject obj)
          Implements the query to modify a BI Object.
 void modifyBIObjectWithoutVersioning(BIObject obj)
          Implements the query to modify a BI Object, but without updating versioning.
 
Methods inherited from class it.eng.spagobi.bo.dao.jdbc.AbstractJdbcDAO
getConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BIObjectDAOImpl

public BIObjectDAOImpl()
Method Detail

loadBIObjectForExecutionByPathAndRole

public BIObject loadBIObjectForExecutionByPathAndRole(java.lang.String path,
                                                      java.lang.String role)
                                               throws EMFUserError
Throws:
EMFUserError
See Also:
it.eng.spagobi.bo.dao.IBIObjectDAO#loadBIObjectForExecutionByPathAndRole(java.lang.String, java.lang.String)

loadBIObjectForDetail

public BIObject loadBIObjectForDetail(java.lang.Integer biObjectID)
                               throws EMFUserError
Description copied from interface: IBIObjectDAO
Loads all detail information for a BI Object identified by its id identifier integer. All these information, achived by a query to the DB, are stored into a BIObject object, which is returned.

Specified by:
loadBIObjectForDetail in interface IBIObjectDAO
Parameters:
biObjectID - The Integer representing the BI object id
Returns:
The BI object detail information, stored into a BIObject
Throws:
EMFUserError - If an Exception occurs
See Also:
IBIObjectDAO.loadBIObjectForDetail(java.lang.Integer)

loadBIObjectForDetail

public BIObject loadBIObjectForDetail(java.lang.String path)
                               throws EMFUserError
Description copied from interface: IBIObjectDAO
Loads all detail information for a BI Object identified by its path in the cms. All these information, achived by a query to the DB, are stored into a BIObject object, which is returned.

Specified by:
loadBIObjectForDetail in interface IBIObjectDAO
Returns:
The BI object detail information, stored into a BIObject
Throws:
EMFUserError - If an Exception occurs
See Also:
IBIObjectDAO.loadBIObjectForDetail(java.lang.Integer)

loadBIObjectForTree

public BIObject loadBIObjectForTree(java.lang.String path)
                             throws EMFUserError
Throws:
EMFUserError
See Also:
it.eng.spagobi.bo.dao.IBIObjectDAO#loadBIObjectForTree(java.lang.String)

loadBIObjectByPath

private BIObject loadBIObjectByPath(java.lang.String path)
                             throws EMFUserError
Throws:
EMFUserError
See Also:
it.eng.spagobi.bo.dao.IBIObjectDAO#loadBIObjectByPath(java.lang.String)

modifyBIObject

public void modifyBIObject(BIObject obj)
                    throws EMFUserError
Description copied from interface: IBIObjectDAO
Implements the query to modify a BI Object. All information needed is stored into the input BIObject object.

Specified by:
modifyBIObject in interface IBIObjectDAO
Parameters:
obj - The BIobject containing all modify information
Throws:
EMFUserError - If an Exception occurred
See Also:
IBIObjectDAO.modifyBIObject(it.eng.spagobi.bo.BIObject)

modifyBIObjectWithoutVersioning

public void modifyBIObjectWithoutVersioning(BIObject obj)
                                     throws EMFUserError
Description copied from interface: IBIObjectDAO
Implements the query to modify a BI Object, but without updating versioning. All information needed is stored into the input BIObject object.

Specified by:
modifyBIObjectWithoutVersioning in interface IBIObjectDAO
Parameters:
obj - The BIobject containing all modify information
Throws:
EMFUserError - If an Exception occurred
See Also:
IBIObjectDAO.modifyBIObjectWithoutVersioning(it.eng.spagobi.bo.BIObject)

insertBIObject

public void insertBIObject(BIObject obj)
                    throws EMFUserError
Description copied from interface: IBIObjectDAO
Implements the query to insert a BIObject. All information needed is stored into the input BIObject object.

Specified by:
insertBIObject in interface IBIObjectDAO
Parameters:
obj - The object containing all insert information
Throws:
EMFUserError - If an Exception occurred
See Also:
IBIObjectDAO.insertBIObject(it.eng.spagobi.bo.BIObject)

eraseBIObject

public void eraseBIObject(BIObject obj)
                   throws EMFUserError
Throws:
EMFUserError
See Also:
it.eng.spagobi.bo.dao.IBIObjectDAO#eraseBIObject(it.eng.spagobi.bo.BIObject)

fillBIObjectTemplate

public void fillBIObjectTemplate(BIObject obj)
See Also:
it.eng.spagobi.bo.dao.IBIObjectDAO#fillBIObjectTemplate(it.eng.spagobi.bo.BIObject)

loadBIObjectParametersForBIObject

public java.util.List loadBIObjectParametersForBIObject(BIObject biObject,
                                                        java.lang.String role)
                                                 throws EMFUserError
Loads all the BI object parameters referring to a given BI Object, according to the particular role.

Parameters:
biObject - The input BI Object
role - A string defining the role
Returns:
A list of all BI Object parameters associated
Throws:
EMFUserError - If any exception occurs

internalModify

private void internalModify(java.lang.Object obj,
                            boolean version)
                     throws EMFUserError
Updates the CMS repository if the user has loaded a file template. If he has, the boolean input parameter version is true and the CNS is uploaded, else not. This is the JDBC version for this method.

Parameters:
obj - A generic input object
version - The boolean input parameter
Throws:
EMFUserError - If any exception occurred

getCorrectRolesForExecution

public java.util.List getCorrectRolesForExecution(java.lang.String pathReport,
                                                  it.eng.spago.security.IEngUserProfile profile)
                                           throws EMFUserError
Throws:
EMFUserError
See Also:
it.eng.spagobi.bo.dao.IBIObjectDAO#getCorrectRolesForExecution(java.lang.String, it.eng.spago.security.IEngUserProfile)

getCorrectRolesForExecution

public java.util.List getCorrectRolesForExecution(java.lang.String pathReport)
                                           throws EMFUserError
Throws:
EMFUserError
See Also:
it.eng.spagobi.bo.dao.IBIObjectDAO#getCorrectRolesForExecution(java.lang.String)

getBIObjectParameters

public java.util.List getBIObjectParameters(BIObject aBIObject)
                                     throws EMFUserError
Description copied from interface: IBIObjectDAO
Gets the biparameters associated with to a biobject

Specified by:
getBIObjectParameters in interface IBIObjectDAO
Parameters:
aBIObject - BIObject the biobject to analize
Returns:
List, list of the biparameters associated with the biobject
Throws:
EMFUserError

loadBIObjectForExecutionByIdAndRole

public BIObject loadBIObjectForExecutionByIdAndRole(java.lang.Integer id,
                                                    java.lang.String role)
                                             throws EMFUserError
Description copied from interface: IBIObjectDAO
Loads all information for the execution of a BI Object identified by its id and its role. All these information, achived by a query to the DB, are stored into a BIObject object, which is returned.

Specified by:
loadBIObjectForExecutionByIdAndRole in interface IBIObjectDAO
Parameters:
id - The BI object id
role - The BI object role
Returns:
The BIobject execution information, stored into a BIObject
Throws:
EMFUserError - If an Exception occurs

loadBIObjectById

public BIObject loadBIObjectById(java.lang.Integer biObjectID)
                          throws EMFUserError
Description copied from interface: IBIObjectDAO
Loads all detail information for a BI Object identified by its biObjectID identifier. All these information, achived by a query to the DB, are stored into a BIObject object, which is returned.

Specified by:
loadBIObjectById in interface IBIObjectDAO
Parameters:
biObjectID - the BI object identifier
Returns:
The BI object detail information, stored into a BIObject
Throws:
EMFUserError - If an Exception occurs

loadAllBIObjects

public java.util.List loadAllBIObjects()
                                throws EMFUserError
Description copied from interface: IBIObjectDAO
Loads all the BIObjects

Specified by:
loadAllBIObjects in interface IBIObjectDAO
Returns:
the list of BIObjects
Throws:
EMFUserError - If an Exception occurred

getCorrectRolesForExecution

public java.util.List getCorrectRolesForExecution(java.lang.Integer id,
                                                  it.eng.spago.security.IEngUserProfile profile)
                                           throws EMFUserError
Description copied from interface: IBIObjectDAO
Given the id for a report and the user profile, gets the corret roles for execution.

Specified by:
getCorrectRolesForExecution in interface IBIObjectDAO
Parameters:
id - The Integer id for the report
profile - The user profile
Returns:
The list of correct roles for execution
Throws:
EMFUserError - If an Exception occurred

getCorrectRolesForExecution

public java.util.List getCorrectRolesForExecution(java.lang.Integer id)
                                           throws EMFUserError
Description copied from interface: IBIObjectDAO
Gets the correct roles for Report execution, given only the Report's id.

Specified by:
getCorrectRolesForExecution in interface IBIObjectDAO
Parameters:
id - The Integer id for the report
Returns:
The list of correct roles for execution
Throws:
EMFUserError - If an Exception occurred

loadBIObjectForTree

public BIObject loadBIObjectForTree(java.lang.Integer id)
                             throws EMFUserError
Description copied from interface: IBIObjectDAO
Loads all tree information for a BI Object identified by its id identifier Integer. All these information, achived by a query to the DB, are stored into a BIObject object, which is returned.

Specified by:
loadBIObjectForTree in interface IBIObjectDAO
Parameters:
id - The Integer representing the BI object id
Returns:
The BI object tree information, stored into a BIObject
Throws:
EMFUserError - If an Exception occurs

eraseBIObject

public void eraseBIObject(BIObject obj,
                          java.lang.Integer idFunct)
                   throws EMFUserError
Description copied from interface: IBIObjectDAO
Deletes a BIObject from a functionality. Then, if the BIObject is no more referenced in any functionality, deletes it completely from db and from CMS

Specified by:
eraseBIObject in interface IBIObjectDAO
Parameters:
obj - The object containing all delete information
idFunct - The Integer representing the functionality id
Throws:
EMFUserError - If an Exception occurred

loadBIObjectByLabel

public BIObject loadBIObjectByLabel(java.lang.String label)
                             throws EMFUserError
Description copied from interface: IBIObjectDAO
Loads all detail information for a BI Object identified by its label identifier. All these information, achived by a query to the DB, are stored into a BIObject object, which is returned.

Specified by:
loadBIObjectByLabel in interface IBIObjectDAO
Parameters:
label - The BI object label identifier
Returns:
The BI object detail information, stored into a BIObject
Throws:
EMFUserError - If an Exception occurs

loadAllBIObjectsFromInitialPath

public java.util.List loadAllBIObjectsFromInitialPath(java.lang.String initialPath)
                                               throws EMFUserError
Description copied from interface: IBIObjectDAO
Loads all the BIObjects that belong to sub functionalities of the given functionality path

Specified by:
loadAllBIObjectsFromInitialPath in interface IBIObjectDAO
Returns:
the list of BIObjects
Throws:
EMFUserError - If an Exception occurred