Class HibernateLinkDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<T>
-
- com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<T>
-
- com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao<OutgoingLink>
-
- com.atlassian.confluence.links.persistence.dao.hibernate.HibernateLinkDao
-
- All Implemented Interfaces:
ObjectDao
,VersionedObjectDao<OutgoingLink>
,LinkDaoInternal
,ObjectDaoInternal<OutgoingLink>
,VersionedObjectDaoInternal<OutgoingLink>
,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 com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
cacheFactory, confluenceUserDao
-
-
Constructor Summary
Constructors Constructor Description HibernateLinkDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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
countPagesWithIncomingLinks(SpaceContentEntityObject rootPage)
Get the number of pages in a page hierarchy that have incoming links.List<OutgoingLink>
getLinksTo(ContentEntityObject theContent)
Class<OutgoingLink>
getPersistentClass()
Gets the type ofEntityObject
this Dao works with.List<ContentEntityObject>
getReferringContent(ContentEntityObject content)
List<ContentEntityObject>
getReferringContent(String spaceKey, List<ContentEntityObject> contents)
void
removeCorruptOutgoingLinks()
-
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
findAllSorted, findLatestVersionsCount, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, save, saveEntity, setCacheFactory, setConfluenceUserDao, updateEntityModificationData, updateModificationData
-
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findByClassIds, findByClassIdsFiltered, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSessionFactory, index, indexEntity, refresh, refreshEntity, reIndex, reIndexEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity, setEventPublisher, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, unIndexEntity, uniqueResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.internal.persistence.ObjectDaoInternal
findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, refresh, refreshEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity
-
-
-
-
Method Detail
-
getPersistentClass
public Class<OutgoingLink> getPersistentClass()
Description copied from interface:ObjectDaoInternal
Gets the type ofEntityObject
this Dao works with.- Specified by:
getPersistentClass
in interfaceObjectDao
- Specified by:
getPersistentClass
in interfaceObjectDaoInternal<OutgoingLink>
- Returns:
- the type
-
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
public int countPagesWithIncomingLinks(SpaceContentEntityObject rootPage)
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
public List<OutgoingLink> getLinksTo(ContentEntityObject theContent)
- Specified by:
getLinksTo
in interfaceLinkDao
-
getReferringContent
public List<ContentEntityObject> getReferringContent(ContentEntityObject content)
- 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
-
-