Interface RepositoryAnonymizer


public interface RepositoryAnonymizer
Allows anonymizing records.
Since:
5.9.0
See Also:
  • Method Details

    • setTable

      RepositoryAnonymizer setTable(Path aTablePath, SchemaLocation aDataModel)
      Specifies the table to be impacted by the anonymization.
      Since:
      5.9.0
    • setDatasetReference

      RepositoryAnonymizer setDatasetReference(AdaptationReference aDataset)
      Specifies the dataset reference in which records must be anonymized.
      Since:
      5.9.0
      See Also:
    • setRecordKey

      RepositoryAnonymizer setRecordKey(PrimaryKey aRecordKey)
      Specifies the functional primary key of the records to be anonymized.
      Since:
      5.9.0
    • anonymizeHistory

      void anonymizeHistory(Consumer<RepositoryAnonymizer.RecordContext> aRecordAnonymizer)
      Anonymizes the history records as specified by this object. All the history records having the specified primary key in the specified table for the dataset reference will be anonymized.

      Some fields cannot be modified:

      • the primary key fields of the record,
      • the history technical fields (these fields are documented in the Javadoc of the method AdaptationTable.getHistory()).

      Limitations:

      • The specified dataset must be defined in * at least one open dataspace. If it is defined only in closed * dataspaces, or has been deleted from all open dataspaces, an * IllegalStateException is thrown.
      • In case of dataset inheritance, only the specified dataset will be impacted. Its children dataset would have to be anonymized individually.

      Parameters:
      aRecordAnonymizer - Anonymization operation to be applied; the accept method will be called for every record to be anonymized.
      Throws:
      IllegalStateException - If the specification of this object is incomplete or not consistent, or if history is not activated by the data model for the specified table.
      Since:
      5.9.0
      See Also: