Package com.orchestranetworks.instance
Interface RepositoryAnonymizer
public interface RepositoryAnonymizer
Allows anonymizing records.
- Since:
- 5.9.0
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Provides access to a record to be anonymized, granting the privilege to modify the value of its fields. -
Method Summary
Modifier and TypeMethodDescriptionvoid
anonymizeHistory
(Consumer<RepositoryAnonymizer.RecordContext> aRecordAnonymizer) Anonymizes the history records as specified by this object.setDatasetReference
(AdaptationReference aDataset) Specifies the dataset reference in which records must be anonymized.setRecordKey
(PrimaryKey aRecordKey) Specifies the functional primary key of the records to be anonymized.setTable
(Path aTablePath, SchemaLocation aDataModel) Specifies the table to be impacted by the anonymization.
-
Method Details
-
setTable
Specifies the table to be impacted by the anonymization.- Since:
- 5.9.0
-
setDatasetReference
Specifies the dataset reference in which records must be anonymized.- Since:
- 5.9.0
- See Also:
-
setRecordKey
Specifies the functional primary key of the records to be anonymized.- Since:
- 5.9.0
-
anonymizeHistory
Anonymizes the history records as specified by this object. All the history records having the specified primary key in thespecified table
for thedataset 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; theaccept
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:
-