Class ItemDeltaSingleValueProcessor<T>
java.lang.Object
com.evolveum.midpoint.repo.sqale.delta.ItemDeltaValueProcessor<T>
com.evolveum.midpoint.repo.sqale.delta.item.ItemDeltaSingleValueProcessor<T>
- Type Parameters:
T
- expected type of the real value for the modification (after optional conversion)
- All Implemented Interfaces:
ItemDeltaProcessor
- Direct Known Subclasses:
EmbeddedContainerDeltaProcessor
,ExtensionContainerDeltaProcessor
,PolyStringItemDeltaProcessor
,RefItemDeltaProcessor
,SinglePathItemDeltaProcessor
Applies single item delta value to an item.
This class implements
setRealValues(java.util.Collection<?>)
(for multiple values) and requires
setValue(T)
(for a single value) to be implemented by the subclasses.
This hierarchy branch should not need ItemDeltaValueProcessor.addRealValues(java.util.Collection<?>)
and ItemDeltaValueProcessor.deleteRealValues(java.util.Collection<?>)
,
so it's not overridden and throws UnsupportedOperationException
.-
Field Summary
Fields inherited from class com.evolveum.midpoint.repo.sqale.delta.ItemDeltaValueProcessor
context
-
Constructor Summary
ModifierConstructorDescriptionprotected
ItemDeltaSingleValueProcessor
(SqaleUpdateContext<?, ?, ?> context) -
Method Summary
Modifier and TypeMethodDescriptionprotected T
getAnyValue
(ItemDelta<?, ?> modification) Often the single real value is necessary, optionally converted usingItemDeltaValueProcessor.convertRealValue(Object)
to get expected type.void
Default process implementation, most generic case covering especially multi-values stored in separate rows.void
setRealValues
(Collection<?> values) Sets the provided real values in the database, implements REPLACE modification.abstract void
Sets the database columns to reflect the provided value (converted if necessary).Methods inherited from class com.evolveum.midpoint.repo.sqale.delta.ItemDeltaValueProcessor
addRealValues, addValues, convertRealValue, delete, deleteRealValues, deleteValues
-
Constructor Details
-
ItemDeltaSingleValueProcessor
-
-
Method Details
-
process
Description copied from class:ItemDeltaValueProcessor
Default process implementation, most generic case covering especially multi-values stored in separate rows. This works when implementations ofItemDeltaValueProcessor.deleteRealValues(java.util.Collection<?>)
andItemDeltaValueProcessor.addRealValues(java.util.Collection<?>)
are independent, it's not usable for array update where a single `SET` clause is allowed.- Specified by:
process
in interfaceItemDeltaProcessor
- Overrides:
process
in classItemDeltaValueProcessor<T>
- Throws:
RepositoryException
SchemaException
-
getAnyValue
Often the single real value is necessary, optionally converted usingItemDeltaValueProcessor.convertRealValue(Object)
to get expected type. Either method can be overridden or not used at all depending on the complexity of the concrete delta processor. -
setValue
Sets the database columns to reflect the provided value (converted if necessary).- Throws:
SchemaException
-
setRealValues
Description copied from class:ItemDeltaValueProcessor
Sets the provided real values in the database, implements REPLACE modification. This may involve setting the value of some columns or delete/insert of sub-entities. This is a general case covering both multi-value and single-value items.- Overrides:
setRealValues
in classItemDeltaValueProcessor<T>
- Throws:
SchemaException
-