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 TypeMethodDescriptiondefault voidprocess(PersistentCollection<?> collection) Processes documents in a persistent collection, updates them,and saves the changes back to the collection.default DocumentprocessAfterRead(Document document) Processes a document after reading from the database.default DocumentprocessBeforeWrite(Document document) Processes a document before writing it into database.
-
Method Details
-
processBeforeWrite
Processes a document before writing it into database.- Parameters:
document- the document- Returns:
- the document
-
processAfterRead
Processes a document after reading from the database.- Parameters:
document- the document- Returns:
- the document
-
process
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 aNitriteCollectionor anObjectRepository.
-