Class HibernateLinkDao
java.lang.Object
org.springframework.dao.support.DaoSupport
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<T>
com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao<OutgoingLink>
com.atlassian.confluence.links.persistence.dao.hibernate.HibernateLinkDao
- All Implemented Interfaces:
LinkDaoInternal
,LinkDao
,org.springframework.beans.factory.InitializingBean
public class HibernateLinkDao
extends ConfluenceHibernateObjectDao<OutgoingLink>
implements LinkDaoInternal
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Stream<T>
countIncomingLinksForContents
(SpaceContentEntityObject rootPage, SpaceContentEntityObject parentPage, Function<Object, T> mapper) Helping method to get all incoming links of multiple contents at once.int
Get the number of pages in a page hierarchy that have incoming links.getLinksTo
(ContentEntityObject theContent) getReferringContent
(ContentEntityObject content) getReferringContent
(String spaceKey, List<ContentEntityObject> contents) void
remove
(OutgoingLink link) Remove an object from the databasevoid
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
updateModificationData
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSessionFactory, publishEvent, reIndex, save, saveEntity, saveRaw, setHibernateTemplate, setSessionFactory, uniqueResult
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
HibernateLinkDao
public HibernateLinkDao()
-
-
Method Details
-
getPersistentClass
- Specified by:
getPersistentClass
in classHibernateObjectDao<OutgoingLink>
-
countIncomingLinksForContents
public <T> Stream<T> countIncomingLinksForContents(SpaceContentEntityObject rootPage, SpaceContentEntityObject parentPage, Function<Object, T> mapper) Description copied from interface:LinkDao
Helping method to get all incoming links of multiple contents at once.- Specified by:
countIncomingLinksForContents
in interfaceLinkDao
- Parameters:
rootPage
- The root of page hierarchyparentPage
- The direct parent pagemapper
- used to transform raw object into some DTO object at manager level- Returns:
- Stream of DTO type
-
countPagesWithIncomingLinks
Description copied from interface:LinkDao
Get the number of pages in a page hierarchy that have incoming links. Note that this excludes links within the hierarchy.- Specified by:
countPagesWithIncomingLinks
in interfaceLinkDao
- Returns:
- number of page have incoming link
-
getLinksTo
- Specified by:
getLinksTo
in interfaceLinkDao
-
getReferringContent
- Specified by:
getReferringContent
in interfaceLinkDao
-
getReferringContent
public List<ContentEntityObject> getReferringContent(String spaceKey, List<ContentEntityObject> contents) - Specified by:
getReferringContent
in interfaceLinkDao
-
removeCorruptOutgoingLinks
public void removeCorruptOutgoingLinks()- Specified by:
removeCorruptOutgoingLinks
in interfaceLinkDao
-
remove
Description copied from class:HibernateObjectDao
Remove an object from the database- Specified by:
remove
in interfaceLinkDao
- Overrides:
remove
in classHibernateObjectDao<OutgoingLink>
- Parameters:
link
- the object to remove
-