Class ClearFieldsTask
java.lang.Object
ch.tocco.nice2.optional.anonymization.impl.task.ClearFieldsTask
- All Implemented Interfaces:
OptionalTask<Entity,
,Entity> PersistTask<Entity,
Entity>
clears all non-mandatory fields on the given entity
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoRun
(Entity entity, CommandContext commandContext) void
setClearFieldsToNull
(boolean clearFieldsToNull) Set to true that nullable fields are null after clearing.void
setIgnoreFields
(List<AnonymizeEntitiesIgnoreFieldContribution> contributions) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.OptionalTask
run
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Constructor Details
-
ClearFieldsTask
public ClearFieldsTask()
-
-
Method Details
-
doRun
- Specified by:
doRun
in interfaceOptionalTask<Entity,
Entity> - Throws:
Exception
-
setIgnoreFields
@Autowired public void setIgnoreFields(List<AnonymizeEntitiesIgnoreFieldContribution> contributions) -
setClearFieldsToNull
@Value("${nice2.optional.anonymization.clearFieldsToNull}") public void setClearFieldsToNull(boolean clearFieldsToNull) Set to true that nullable fields are null after clearing. Before, the empty value was set. However, if there was a number range and "0" was not allowed clearing was not possible. Also see TOCDEV-10754 for more details.
-