Class SpaceDeletionSqlScriptsRunner
java.lang.Object
com.atlassian.confluence.impl.space.deletion.backgrounddeletion.dao.SpaceDeletionSqlScriptsRunner
Prepares SQL scripts for data deletion and retrieving.
- Since:
- 9.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteRecords(String referencingColumnName, String tableName, Collection<Long> ids, Class entityClass) getDbLinks(String parentIdColumnName, String tableName, String idColumnName, Collection<Long> ids, int queryLimit) Returns pairs between record id and parent id.getDbLinksFromContentTable(String parentIdColumnName, Collection<Long> ids, boolean onlyTopLevelPages, int queryLimit) Returns pairs between record id and parent id in CONTENT table.getDbLinksFromContentTable(String parentIdColumnName, Collection<Long> ids, int queryLimit) Returns pairs between record id and parent id in CONTENT table.
-
Constructor Details
-
SpaceDeletionSqlScriptsRunner
-
-
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 nameidColumnName- idColumnNameids- collection of parent idsqueryLimit- 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 idsqueryLimit- 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 idsonlyTopLevelPages- 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)
-