org.apache.storm.mongodb.common.mapper

## Class SimpleMongoMapper

- java.lang.Object
- - org.apache.storm.mongodb.common.mapper.SimpleMongoMapper

- All Implemented Interfaces:
    Serializable, MongoMapper
  Direct Known Subclasses:
    SimpleMongoUpdateMapper

      public class SimpleMongoMapper
      extends Object
      implements MongoMapper

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleMongoMapper(String... fields)`

  - ### Method Summary

    All Methods Instance Methods Concrete 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.
    `SimpleMongoMapper` | `withFields(String... fields)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleMongoMapper

          public SimpleMongoMapper(String... fields)

  - ### Method Detail

    - #### toDocument

          public org.bson.Document toDocument(ITuple tuple)

      Description copied from interface: `MongoMapper`

      Converts a Tuple to a Document.

      Specified by:
        `toDocument` in interface `MongoMapper`
      Parameters:
        `tuple` - the incoming tuple
      Returns:
        the MongoDB document

    - #### toDocumentByKeys

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

      Description copied from interface: `MongoMapper`

      Converts a keys to a Document.

      Specified by:
        `toDocumentByKeys` in interface `MongoMapper`
      Parameters:
        `keys` - the trident keys
      Returns:
        the MongoDB document

    - #### withFields

          public SimpleMongoMapper withFields(String... fields)

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