Interface EntityConverter<T>

    • Method Detail

      • getEntityType

        Class<T> getEntityType()
        Gets the entity type.
        Returns:
        the entity type
      • toDocument

        Document toDocument​(T entity,
                            NitriteMapper nitriteMapper)
        Converts the entity to a Document.
        Parameters:
        entity - the entity
        nitriteMapper - the nitrite mapper
        Returns:
        the document
      • fromDocument

        T fromDocument​(Document document,
                       NitriteMapper nitriteMapper)
        Converts a Document to an entity of type EntityConverter.
        Parameters:
        document - the document
        nitriteMapper - the nitrite mapper
        Returns:
        the t
      • initialize

        default void initialize​(NitriteConfig nitriteConfig)
        Description copied from interface: NitritePlugin
        Initializes the plugin instance.
        Specified by:
        initialize in interface NitritePlugin
        Parameters:
        nitriteConfig - the nitrite config