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

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.analiticalmodel.document.dao.BIObjectDAOHibImpl
All Implemented Interfaces:
IBIObjectDAO

public class BIObjectDAOHibImpl
extends AbstractHibernateDAO
implements IBIObjectDAO

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


Field Summary
static java.lang.String COLUMN_DATE
           
static java.lang.String COLUMN_ENGINE
           
static java.lang.String COLUMN_LABEL
           
static java.lang.String COLUMN_NAME
           
static java.lang.String COLUMN_STATE
           
static java.lang.String CONTAINS
           
static java.lang.String END_WITH
           
static java.lang.String EQUALS_OR_GREATER_THAN
           
static java.lang.String EQUALS_OR_LESS_THAN
           
static java.lang.String EQUALS_TO
           
static java.lang.String GREATER_THAN
           
static java.lang.String IS_NULL
           
static java.lang.String LESS_THAN
           
static java.lang.String NOT_CONTAINS
           
static java.lang.String NOT_ENDS_WITH
           
static java.lang.String NOT_EQUALS_TO
           
static java.lang.String NOT_NULL
           
static java.lang.String SCOPE_NODE
           
static java.lang.String START_WITH
           
 
Constructor Summary
BIObjectDAOHibImpl()
           
 
Method Summary
 void eraseBIObject(BIObject obj, java.lang.Integer idFunct)
          Erase bi object.
 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 execution.
 java.util.List getCorrectRolesForExecution(java.lang.Integer id, it.eng.spago.security.IEngUserProfile profile)
          Gets the correct roles for execution.
 void insertBIObject(BIObject obj)
          Implements the query to insert a BIObject.
 void insertBIObject(BIObject obj, boolean loadParsDC)
          Implements the query to insert a BIObject.
 void insertBIObject(BIObject obj, ObjTemplate objTemp)
          Implements the query to insert a BIObject.
 void insertBIObject(BIObject obj, ObjTemplate objTemp, boolean loadParsDC)
          Implements the query to insert a BIObject and its template.
 java.util.List loadAllBIObjects()
          Loads all the BIObjects.
 java.util.List loadAllBIObjects(java.lang.String filterOrder)
          Loads all the BIObjects ordered by parameter column.
 java.util.List loadAllBIObjectsFromInitialPath(java.lang.String initialPath)
          Loads all the BIObjects that belong to sub functionalities of the given functionality path.
 java.util.List loadAllBIObjectsFromInitialPath(java.lang.String initialPath, java.lang.String filterOrder)
          Loads all the BIObjects that belong to sub functionalities of the given functionality path and ordered by parameter column.
 BIObject loadBIObjectById(java.lang.Integer biObjectID)
          Load bi object by id.
 BIObject loadBIObjectByLabel(java.lang.String label)
          Load bi object by label.
 BIObject loadBIObjectForDetail(java.lang.Integer id)
          Load bi object for detail.
 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)
          Load bi object for execution by id and role.
 BIObject loadBIObjectForTree(java.lang.Integer id)
          Load bi object for tree.
 java.util.List loadBIObjects(java.lang.Integer folderID, it.eng.spago.security.IEngUserProfile profile)
          Loads visible objects of the user roles
 java.util.List loadBIObjects(java.lang.String type, java.lang.String state, java.lang.String folderPath)
          Loads all the BIObjects filtering with the input parameters.
 void modifyBIObject(BIObject obj)
          Modify bi object.
 void modifyBIObject(BIObject obj, boolean loadParsDC)
          Modify bi object.
 void modifyBIObject(BIObject obj, ObjTemplate objTemp)
          Modify bi object.
 void modifyBIObject(BIObject obj, ObjTemplate objTemp, boolean loadParsDC)
          Modify bi object.
 java.util.List searchBIObjects(java.lang.String valueFilter, java.lang.String typeFilter, java.lang.String columnFilter, java.lang.String scope, java.lang.Integer nodeFilter, it.eng.spago.security.IEngUserProfile profile)
          Search objects with the features specified
 BIObject toBIObject(SbiObjects hibBIObject)
          From the Hibernate BI object at input, gives the corrispondent BI object.
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
getSession, logException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_LABEL

public static final java.lang.String COLUMN_LABEL
See Also:
Constant Field Values

COLUMN_NAME

public static final java.lang.String COLUMN_NAME
See Also:
Constant Field Values

COLUMN_ENGINE

public static final java.lang.String COLUMN_ENGINE
See Also:
Constant Field Values

COLUMN_STATE

public static final java.lang.String COLUMN_STATE
See Also:
Constant Field Values

COLUMN_DATE

public static final java.lang.String COLUMN_DATE
See Also:
Constant Field Values

SCOPE_NODE

public static final java.lang.String SCOPE_NODE
See Also:
Constant Field Values

START_WITH

public static final java.lang.String START_WITH
See Also:
Constant Field Values

END_WITH

public static final java.lang.String END_WITH
See Also:
Constant Field Values

NOT_EQUALS_TO

public static final java.lang.String NOT_EQUALS_TO
See Also:
Constant Field Values

EQUALS_TO

public static final java.lang.String EQUALS_TO
See Also:
Constant Field Values

CONTAINS

public static final java.lang.String CONTAINS
See Also:
Constant Field Values

LESS_THAN

public static final java.lang.String LESS_THAN
See Also:
Constant Field Values

EQUALS_OR_GREATER_THAN

public static final java.lang.String EQUALS_OR_GREATER_THAN
See Also:
Constant Field Values

GREATER_THAN

public static final java.lang.String GREATER_THAN
See Also:
Constant Field Values

EQUALS_OR_LESS_THAN

public static final java.lang.String EQUALS_OR_LESS_THAN
See Also:
Constant Field Values

NOT_ENDS_WITH

public static final java.lang.String NOT_ENDS_WITH
See Also:
Constant Field Values

NOT_CONTAINS

public static final java.lang.String NOT_CONTAINS
See Also:
Constant Field Values

IS_NULL

public static final java.lang.String IS_NULL
See Also:
Constant Field Values

NOT_NULL

public static final java.lang.String NOT_NULL
See Also:
Constant Field Values
Constructor Detail

BIObjectDAOHibImpl

public BIObjectDAOHibImpl()
Method Detail

loadBIObjectForExecutionByIdAndRole

public BIObject loadBIObjectForExecutionByIdAndRole(java.lang.Integer id,
                                                    java.lang.String role)
                                             throws it.eng.spago.error.EMFUserError
Load bi object for execution by id and role.

Specified by:
loadBIObjectForExecutionByIdAndRole in interface IBIObjectDAO
Parameters:
id - the id
role - the role
Returns:
the BI object
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.loadBIObjectForExecutionByIdAndRole(java.lang.Integer, java.lang.String)

loadBIObjectById

public BIObject loadBIObjectById(java.lang.Integer biObjectID)
                          throws it.eng.spago.error.EMFUserError
Load bi object by id.

Specified by:
loadBIObjectById in interface IBIObjectDAO
Parameters:
biObjectID - the bi object id
Returns:
the BI object
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.loadBIObjectById(java.lang.Integer)

loadBIObjectForDetail

public BIObject loadBIObjectForDetail(java.lang.Integer id)
                               throws it.eng.spago.error.EMFUserError
Load bi object for detail.

Specified by:
loadBIObjectForDetail in interface IBIObjectDAO
Parameters:
id - the id
Returns:
the BI object
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.loadBIObjectForDetail(java.lang.Integer)

loadBIObjectByLabel

public BIObject loadBIObjectByLabel(java.lang.String label)
                             throws it.eng.spago.error.EMFUserError
Load bi object by label.

Specified by:
loadBIObjectByLabel in interface IBIObjectDAO
Parameters:
label - the label
Returns:
the BI object
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.loadBIObjectByLabel(java.lang.String)

loadBIObjectForTree

public BIObject loadBIObjectForTree(java.lang.Integer id)
                             throws it.eng.spago.error.EMFUserError
Load bi object for tree.

Specified by:
loadBIObjectForTree in interface IBIObjectDAO
Parameters:
id - the id
Returns:
the BI object
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.loadBIObjectForTree(java.lang.Integer)

modifyBIObject

public void modifyBIObject(BIObject obj)
                    throws it.eng.spago.error.EMFUserError
Modify bi object.

Specified by:
modifyBIObject in interface IBIObjectDAO
Parameters:
obj - the obj
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.modifyBIObject(it.eng.spagobi.analiticalmodel.document.bo.BIObject)

modifyBIObject

public void modifyBIObject(BIObject obj,
                           boolean loadParsDC)
                    throws it.eng.spago.error.EMFUserError
Modify bi object.

Specified by:
modifyBIObject in interface IBIObjectDAO
Parameters:
obj - the obj
loadParsDC - boolean for management Document Composition params
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.modifyBIObject(it.eng.spagobi.analiticalmodel.document.bo.BIObject)

modifyBIObject

public void modifyBIObject(BIObject obj,
                           ObjTemplate objTemp)
                    throws it.eng.spago.error.EMFUserError
Modify bi object.

Specified by:
modifyBIObject in interface IBIObjectDAO
Parameters:
obj - the obj
objTemp - the obj temp
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.document.dao.IBIObjectDAO#modifyBIObjectWithoutVersioning(it.eng.spagobi.analiticalmodel.document.bo.BIObject)

modifyBIObject

public void modifyBIObject(BIObject obj,
                           ObjTemplate objTemp,
                           boolean loadParsDC)
                    throws it.eng.spago.error.EMFUserError
Modify bi object.

Specified by:
modifyBIObject in interface IBIObjectDAO
Parameters:
obj - the obj
objTemp - the obj temp
loadParsDC - boolean for management Document Composition params
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.analiticalmodel.document.dao.IBIObjectDAO#modifyBIObjectWithoutVersioning(it.eng.spagobi.analiticalmodel.document.bo.BIObject)

insertBIObject

public void insertBIObject(BIObject obj,
                           ObjTemplate objTemp,
                           boolean loadParsDC)
                    throws it.eng.spago.error.EMFUserError
Implements the query to insert a BIObject and its template. All information needed is stored into the input BIObject and ObjTemplate objects.

Specified by:
insertBIObject in interface IBIObjectDAO
Parameters:
obj - The object containing all insert information
objTemp - The template of the biobject
loadParsDC - the boolean that permit the loading of parameters of a document composition
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

insertBIObject

public void insertBIObject(BIObject obj)
                    throws it.eng.spago.error.EMFUserError
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:
it.eng.spago.error.EMFUserError - If an Exception occurred

insertBIObject

public void insertBIObject(BIObject obj,
                           boolean loadParsDC)
                    throws it.eng.spago.error.EMFUserError
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
loadParsDC - boolean for management Document Composition params
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

insertBIObject

public void insertBIObject(BIObject obj,
                           ObjTemplate objTemp)
                    throws it.eng.spago.error.EMFUserError
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
loadParsDC - boolean for management Document Composition params
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

eraseBIObject

public void eraseBIObject(BIObject obj,
                          java.lang.Integer idFunct)
                   throws it.eng.spago.error.EMFUserError
Erase bi object.

Specified by:
eraseBIObject in interface IBIObjectDAO
Parameters:
obj - the obj
idFunct - the id funct
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.eraseBIObject(it.eng.spagobi.analiticalmodel.document.bo.BIObject, java.lang.Integer)

getCorrectRolesForExecution

public java.util.List getCorrectRolesForExecution(java.lang.Integer id,
                                                  it.eng.spago.security.IEngUserProfile profile)
                                           throws it.eng.spago.error.EMFUserError
Gets the correct roles for execution.

Specified by:
getCorrectRolesForExecution in interface IBIObjectDAO
Parameters:
id - the id
profile - the profile
Returns:
the correct roles for execution
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.getCorrectRolesForExecution(java.lang.Integer, it.eng.spago.security.IEngUserProfile)

getCorrectRolesForExecution

public java.util.List getCorrectRolesForExecution(java.lang.Integer id)
                                           throws it.eng.spago.error.EMFUserError
Gets the correct roles for execution.

Specified by:
getCorrectRolesForExecution in interface IBIObjectDAO
Parameters:
id - the id
Returns:
the correct roles for execution
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IBIObjectDAO.getCorrectRolesForExecution(java.lang.Integer)

toBIObject

public BIObject toBIObject(SbiObjects hibBIObject)
From the Hibernate BI object at input, gives the corrispondent BI object.

Parameters:
hibBIObject - The Hibernate BI object
Returns:
the corrispondent output BIObject

loadAllBIObjects

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

Specified by:
loadAllBIObjects in interface IBIObjectDAO
Returns:
the list of BIObjects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAllBIObjects

public java.util.List loadAllBIObjects(java.lang.String filterOrder)
                                throws it.eng.spago.error.EMFUserError
Description copied from interface: IBIObjectDAO
Loads all the BIObjects ordered by parameter column.

Specified by:
loadAllBIObjects in interface IBIObjectDAO
Parameters:
filterOrder - the filter order
Returns:
the list of BIObjects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

getBIObjectParameters

public java.util.List getBIObjectParameters(BIObject aBIObject)
                                     throws it.eng.spago.error.EMFUserError
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:
it.eng.spago.error.EMFUserError - the EMF user error

loadAllBIObjectsFromInitialPath

public java.util.List loadAllBIObjectsFromInitialPath(java.lang.String initialPath)
                                               throws it.eng.spago.error.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
Parameters:
initialPath - the initial path
Returns:
the list of BIObjects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAllBIObjectsFromInitialPath

public java.util.List loadAllBIObjectsFromInitialPath(java.lang.String initialPath,
                                                      java.lang.String filterOrder)
                                               throws it.eng.spago.error.EMFUserError
Description copied from interface: IBIObjectDAO
Loads all the BIObjects that belong to sub functionalities of the given functionality path and ordered by parameter column.

Specified by:
loadAllBIObjectsFromInitialPath in interface IBIObjectDAO
Parameters:
initialPath - the initial path
filterOrder - the filter order
Returns:
the list of BIObjects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadBIObjectForDetail

public BIObject loadBIObjectForDetail(java.lang.String path)
                               throws it.eng.spago.error.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
Parameters:
path - the path
Returns:
The BI object detail information, stored into a BIObject
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurs

loadBIObjects

public java.util.List loadBIObjects(java.lang.String type,
                                    java.lang.String state,
                                    java.lang.String folderPath)
                             throws it.eng.spago.error.EMFUserError
Description copied from interface: IBIObjectDAO
Loads all the BIObjects filtering with the input parameters.

Specified by:
loadBIObjects in interface IBIObjectDAO
Parameters:
type - the type of the biobjects (DASH/REPORT/OLAP...); if it is null, all types will be considered
state - the type of the biobjects (REL/DEV...); if it is null, all states will be considered
folderPath - the path of the folder; if it is null, all folders will be considered
Returns:
the list of BIObjects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadBIObjects

public java.util.List loadBIObjects(java.lang.Integer folderID,
                                    it.eng.spago.security.IEngUserProfile profile)
                             throws it.eng.spago.error.EMFUserError
Loads visible objects of the user roles

Specified by:
loadBIObjects in interface IBIObjectDAO
Parameters:
folderID -
profile - the profile of the user
Returns:
Throws:
it.eng.spago.error.EMFUserError

searchBIObjects

public java.util.List searchBIObjects(java.lang.String valueFilter,
                                      java.lang.String typeFilter,
                                      java.lang.String columnFilter,
                                      java.lang.String scope,
                                      java.lang.Integer nodeFilter,
                                      it.eng.spago.security.IEngUserProfile profile)
                               throws it.eng.spago.error.EMFUserError
Search objects with the features specified

Specified by:
searchBIObjects in interface IBIObjectDAO
Parameters:
valueFilter - the value of the filter for the research
typeFilter - the type of the filter (the operator: equals, starts...)
columnFilter - the column on which the filter is applied
nodeFilter - the node (folder id) on which the filter is applied
profile - the profile of the user
Returns:
Throws:
it.eng.spago.error.EMFUserError