org.apache.storm.jdbc.mapper

## Class SimpleJdbcLookupMapper

- java.lang.Object
- - org.apache.storm.jdbc.mapper.SimpleJdbcMapper
  - - org.apache.storm.jdbc.mapper.SimpleJdbcLookupMapper

- All Implemented Interfaces:
    Serializable, JdbcLookupMapper, JdbcMapper

      public class SimpleJdbcLookupMapper
      extends SimpleJdbcMapper
      implements JdbcLookupMapper

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleJdbcLookupMapper(Fields outputFields, List<Column> queryColumns)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `declareOutputFields(OutputFieldsDeclarer declarer)` declare what are the fields that this code will output.
    `List<Values>` | `toTuple(ITuple input, List<Column> columns)` Converts a DB row to a list of storm values that can be emitted.

    - ### Methods inherited from class org.apache.storm.jdbc.mapper.SimpleJdbcMapper

      `getColumns`

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

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

    - ### Methods inherited from interface org.apache.storm.jdbc.mapper.JdbcMapper

      `getColumns`

- - ### Constructor Detail

    - #### SimpleJdbcLookupMapper

          public SimpleJdbcLookupMapper(Fields outputFields,
                                        List<Column> queryColumns)

  - ### Method Detail

    - #### toTuple

          public List<Values> toTuple(ITuple input,
                                      List<Column> columns)

      Description copied from interface: `JdbcLookupMapper`

      Converts a DB row to a list of storm values that can be emitted. This is done to allow a single storm input tuple and a single DB row to result in multiple output values.

      Specified by:
        `toTuple` in interface `JdbcLookupMapper`
      Parameters:
        `input` - the input tuple.
        `columns` - list of columns that represents a row
      Returns:
        a List of storm values that can be emitted. Each item in list is emitted as an output tuple.

    - #### declareOutputFields

          public void declareOutputFields(OutputFieldsDeclarer declarer)

      Description copied from interface: `JdbcLookupMapper`

      declare what are the fields that this code will output.

      Specified by:
        `declareOutputFields` in interface `JdbcLookupMapper`

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