Class SpaceDeletionSqlScriptsRunner

java.lang.Object
com.atlassian.confluence.impl.space.deletion.backgrounddeletion.dao.SpaceDeletionSqlScriptsRunner

public class SpaceDeletionSqlScriptsRunner extends Object
Prepares SQL scripts for data deletion and retrieving.
Since:
9.1.0
  • Constructor Details

  • Method Details

    • getDbLinks

      public List<DbRawData> getDbLinks(String parentIdColumnName, String tableName, String idColumnName, Collection<Long> ids, int queryLimit)
      Returns pairs between record id and parent id. For example, for content perm set, there will be ID (PK) and CONTENT_ID (references to the parent).
      Parameters:
      parentIdColumnName - column name referencing to its parent (for example CONTENT_ID in content_perm table).
      tableName - table name
      idColumnName - idColumnName
      ids - collection of parent ids
      queryLimit - limit
      Returns:
      list of pairs of PK values and parent values
    • getDbLinksFromContentTable

      public List<DbRawDataForContentTable> getDbLinksFromContentTable(String parentIdColumnName, Collection<Long> ids, int queryLimit)
      Returns pairs between record id and parent id in CONTENT table. In addition, it retrieves values of the content type, and prevver fields
      Parameters:
      parentIdColumnName - column name referencing to its parent (for example CONTENT_ID in content_perm table).
      ids - collection of parent ids
      queryLimit - limit
      Returns:
      list of pairs of PK values and parent values
    • getDbLinksFromContentTable

      public List<DbRawDataForContentTable> getDbLinksFromContentTable(String parentIdColumnName, Collection<Long> ids, boolean onlyTopLevelPages, int queryLimit)
      Returns pairs between record id and parent id in CONTENT table. In addition, it retrieves values of the content type, and prevver fields
      Parameters:
      parentIdColumnName - column name referencing to its parent (for example CONTENT_ID in content_perm table).
      ids - collection of parent ids
      onlyTopLevelPages - adds and additional filter to retrieve only top level pages.
      queryLimit - limit
      Returns:
      list of pairs of PK values and parent values
    • deleteRecords

      public DeletionResult deleteRecords(String referencingColumnName, String tableName, Collection<Long> ids, Class entityClass)