Skip to main content

User Defined Classes Overview


Conversions of input sources, Transformations of rule outputs, and the distribution for the creation of foreign key values, can be customized by the user.

After the Java Application is generated based on the ANO file, you may add User Defined Classes to the Java Application. This section explains how.

  • Be careful the Custom Classes does not get deleted if you use the DBmasker service several times, and you overwrite your existing folders.


We have provided a GitHub Repository so that users may freely share and improve User Defined Classes.

Custom Conversions

Conversions are done on the input-sources of the mask and randomize rules. For mask, it may be useful for manipulating the data value before masking. For randomize, it is necessary for the randomization to know the type of the data that the noise is to be sadded to.

Custom Transformations

Transformations are done on the output of the anonymization rules. This is useful for correction of the anonymized data, so that this data follows business specific value structures.

Custom Distribtuions

Distributions is used when creating values for the foreign key columns of child tables. It decides how values of the parent primary-key or unique-key columns shall be distributed in the child table foreign-key columns.

ANO Usage of User Defined Classes

Make sure to reference the User Defined Classes in the ANO file under the User Defined Classes section. I.e. after Foreign Keys and before the Tasks and Rules.

// - - - - Database Schema Information - - - - //

table ...

table ...

// - - - - Foreign Keys (Optional) - - - - //


// - - - - User Defined Classes (Optional) - - - - //

conversion no.esito.anonymizer.conversions.ParseDigits
transformation no.esito.anonymizer.transformations.ReplaceDigits
distribution no.esito.anonymizer.distributions.MinPerParent

// - - - - Tasks and Rules - - - - //
task MyTasks
{ ...