public class RandomSanitizer extends Object implements ValueSanitizer
| Constructor and Description |
|---|
RandomSanitizer() |
RandomSanitizer(long integerRangeStartInclusive,
long numericRangeEndInclusive) |
RandomSanitizer(String hint)
if original value is String, the hint will be included in the sanitized
result, making the random code readable in context,
e.g.
|
RandomSanitizer(String hint,
int maxLength) |
| Modifier and Type | Method and Description |
|---|---|
static Object |
random(Class<?> clazz) |
static Object |
random(Class<?> clazz,
long numericRangeStartInclusive,
long numericRangeEndInclusive,
String hint,
Integer maxLength) |
Object |
sanitize(Object originalValue,
String rowId,
String propertyName)
sanitizing a value by replacing Strings by random MD5-Hex token, numeric values (non-decimal)
by random integer value, decimal values by random float
|
public RandomSanitizer()
public RandomSanitizer(String hint)
hint - public RandomSanitizer(long integerRangeStartInclusive,
long numericRangeEndInclusive)
public RandomSanitizer(String hint, int maxLength)
public Object sanitize(Object originalValue, String rowId, String propertyName)
sanitize in interface ValueSanitizeroriginalValue - rowId - if available, unique id identifying the row on which this value sitspropertyName - name of the propertyCopyright © 2021. All rights reserved.