lumis.portal.page
Class PageDaoHib

Package class diagram package PageDaoHib
java.lang.Object
  extended by lumis.portal.dao.hibernate.GenericHibernateManualUpdateDao<PageConfig,String>
      extended by lumis.portal.page.PageDaoHib
All Implemented Interfaces:
IPageDao

public class PageDaoHib
extends GenericHibernateManualUpdateDao<PageConfig,String>
implements IPageDao

Since:
4.0.0

Constructor Summary
PageDaoHib()
           
 
Method Summary
 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, findByCriteria, findByCriteria, getPersistentClass, setReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageDaoHib

public PageDaoHib()
Method Detail

getIdentifier

protected String getIdentifier(PageConfig bean)
Specified by:
getIdentifier in class GenericHibernateManualUpdateDao<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 interface IPageDao
Overrides:
get in class GenericHibernateManualUpdateDao<PageConfig,String>
Parameters:
pageId - the bean's id.
transaction - the transaction for persistence access. Must be a ITransactionHibernate.
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 interface IPageDao
Parameters:
pageId - the page id.
transaction - the transaction for persistence access.
Returns:
the lastest committed version of the page.
Throws:
PortalException
See Also:
#get(String, ITransaction)}

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 interface IPageDao
Overrides:
add in class GenericHibernateManualUpdateDao<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 interface IPageDao
Overrides:
delete in class GenericHibernateManualUpdateDao<PageConfig,String>
Parameters:
pageId - the bean's id.
transaction - the transaction for persistence access. Must be a ITransactionHibernate.
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 interface IPageDao
Overrides:
update in class GenericHibernateManualUpdateDao<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 interface IPageDao
Overrides:
evict in class GenericHibernateManualUpdateDao<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 interface IPageDao
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 interface IPageDao
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 interface IPageDao
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 interface IPageDao
Throws:
DaoException
PortalException

getIdsByServiceInstanceId

public Collection<String> getIdsByServiceInstanceId(String serviceInstanceId,
                                                    ITransaction transaction)
                                             throws DaoException,
                                                    PortalException
Specified by:
getIdsByServiceInstanceId in interface IPageDao
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 interface IPageDao
Throws:
DaoException
PortalException

addCss

public void addCss(String pageId,
                   String cssId,
                   int position,
                   ITransaction transaction)
            throws DaoException,
                   PortalException
Specified by:
addCss in interface IPageDao
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 interface IPageDao
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 interface IPageDao
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 interface IPageDao
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 interface IPageDao
Throws:
DaoException
PortalException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.