Package lumis.portal.service
Class ServiceDaoHib
- java.lang.Object
-
- lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao<ServiceConfig,String>
-
- lumis.portal.service.ServiceDaoHib
-
- All Implemented Interfaces:
IServiceDao
public class ServiceDaoHib extends GenericHibernateManualUpdateDao<ServiceConfig,String> implements IServiceDao
Class responsible for persistingServiceConfig
information.- Since:
- 4.0.0
- Version:
- $Revision: 20509 $ $Date: 2017-09-11 16:18:14 -0300 (Mon, 11 Sep 2017) $
-
-
Constructor Summary
Constructors Constructor Description ServiceDaoHib()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ServiceConfig serviceConfig, ITransaction transaction)
Adds the bean to the persistence layer.void
clearCache()
Clears the caches in this DAO.boolean
delete(String serviceId, ITransaction transaction)
Deletes the bean with the given id from persistence.ServiceConfig
get(String serviceId, ITransaction transaction)
Returns the bean with the given id.ServiceConfig
getByBaseUrl(String baseUrl, ITransaction daoTransaction)
Returns a ServiceConfig by it's baseUrl.protected String
getIdentifier(ServiceConfig serviceConfig)
Collection<String>
getServicesIds(boolean getInstantiableServicesOnly, ITransaction transaction)
Get the ids of services.void
update(ServiceConfig serviceConfig, ITransaction transaction)
Update the service.-
Methods inherited from class lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao
addOrUpdate, evict, exists, findByCriteria, findByCriteria, getPersistentClass, setReadOnly
-
-
-
-
Method Detail
-
getIdentifier
protected String getIdentifier(ServiceConfig serviceConfig)
- Specified by:
getIdentifier
in classGenericHibernateManualUpdateDao<ServiceConfig,String>
-
add
public void add(ServiceConfig serviceConfig, ITransaction transaction) throws DaoException, PortalException
Description copied from class:GenericHibernateManualUpdateDao
Adds the bean to the persistence layer.- Specified by:
add
in interfaceIServiceDao
- Overrides:
add
in classGenericHibernateManualUpdateDao<ServiceConfig,String>
- Parameters:
serviceConfig
- the bean to be added.transaction
- the transaction for persistence access.- Throws:
DaoException
PortalException
-
update
public void update(ServiceConfig serviceConfig, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IServiceDao
Update the service.- Specified by:
update
in interfaceIServiceDao
- Overrides:
update
in classGenericHibernateManualUpdateDao<ServiceConfig,String>
- Throws:
DaoException
PortalException
-
get
public ServiceConfig get(String serviceId, ITransaction transaction) throws DaoException, PortalException
Description copied from class:GenericHibernateManualUpdateDao
Returns the bean with the given id. The bean is set as read-only, so changes on it won't persist automatically.- Specified by:
get
in interfaceIServiceDao
- Overrides:
get
in classGenericHibernateManualUpdateDao<ServiceConfig,String>
- Parameters:
serviceId
- the bean's id.transaction
- the transaction for persistence access. Must be aITransactionHibernate
.- Returns:
- the bean.
- Throws:
DaoException
PortalException
-
delete
public boolean delete(String serviceId, ITransaction transaction) throws DaoException, PortalException
Description copied from class:GenericHibernateManualUpdateDao
Deletes the bean with the given id from persistence.- Specified by:
delete
in interfaceIServiceDao
- Overrides:
delete
in classGenericHibernateManualUpdateDao<ServiceConfig,String>
- Parameters:
serviceId
- the bean's id.transaction
- the transaction for persistence access. Must be aITransactionHibernate
.- Returns:
- true if the bean was deleted, or false if it did not exist
- Throws:
DaoException
PortalException
-
getServicesIds
public Collection<String> getServicesIds(boolean getInstantiableServicesOnly, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IServiceDao
Get the ids of services.- Specified by:
getServicesIds
in interfaceIServiceDao
- Returns:
- Throws:
ManagerException
PortalException
DaoException
-
getByBaseUrl
public ServiceConfig getByBaseUrl(String baseUrl, ITransaction daoTransaction) throws DaoException, PortalException
Description copied from interface:IServiceDao
Returns a ServiceConfig by it's baseUrl.- Specified by:
getByBaseUrl
in interfaceIServiceDao
- Returns:
- Throws:
DaoException
PortalException
-
clearCache
public void clearCache() throws PortalException
Description copied from interface:IServiceDao
Clears the caches in this DAO.- Specified by:
clearCache
in interfaceIServiceDao
- Throws:
PortalException
-
-