Package lumis.portal.page
Class PageDaoHib
- java.lang.Object
-
- lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao<PageConfig,String>
-
- lumis.portal.page.PageDaoHib
-
- All Implemented Interfaces:
IPageDao
public class PageDaoHib extends GenericHibernateManualUpdateDao<PageConfig,String> implements IPageDao
- Since:
- 4.0.0
- Version:
- $Revision: 22358 $ $Date: 2019-02-05 14:54:00 -0200 (Tue, 05 Feb 2019) $
-
-
Constructor Summary
Constructors Constructor Description PageDaoHib()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(PageConfig pageConfig, ITransaction transaction)
Adds the bean to the persistence layer.void
addCss(String pageId, String cssId, int position, ITransaction transaction)
boolean
delete(String pageId, ITransaction transaction)
Deletes the bean with the given id from persistence.void
deleteCss(String pageId, String cssId, ITransaction transaction)
Delete the CSS from the page.void
evict(String pageId, ITransaction transaction)
Evicts the bean with the given id from the second-level cache.PageConfig
get(String pageId, ITransaction transaction)
Returns the bean with the given id.List<IChannelChild>
getChannelsChildren(String parentChannelIds, boolean hidePages, boolean hidePageTemplates, IResource resource, Locale locale, ITransaction transaction)
List<IChannelChild>
getChildrenData(String channelId, int hidePages, int hidePageTemplates, IResource resource, Locale locale, ITransaction transaction)
PageConfig
getCommitted(String pageId, ITransaction transaction)
Get the lastest committed version of the page.List<String>
getCssIds(String pageId, ITransaction transaction)
Get the ids of the page's CSS.String
getFirstIdByChannelId(String channelId, ITransaction transaction)
Get the id of the first child page.String
getIdByUserId(String userId, ITransaction transaction)
Get the id of the user's home page.protected String
getIdentifier(PageConfig bean)
List<String>
getIdsByChannelId(String channelId, ITransaction transaction)
Get the list of page's ids given the channel's id.Collection<String>
getIdsByParentTemplateId(String parentTemplateId, ITransaction transaction)
Add the CSS to the page.Collection<String>
getIdsByServiceInstanceId(String serviceInstanceId, ITransaction transaction)
boolean
hasDependentPages(String pageTemplateId, ITransaction transaction)
void
update(PageConfig pageConfig, ITransaction transaction)
Update the page.-
Methods inherited from class lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao
addOrUpdate, exists, findByCriteria, findByCriteria, getPersistentClass, setReadOnly
-
-
-
-
Method Detail
-
getIdentifier
protected String getIdentifier(PageConfig bean)
- Specified by:
getIdentifier
in classGenericHibernateManualUpdateDao<PageConfig,String>
-
get
public PageConfig get(String pageId, ITransaction transaction) throws 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 interfaceIPageDao
- Overrides:
get
in classGenericHibernateManualUpdateDao<PageConfig,String>
- Parameters:
pageId
- the bean's id.transaction
- the transaction for persistence access. Must be aITransactionHibernate
.- Returns:
- the bean.
- Throws:
DaoException
PortalException
-
getCommitted
public PageConfig getCommitted(String pageId, ITransaction transaction) throws PortalException
Description copied from interface:IPageDao
Get the lastest committed version of the page. Doesn't use transaction-bounded cache.- Specified by:
getCommitted
in interfaceIPageDao
- Parameters:
pageId
- the page id.transaction
- the transaction for persistence access.- Returns:
- the lastest committed version of the page.
- Throws:
PortalException
-
add
public void add(PageConfig pageConfig, ITransaction transaction) throws DaoException, PortalException
Description copied from class:GenericHibernateManualUpdateDao
Adds the bean to the persistence layer.- Specified by:
add
in interfaceIPageDao
- Overrides:
add
in classGenericHibernateManualUpdateDao<PageConfig,String>
- Parameters:
pageConfig
- the bean to be added.transaction
- the transaction for persistence access.- Throws:
DaoException
PortalException
-
delete
public boolean delete(String pageId, ITransaction transaction) throws DaoException, PortalException
Description copied from class:GenericHibernateManualUpdateDao
Deletes the bean with the given id from persistence.- Specified by:
delete
in interfaceIPageDao
- Overrides:
delete
in classGenericHibernateManualUpdateDao<PageConfig,String>
- Parameters:
pageId
- 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
-
update
public void update(PageConfig pageConfig, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IPageDao
Update the page.- Specified by:
update
in interfaceIPageDao
- Overrides:
update
in classGenericHibernateManualUpdateDao<PageConfig,String>
- Throws:
DaoException
PortalException
-
evict
public void evict(String pageId, ITransaction transaction) throws PortalException
Description copied from class:GenericHibernateManualUpdateDao
Evicts the bean with the given id from the second-level cache.- Specified by:
evict
in interfaceIPageDao
- Overrides:
evict
in classGenericHibernateManualUpdateDao<PageConfig,String>
- Parameters:
pageId
- the bean identifier.transaction
- the transaction for persistence access.- Throws:
PortalException
-
getFirstIdByChannelId
public String getFirstIdByChannelId(String channelId, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IPageDao
Get the id of the first child page.- Specified by:
getFirstIdByChannelId
in interfaceIPageDao
- Returns:
- Throws:
DaoException
PortalException
-
getIdByUserId
public String getIdByUserId(String userId, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IPageDao
Get the id of the user's home page.- Specified by:
getIdByUserId
in interfaceIPageDao
- Returns:
- Throws:
DaoException
PortalException
-
getIdsByChannelId
public List<String> getIdsByChannelId(String channelId, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IPageDao
Get the list of page's ids given the channel's id.- Specified by:
getIdsByChannelId
in interfaceIPageDao
- Returns:
- Throws:
DaoException
PortalException
-
getIdsByParentTemplateId
public Collection<String> getIdsByParentTemplateId(String parentTemplateId, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IPageDao
Add the CSS to the page.- Specified by:
getIdsByParentTemplateId
in interfaceIPageDao
- Throws:
DaoException
PortalException
-
getIdsByServiceInstanceId
public Collection<String> getIdsByServiceInstanceId(String serviceInstanceId, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getIdsByServiceInstanceId
in interfaceIPageDao
- Parameters:
serviceInstanceId
- the id of the service instance.transaction
- the transaction for persistence access.- Returns:
- the ids of the pages that contain an interface of the given service instance id.
- Throws:
DaoException
PortalException
-
hasDependentPages
public boolean hasDependentPages(String pageTemplateId, ITransaction transaction) throws DaoException, PortalException
- Specified by:
hasDependentPages
in interfaceIPageDao
- Throws:
DaoException
PortalException
-
addCss
public void addCss(String pageId, String cssId, int position, ITransaction transaction) throws DaoException, PortalException
- Specified by:
addCss
in interfaceIPageDao
- Throws:
DaoException
PortalException
-
deleteCss
public void deleteCss(String pageId, String cssId, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IPageDao
Delete the CSS from the page.- Specified by:
deleteCss
in interfaceIPageDao
- Throws:
DaoException
PortalException
-
getCssIds
public List<String> getCssIds(String pageId, ITransaction transaction) throws DaoException, PortalException
Description copied from interface:IPageDao
Get the ids of the page's CSS.- Specified by:
getCssIds
in interfaceIPageDao
- Returns:
- Throws:
DaoException
PortalException
-
getChannelsChildren
public List<IChannelChild> getChannelsChildren(String parentChannelIds, boolean hidePages, boolean hidePageTemplates, IResource resource, Locale locale, ITransaction transaction) throws PortalException
- Specified by:
getChannelsChildren
in interfaceIPageDao
- Throws:
PortalException
-
getChildrenData
public List<IChannelChild> getChildrenData(String channelId, int hidePages, int hidePageTemplates, IResource resource, Locale locale, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getChildrenData
in interfaceIPageDao
- Throws:
DaoException
PortalException
-
-