it.eng.spagobi.commons.dao
Class ConfigDAO

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.commons.dao.ConfigDAO
All Implemented Interfaces:
IConfigDAO, ISpagoBIDao

public class ConfigDAO
extends AbstractHibernateDAO
implements IConfigDAO

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

Author:
Monia Spinelli

Constructor Summary
ConfigDAO()
           
 
Method Summary
 void delete(java.lang.Integer idConfig)
          Delete config by id.
 SbiConfig fromConfig(Config config)
           
 java.util.List loadAllConfigParameters()
           
 Config loadConfigParametersById(java.lang.String id)
          Load configuration by id.
 Config loadConfigParametersByLabel(java.lang.String label)
          Load configuration by complete label.
 java.util.List loadConfigParametersByProperties(java.lang.String prop)
          Load configuration by a property node.
 void saveConfig(Config config)
          Save config by id.
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
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

ConfigDAO

public ConfigDAO()
Method Detail

loadAllConfigParameters

public java.util.List loadAllConfigParameters()
                                       throws java.lang.Exception
Specified by:
loadAllConfigParameters in interface IConfigDAO
Throws:
java.lang.Exception

loadConfigParametersById

public Config loadConfigParametersById(java.lang.String id)
                                throws java.lang.Exception
Load configuration by id.

Specified by:
loadConfigParametersById in interface IConfigDAO
Parameters:
id - the configuration id
Returns:
the config object
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
java.lang.Exception
See Also:
it.eng.spagobi.common.bo.dao.ISbiConfigDAO#loadConfigParametersById(integer)

loadConfigParametersByLabel

public Config loadConfigParametersByLabel(java.lang.String label)
                                   throws java.lang.Exception
Load configuration by complete label.

Specified by:
loadConfigParametersByLabel in interface IConfigDAO
Parameters:
label - the configuration label
Returns:
the config object
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
java.lang.Exception
See Also:
it.eng.spagobi.common.bo.dao.ISbiConfigDAO#loadConfigParametersById(string)

loadConfigParametersByProperties

public java.util.List loadConfigParametersByProperties(java.lang.String prop)
                                                throws java.lang.Exception
Load configuration by a property node.

Specified by:
loadConfigParametersByProperties in interface IConfigDAO
Parameters:
prop - the configuration label
Returns:
a list with all children of the property node
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
java.lang.Exception
See Also:
it.eng.spagobi.common.bo.dao.ISbiConfigDAO#loadConfigParametersByProperties(string)

fromConfig

public SbiConfig fromConfig(Config config)

saveConfig

public void saveConfig(Config config)
                throws it.eng.spago.error.EMFUserError
Save config by id.

Specified by:
saveConfig in interface IConfigDAO
Parameters:
id - the id
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

delete

public void delete(java.lang.Integer idConfig)
            throws it.eng.spago.error.EMFUserError
Delete config by id.

Specified by:
delete in interface IConfigDAO
Parameters:
id - the id
Throws:
it.eng.spago.error.EMFUserError - the EMF user error