@Internal public class AncestorsDao extends Object
Constructor and Description |
---|
AncestorsDao(org.hibernate.SessionFactory sessionFactory,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
void |
addsAncestor(@NonNull Long pageId,
@NonNull Long ancestorId,
@NonNull int position)
Adds one record to CONFANCESTORS table
|
void |
deleteAllAncestors(@NonNull Long pageId)
Deletes all ancestors for the particular page
|
void |
fixAncestorsForOnePage(Long pageId,
List<Long> ancestors)
1.
|
void |
fixPages(List<com.atlassian.confluence.pages.ancestors.PageWithAncestors> pagesToFix)
fixes a bunch of pages in one transaction
|
Map<Long,List<Long>> |
getAllChildrenFromDB(@NonNull List<Long> pageIdList)
Returns map with children, where keys are passed page ids
and values are list of corresponding children
|
Map<Long,List<Long>> |
getAncestorsFromConfancestorsTable(@NonNull List<Long> pageIdList)
getAncestorsFromConfancestorsTable reads ancestors from confancestors table in batches
It receives a list of page ids and returns a map where keys are page ids and values are lists of ancestors
Just for better performance
|
List<Long> |
getTopLevelPages(@NonNull Long spaceId)
getTopLevelPages returns a list of top-level pages in the space
top-level means that the page does not have a parent
|
public AncestorsDao(org.hibernate.SessionFactory sessionFactory, com.atlassian.event.api.EventPublisher eventPublisher)
public Map<Long,List<Long>> getAllChildrenFromDB(@NonNull List<Long> pageIdList)
pageIdList
- - list of pagespublic Map<Long,List<Long>> getAncestorsFromConfancestorsTable(@NonNull List<Long> pageIdList)
public List<Long> getTopLevelPages(@NonNull Long spaceId)
public void deleteAllAncestors(@NonNull Long pageId)
public void addsAncestor(@NonNull Long pageId, @NonNull Long ancestorId, @NonNull int position)
public void fixAncestorsForOnePage(Long pageId, List<Long> ancestors)
public void fixPages(List<com.atlassian.confluence.pages.ancestors.PageWithAncestors> pagesToFix)
Copyright © 2003–2021 Atlassian. All rights reserved.