org.apache.storm.mongodb.common.mapper

## Interface MongoMapper

- All Superinterfaces:
    Serializable
  All Known Subinterfaces:
    MongoUpdateMapper
  All Known Implementing Classes:
    SimpleMongoMapper, SimpleMongoUpdateMapper

      public interface MongoMapper
      extends Serializable

  Given a Tuple/trident keys, converts it to an MongoDB document.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.bson.Document` | `toDocument(ITuple tuple)` Converts a Tuple to a Document.
    `org.bson.Document` | `toDocumentByKeys(List<Object> keys)` Converts a keys to a Document.

- - ### Method Detail

    - #### toDocument

          org.bson.Document toDocument(ITuple tuple)

      Converts a Tuple to a Document.

      Parameters:
        `tuple` - the incoming tuple
      Returns:
        the MongoDB document

    - #### toDocumentByKeys

          org.bson.Document toDocumentByKeys(List<Object> keys)

      Converts a keys to a Document.

      Parameters:
        `keys` - the trident keys
      Returns:
        the MongoDB document

Copyright © 2021 The Apache Software Foundation. All rights reserved.