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.intGet the number of pages in a page hierarchy that have incoming links.getLinksTo(ContentEntityObject theContent) getReferringContent(ContentEntityObject content) getReferringContent(String spaceKey, List<ContentEntityObject> contents) voidremove(OutgoingLink link) Remove an object from the databasevoidMethods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
findNamedQueryStringParams, getContentStatusStringList, getStatusNames, scanFilteredContents, scanFilteredContents, updateModificationDataMethods 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, uniqueResultMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
HibernateLinkDao
public HibernateLinkDao()
-
-
Method Details
-
getPersistentClass
- Specified by:
getPersistentClassin classHibernateObjectDao<OutgoingLink>
-
countIncomingLinksForContents
public <T> Stream<T> countIncomingLinksForContents(SpaceContentEntityObject rootPage, SpaceContentEntityObject parentPage, Function<Object, T> mapper) Description copied from interface:LinkDaoHelping method to get all incoming links of multiple contents at once.- Specified by:
countIncomingLinksForContentsin 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:LinkDaoGet the number of pages in a page hierarchy that have incoming links. Note that this excludes links within the hierarchy.- Specified by:
countPagesWithIncomingLinksin interfaceLinkDao- Returns:
- number of page have incoming link
-
getLinksTo
- Specified by:
getLinksToin interfaceLinkDao
-
getReferringContent
- Specified by:
getReferringContentin interfaceLinkDao
-
getReferringContent
public List<ContentEntityObject> getReferringContent(String spaceKey, List<ContentEntityObject> contents) - Specified by:
getReferringContentin interfaceLinkDao
-
removeCorruptOutgoingLinks
public void removeCorruptOutgoingLinks()- Specified by:
removeCorruptOutgoingLinksin interfaceLinkDao
-
remove
Description copied from class:HibernateObjectDaoRemove an object from the database- Specified by:
removein interfaceLinkDao- Overrides:
removein classHibernateObjectDao<OutgoingLink>- Parameters:
link- the object to remove
-