java.lang.Object
com.atlassian.confluence.impl.space.deletion.backgrounddeletion.erasers.GenericEraser
All Implemented Interfaces:
EntityEraser

public class GenericEraser extends Object implements EntityEraser
Eraser that can remove data from most of the tables. It cannot remove data from special tables, like CONTENT or CONFANCESTORS or OS_PROPERTYENTRY tables
Since:
9.1.0
  • Constructor Details

  • Method Details

    • getEntityClass

      public Class<?> getEntityClass()
      Description copied from interface: EntityEraser
      Get the class name of the Hibernate entity, for example, Label.class, Space.class etc. Pages, blogpost etc use just one class, ConfluenceEntityObject.
      Specified by:
      getEntityClass in interface EntityEraser
      Returns:
      hibernate entity class.
    • deleteDataRecursively

      public DeletionResult deleteDataRecursively(String parentIdColumnName, Collection<Long> ids)
      Description copied from interface: EntityEraser
      Deletes records in the table where ids in columnName are in ids list. Before this, it will call other erasers to remove their dependent data. For example, for space permissions, columnName will be SPACEID and ids will contain the list of space ids. In this case, this method will remove all space permissions where SPACEID in (ids)
      Specified by:
      deleteDataRecursively in interface EntityEraser
      Parameters:
      parentIdColumnName - column name (referencing to some other parent entity)
      ids - ids for removal (parent ids actually)
      Returns:
      deletion result (number of deleted objects and finished/not finished state)