public class PageDaoHib extends GenericHibernateManualUpdateDao<PageConfig,String> implements IPageDao
Constructor and Description |
---|
PageDaoHib() |
Modifier and Type | Method and 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.
|
addOrUpdate, exists, findByCriteria, findByCriteria, getPersistentClass, setReadOnly
protected String getIdentifier(PageConfig bean)
getIdentifier
in class GenericHibernateManualUpdateDao<PageConfig,String>
public PageConfig get(String pageId, ITransaction transaction) throws PortalException
GenericHibernateManualUpdateDao
get
in interface IPageDao
get
in class GenericHibernateManualUpdateDao<PageConfig,String>
pageId
- the bean's id.transaction
- the transaction for persistence access. Must be
a ITransactionHibernate
.DaoException
PortalException
public PageConfig getCommitted(String pageId, ITransaction transaction) throws PortalException
IPageDao
getCommitted
in interface IPageDao
pageId
- the page id.transaction
- the transaction for persistence access.PortalException
#get(String, ITransaction)}
public void add(PageConfig pageConfig, ITransaction transaction) throws DaoException, PortalException
GenericHibernateManualUpdateDao
add
in interface IPageDao
add
in class GenericHibernateManualUpdateDao<PageConfig,String>
pageConfig
- the bean to be added.transaction
- the transaction for persistence access.DaoException
PortalException
public boolean delete(String pageId, ITransaction transaction) throws DaoException, PortalException
GenericHibernateManualUpdateDao
delete
in interface IPageDao
delete
in class GenericHibernateManualUpdateDao<PageConfig,String>
pageId
- the bean's id.transaction
- the transaction for persistence access. Must be
a ITransactionHibernate
.DaoException
PortalException
public void update(PageConfig pageConfig, ITransaction transaction) throws DaoException, PortalException
IPageDao
update
in interface IPageDao
update
in class GenericHibernateManualUpdateDao<PageConfig,String>
DaoException
PortalException
public void evict(String pageId, ITransaction transaction) throws PortalException
GenericHibernateManualUpdateDao
evict
in interface IPageDao
evict
in class GenericHibernateManualUpdateDao<PageConfig,String>
pageId
- the bean identifier.transaction
- the transaction for persistence access.PortalException
public String getFirstIdByChannelId(String channelId, ITransaction transaction) throws DaoException, PortalException
IPageDao
getFirstIdByChannelId
in interface IPageDao
DaoException
PortalException
public String getIdByUserId(String userId, ITransaction transaction) throws DaoException, PortalException
IPageDao
getIdByUserId
in interface IPageDao
DaoException
PortalException
public List<String> getIdsByChannelId(String channelId, ITransaction transaction) throws DaoException, PortalException
IPageDao
getIdsByChannelId
in interface IPageDao
DaoException
PortalException
public Collection<String> getIdsByParentTemplateId(String parentTemplateId, ITransaction transaction) throws DaoException, PortalException
IPageDao
getIdsByParentTemplateId
in interface IPageDao
DaoException
PortalException
public Collection<String> getIdsByServiceInstanceId(String serviceInstanceId, ITransaction transaction) throws DaoException, PortalException
getIdsByServiceInstanceId
in interface IPageDao
serviceInstanceId
- the id of the service instance.transaction
- the transaction for persistence access.DaoException
PortalException
public boolean hasDependentPages(String pageTemplateId, ITransaction transaction) throws DaoException, PortalException
hasDependentPages
in interface IPageDao
DaoException
PortalException
public void addCss(String pageId, String cssId, int position, ITransaction transaction) throws DaoException, PortalException
addCss
in interface IPageDao
DaoException
PortalException
public void deleteCss(String pageId, String cssId, ITransaction transaction) throws DaoException, PortalException
IPageDao
deleteCss
in interface IPageDao
DaoException
PortalException
public List<String> getCssIds(String pageId, ITransaction transaction) throws DaoException, PortalException
IPageDao
getCssIds
in interface IPageDao
DaoException
PortalException
public List<IChannelChild> getChannelsChildren(String parentChannelIds, boolean hidePages, boolean hidePageTemplates, IResource resource, Locale locale, ITransaction transaction) throws PortalException
getChannelsChildren
in interface IPageDao
PortalException
public List<IChannelChild> getChildrenData(String channelId, int hidePages, int hidePageTemplates, IResource resource, Locale locale, ITransaction transaction) throws DaoException, PortalException
getChildrenData
in interface IPageDao
DaoException
PortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.