Package lumis.portal.page
Class PageDaoHib
- java.lang.Object
-
- lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao<PageConfig,java.lang.String>
-
- lumis.portal.page.PageDaoHib
-
- All Implemented Interfaces:
IPageDao
public class PageDaoHib extends GenericHibernateManualUpdateDao<PageConfig,java.lang.String> implements IPageDao
- Since:
- 4.0.0
- Version:
- $Revision$ $Date$
-
-
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(java.lang.String pageId, java.lang.String cssId, int position, ITransaction transaction)
boolean
delete(java.lang.String pageId, ITransaction transaction)
Deletes the bean with the given id from persistence.void
deleteCss(java.lang.String pageId, java.lang.String cssId, ITransaction transaction)
Delete the CSS from the page.void
evict(java.lang.String pageId, ITransaction transaction)
Evicts the bean with the given id from the second-level cache.PageConfig
get(java.lang.String pageId, ITransaction transaction)
Returns the bean with the given id.java.util.List<IChannelChild>
getChannelsChildren(java.lang.String parentChannelIds, boolean hidePages, boolean hidePageTemplates, IResource resource, java.util.Locale locale, ITransaction transaction)
java.util.List<IChannelChild>
getChildrenData(java.lang.String channelId, int hidePages, int hidePageTemplates, IResource resource, java.util.Locale locale, ITransaction transaction)
PageConfig
getCommitted(java.lang.String pageId, ITransaction transaction)
Get the lastest committed version of the page.java.util.List<java.lang.String>
getCssIds(java.lang.String pageId, ITransaction transaction)
Get the ids of the page's CSS.java.lang.String
getFirstIdByChannelId(java.lang.String channelId, ITransaction transaction)
Get the id of the first child page.java.lang.String
getIdByUserId(java.lang.String userId, ITransaction transaction)
Get the id of the user's home page.protected java.lang.String
getIdentifier(PageConfig bean)
java.util.List<java.lang.String>
getIdsByChannelId(java.lang.String channelId, ITransaction transaction)
Get the list of page's ids given the channel's id.java.util.Collection<java.lang.String>
getIdsByParentTemplateId(java.lang.String parentTemplateId, ITransaction transaction)
Add the CSS to the page.java.util.Collection<java.lang.String>
getIdsByServiceInstanceId(java.lang.String serviceInstanceId, ITransaction transaction)
boolean
hasDependentPages(java.lang.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 java.lang.String getIdentifier(PageConfig bean)
- Specified by:
getIdentifier
in classGenericHibernateManualUpdateDao<PageConfig,java.lang.String>
-
get
public PageConfig get(java.lang.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,java.lang.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(java.lang.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,java.lang.String>
- Parameters:
pageConfig
- the bean to be added.transaction
- the transaction for persistence access.- Throws:
DaoException
PortalException
-
delete
public boolean delete(java.lang.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,java.lang.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,java.lang.String>
- Throws:
DaoException
PortalException
-
evict
public void evict(java.lang.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,java.lang.String>
- Parameters:
pageId
- the bean identifier.transaction
- the transaction for persistence access.- Throws:
PortalException
-
getFirstIdByChannelId
public java.lang.String getFirstIdByChannelId(java.lang.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 java.lang.String getIdByUserId(java.lang.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 java.util.List<java.lang.String> getIdsByChannelId(java.lang.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 java.util.Collection<java.lang.String> getIdsByParentTemplateId(java.lang.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 java.util.Collection<java.lang.String> getIdsByServiceInstanceId(java.lang.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(java.lang.String pageTemplateId, ITransaction transaction) throws DaoException, PortalException
- Specified by:
hasDependentPages
in interfaceIPageDao
- Throws:
DaoException
PortalException
-
addCss
public void addCss(java.lang.String pageId, java.lang.String cssId, int position, ITransaction transaction) throws DaoException, PortalException
- Specified by:
addCss
in interfaceIPageDao
- Throws:
DaoException
PortalException
-
deleteCss
public void deleteCss(java.lang.String pageId, java.lang.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 java.util.List<java.lang.String> getCssIds(java.lang.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 java.util.List<IChannelChild> getChannelsChildren(java.lang.String parentChannelIds, boolean hidePages, boolean hidePageTemplates, IResource resource, java.util.Locale locale, ITransaction transaction) throws PortalException
- Specified by:
getChannelsChildren
in interfaceIPageDao
- Throws:
PortalException
-
getChildrenData
public java.util.List<IChannelChild> getChildrenData(java.lang.String channelId, int hidePages, int hidePageTemplates, IResource resource, java.util.Locale locale, ITransaction transaction) throws DaoException, PortalException
- Specified by:
getChildrenData
in interfaceIPageDao
- Throws:
DaoException
PortalException
-
-