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 Detail

      • 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.