it.eng.spagobi.commons.dao
Class DomainDAOHibImpl

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

public class DomainDAOHibImpl
extends AbstractHibernateDAO
implements IDomainDAO

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

Author:
zoppello e Monia Spinelli

Field Summary
 
Fields inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
TENANT_FILTER_NAME
 
Constructor Summary
DomainDAOHibImpl()
           
 
Method Summary
 void delete(java.lang.Integer idDomain)
          Delete domain by id.
 SbiDomains fromDomain(Domain Domain)
          to the hibernate domain object at input, from the corrispondent Domain object.
 Domain loadDomainByCodeAndValue(java.lang.String codeDomain, java.lang.String codeValue)
          Load domain by code and value.
 Domain loadDomainById(java.lang.Integer id)
          Load domain by id.
 java.util.List loadListDomains()
          Loads all possible domain, storing each of them into a Domain and after putting all objects into a list, which is returned.
 java.util.List loadListDomainsByType(java.lang.String domainType)
          Load list domains by type.
 SbiDomains loadSbiDomainByCodeAndValue(java.lang.String codeDomain, java.lang.String codeValue)
          Load domain by code and value.
 void saveDomain(Domain domain)
          Save domain by id.
 Domain toDomain(SbiDomains hibDomain)
          From the hibernate domain object at input, gives the corrispondent Domain object.
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
commitIfActiveAndClose, disableTenantFilter, enableTenantFilter, getSession, getTenant, getUserProfile, logException, rollbackIfActiveAndClose, setTenant, 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, setTenant, setUserID, setUserProfile
 

Constructor Detail

DomainDAOHibImpl

public DomainDAOHibImpl()
Method Detail

loadListDomainsByType

public java.util.List loadListDomainsByType(java.lang.String domainType)
                                     throws it.eng.spago.error.EMFUserError
Load list domains by type.

Specified by:
loadListDomainsByType in interface IDomainDAO
Parameters:
domainType - the domain type
Returns:
the list
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IDomainDAO.loadListDomainsByType(java.lang.String)

loadDomainByCodeAndValue

public Domain loadDomainByCodeAndValue(java.lang.String codeDomain,
                                       java.lang.String codeValue)
                                throws it.eng.spago.error.EMFUserError
Load domain by code and value.

Specified by:
loadDomainByCodeAndValue in interface IDomainDAO
Parameters:
codeDomain - the code domain
codeValue - the code value
Returns:
the domain
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IDomainDAO.loadDomainByCodeAndValue(java.lang.String, java.lang.String)

loadSbiDomainByCodeAndValue

public SbiDomains loadSbiDomainByCodeAndValue(java.lang.String codeDomain,
                                              java.lang.String codeValue)
                                       throws it.eng.spago.error.EMFUserError
Load domain by code and value.

Specified by:
loadSbiDomainByCodeAndValue in interface IDomainDAO
Parameters:
codeDomain - the code domain
codeValue - the code value
Returns:
the domain
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
IDomainDAO.loadDomainByCodeAndValue(java.lang.String, java.lang.String)

toDomain

public Domain toDomain(SbiDomains hibDomain)
From the hibernate domain object at input, gives the corrispondent Domain object.

Parameters:
hibDomain - The hybernate Domain object
Returns:
The corrispondent Domain

loadDomainById

public Domain loadDomainById(java.lang.Integer id)
                      throws it.eng.spago.error.EMFUserError
Load domain by id.

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

loadListDomains

public java.util.List loadListDomains()
                               throws it.eng.spago.error.EMFUserError
Description copied from interface: IDomainDAO
Loads all possible domain, storing each of them into a Domain and after putting all objects into a list, which is returned.

Specified by:
loadListDomains in interface IDomainDAO
Returns:
The list of all domains
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

fromDomain

public SbiDomains fromDomain(Domain Domain)
to the hibernate domain object at input, from the corrispondent Domain object.

Parameters:
Domain - object
Returns:
The corrispondent SbiDomain

saveDomain

public void saveDomain(Domain domain)
                throws it.eng.spago.error.EMFUserError
Save domain by id.

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

delete

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

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