Class ItemDeltaValueProcessor<T>

  • Type Parameters:
    T - expected type of the real value for the modification (after optional conversion)
    All Implemented Interfaces:
    ItemDeltaProcessor
    Direct Known Subclasses:
    ContainerTableDeltaProcessor, FinalValueDeltaProcessor, ItemDeltaSingleValueProcessor, RefTableItemDeltaProcessor

    public abstract class ItemDeltaValueProcessor<T>
    extends Object
    implements ItemDeltaProcessor
    Applies item delta values to an item and arranges necessary SQL changes using update context. This typically means adding set clauses to the update but can also mean adding rows for containers, etc. This kind of item delta processor does not resolve multi-part item paths, see other subclasses of ItemDeltaProcessor for that. The class also declares more specific methods for applying values (add, replace, delete), because in some scenarios we work with items and not with item delta modifications anymore. Implementations populate updates contained in the context using SqaleUpdateContext.set(P, T) method (these will be executed later) or issue insert/delete statements which are executed immediately which is responsibility of the processor.
    • Constructor Detail

      • ItemDeltaValueProcessor

        protected ItemDeltaValueProcessor​(SqaleUpdateContext<?,​?,​?> context)
    • Method Detail

      • convertRealValue

        @Nullable
        public T convertRealValue​(Object realValue)
        Default conversion for one value is a mere type cast, override as necessary.
      • setRealValues

        public void setRealValues​(Collection<?> values)
                           throws SchemaException
        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.
        Throws:
        SchemaException
      • deleteRealValues

        public void deleteRealValues​(Collection<?> values)
        Adds the provided real values to the database, implements ADD modification.
      • deleteValues

        public void deleteValues​(Collection<T> values)
      • delete

        public abstract void delete()
        Resets the database columns or deletes sub-entities like refs, containers, etc. This must be implemented to support clearing the columns of single-value embedded containers.