Interface Inverter<T>

Type Parameters:
T - the type of object that can be inverted and deserialized
All Superinterfaces:
Converter<byte[],T>
All Known Implementing Classes:
JacksonInverter

public interface Inverter<T> extends Converter<byte[],T>
Interface responsible for converting a domain object into a SerializedDocument for indexing, and vice versa—deserializing a byte[] representation into the original object type.

An Inverter is a specialized Converter used in the search module. It bridges the gap between serializable objects and searchable document formats. Implementations handle both document creation and deserialization from raw data.

See Also:
  • Method Details

    • toDocument

      SerializedDocument toDocument(Object object, String type, int revision, String id, String collection, Instant timestamp, Instant end, Metadata metadata)
      Converts the given object into a SerializedDocument, which is suitable for indexing or storage in a document store.
      Parameters:
      object - the original object to convert
      type - the simple type name of the object
      revision - the revision number of the object (e.g., as provided by Revision)
      id - the unique ID for this document within the given collection
      collection - the name of the collection the document belongs to
      timestamp - the optional starting timestamp for the document's validity
      end - the optional end timestamp of the document's validity
      metadata - optional metadata to associate with the document
      Returns:
      a fully constructed SerializedDocument