Interface Processor


public interface Processor
An interface that provides methods to process a document before writing it into database or after reading from the database.
Since:
4.0
Author:
Anindya Chatterjee
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Processes documents in a persistent collection, updates them,and saves the changes back to the collection.
    default Document
    Processes a document after reading from the database.
    default Document
    Processes a document before writing it into database.
  • Method Details

    • processBeforeWrite

      default Document processBeforeWrite(Document document)
      Processes a document before writing it into database.
      Parameters:
      document - the document
      Returns:
      the document
    • processAfterRead

      default Document processAfterRead(Document document)
      Processes a document after reading from the database.
      Parameters:
      document - the document
      Returns:
      the document
    • process

      default void process(PersistentCollection<?> collection)
      Processes documents in a persistent collection, updates them,and saves the changes back to the collection.
      Parameters:
      collection - the collection to process. It can either be a NitriteCollection or an ObjectRepository.