it.eng.spagobi.bo.dao.hibernate
Class LovDAOHibImpl

java.lang.Object
  extended by it.eng.spagobi.bo.dao.hibernate.AbstractHibernateDAO
      extended by it.eng.spagobi.bo.dao.hibernate.LovDAOHibImpl
All Implemented Interfaces:
IModalitiesValueDAO

public class LovDAOHibImpl
extends AbstractHibernateDAO
implements IModalitiesValueDAO

Defines the Hibernate implementations for all DAO methods, for a list of values.

Author:
sulis

Constructor Summary
LovDAOHibImpl()
           
 
Method Summary
 void eraseModalitiesValue(ModalitiesValue aModalitiesValue)
          Implements the query to erase a value.
 boolean hasParameters(java.lang.String lovId)
          Controls if a value in the predefined LOV is associated or not with a parameter.
 void insertModalitiesValue(ModalitiesValue aModalitiesValue)
          Implements the query to insert a value.
 java.util.List loadAllModalitiesValue()
          Loads all detail information for all values .
 java.util.List loadAllModalitiesValueOrderByCode()
          Select all ModalitiesValue object ordered by code
 ModalitiesValue loadModalitiesValueByID(java.lang.Integer modalitiesValueID)
          Loads all detail information for an value identified by its modalitiesValueID.
 ModalitiesValue loadModalitiesValueByLabel(java.lang.String label)
          Loads all detail information for a lov by its label.
 void modifyModalitiesValue(ModalitiesValue aModalitiesValue)
          Implements the query to modify a value.
private  ModalitiesValue toModalityValue(SbiLov hibLov)
          From the hibernate LOV at input, gives the corrispondent ModalitiesValue object.
 
Methods inherited from class it.eng.spagobi.bo.dao.hibernate.AbstractHibernateDAO
getSession, logException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LovDAOHibImpl

public LovDAOHibImpl()
Method Detail

loadModalitiesValueByID

public ModalitiesValue loadModalitiesValueByID(java.lang.Integer modalitiesValueID)
                                        throws EMFUserError
Description copied from interface: IModalitiesValueDAO
Loads all detail information for an value identified by its modalitiesValueID. All these information, achived by a query to the DB, are stored into a ModalitiesValue object, which is returned.

Specified by:
loadModalitiesValueByID in interface IModalitiesValueDAO
Parameters:
modalitiesValueID - The id for the value to load
Returns:
A ModalitiesValue object containing all loaded information
Throws:
EMFUserError - If an Exception occurred
See Also:
IModalitiesValueDAO.loadModalitiesValueByID(Integer)

loadModalitiesValueByLabel

public ModalitiesValue loadModalitiesValueByLabel(java.lang.String label)
                                           throws EMFUserError
Description copied from interface: IModalitiesValueDAO
Loads all detail information for a lov by its label. All these information, achived by a query to the DB, are stored into a ModalitiesValue object, which is returned.

Specified by:
loadModalitiesValueByLabel in interface IModalitiesValueDAO
Parameters:
label - The label for the value to load
Returns:
A ModalitiesValue object containing all loaded information
Throws:
EMFUserError - If an Exception occurred
See Also:
IModalitiesValueDAO.loadModalitiesValueByID(Integer)

modifyModalitiesValue

public void modifyModalitiesValue(ModalitiesValue aModalitiesValue)
                           throws EMFUserError
Description copied from interface: IModalitiesValueDAO
Implements the query to modify a value. All information needed is stored into the input ModalitiesValue object.

Specified by:
modifyModalitiesValue in interface IModalitiesValueDAO
Parameters:
aModalitiesValue - The object containing all modify information
Throws:
EMFUserError - If an Exception occurred
See Also:
IModalitiesValueDAO.modifyModalitiesValue(it.eng.spagobi.bo.ModalitiesValue)

insertModalitiesValue

public void insertModalitiesValue(ModalitiesValue aModalitiesValue)
                           throws EMFUserError
Description copied from interface: IModalitiesValueDAO
Implements the query to insert a value. All information needed is stored into the input ModalitiesValue object.

Specified by:
insertModalitiesValue in interface IModalitiesValueDAO
Parameters:
aModalitiesValue - The object containing all insert information
Throws:
EMFUserError - If an Exception occurred
See Also:
IModalitiesValueDAO.insertModalitiesValue(it.eng.spagobi.bo.ModalitiesValue)

eraseModalitiesValue

public void eraseModalitiesValue(ModalitiesValue aModalitiesValue)
                          throws EMFUserError
Description copied from interface: IModalitiesValueDAO
Implements the query to erase a value. All information needed is stored into the input ModalitiesValue object.

Specified by:
eraseModalitiesValue in interface IModalitiesValueDAO
Parameters:
aModalitiesValue - The object containing all delete information
Throws:
EMFUserError - If an Exception occurred
See Also:
IModalitiesValueDAO.eraseModalitiesValue(it.eng.spagobi.bo.ModalitiesValue)

loadAllModalitiesValue

public java.util.List loadAllModalitiesValue()
                                      throws EMFUserError
Description copied from interface: IModalitiesValueDAO
Loads all detail information for all values . All these information, achived by a query to the DB, are stored into a list of ModalitiesValue objects, which is returned.

Specified by:
loadAllModalitiesValue in interface IModalitiesValueDAO
Returns:
The list containing all values
Throws:
EMFUserError - If an exception occurs
See Also:
IModalitiesValueDAO.loadAllModalitiesValue()

loadAllModalitiesValueOrderByCode

public java.util.List loadAllModalitiesValueOrderByCode()
                                                 throws EMFUserError
Description copied from interface: IModalitiesValueDAO
Select all ModalitiesValue object ordered by code

Specified by:
loadAllModalitiesValueOrderByCode in interface IModalitiesValueDAO
Throws:
EMFUserError - If an Exception occurred
See Also:
IModalitiesValueDAO.loadAllModalitiesValueOrderByCode()

hasParameters

public boolean hasParameters(java.lang.String lovId)
                      throws EMFUserError
Description copied from interface: IModalitiesValueDAO
Controls if a value in the predefined LOV is associated or not with a parameter. It is useful because a Value can be deleted only if it hasn't any parameter associated.

Specified by:
hasParameters in interface IModalitiesValueDAO
Parameters:
lovId - The value id
Returns:
True if the value has one or more parameters associated; false if it hasn't any
Throws:
EMFUserError - If an Exception occurred
See Also:
IModalitiesValueDAO.hasParameters(java.lang.String)

toModalityValue

private ModalitiesValue toModalityValue(SbiLov hibLov)
From the hibernate LOV at input, gives the corrispondent ModalitiesValue object.

Parameters:
hiObjPar - The hybernate LOV
Returns:
The corrispondent ModalitiesValue object