Class JoinSheetMapper<T>

java.lang.Object
org.simpleflatmapper.poi.impl.JoinSheetMapper<T>
All Implemented Interfaces:
org.simpleflatmapper.map.ContextualSourceMapper<org.apache.poi.ss.usermodel.Row,T>, org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,T,RuntimeException>, org.simpleflatmapper.map.SetRowMapper<org.apache.poi.ss.usermodel.Row,org.apache.poi.ss.usermodel.Sheet,T,RuntimeException>, org.simpleflatmapper.map.SourceMapper<org.apache.poi.ss.usermodel.Row,T>, RowMapper<T>, SheetMapper<T>

public class JoinSheetMapper<T> extends Object implements RowMapper<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
    JoinSheetMapper(org.simpleflatmapper.map.ContextualSourceFieldMapper<org.apache.poi.ss.usermodel.Row,T> mapper, org.simpleflatmapper.map.ConsumerErrorHandler consumerErrorHandler, org.simpleflatmapper.map.context.MappingContextFactory<? super org.apache.poi.ss.usermodel.Row> mappingContextFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.simpleflatmapper.util.Enumerable<T>
    enumerate(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
     
    org.simpleflatmapper.util.Enumerable<T>
    enumerate(org.apache.poi.ss.usermodel.Sheet sheet)
     
    <RH extends org.simpleflatmapper.util.CheckedConsumer<? super T>>
    RH
    forEach(int startRow, org.apache.poi.ss.usermodel.Sheet sheet, RH consumer)
     
    <RH extends org.simpleflatmapper.util.CheckedConsumer<? super T>>
    RH
    forEach(org.apache.poi.ss.usermodel.Sheet sheet, RH consumer)
     
    iterator(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
     
    iterator(org.apache.poi.ss.usermodel.Sheet sheet)
     
    map(org.apache.poi.ss.usermodel.Row source)
     
    map(org.apache.poi.ss.usermodel.Row source, org.simpleflatmapper.map.MappingContext<? super org.apache.poi.ss.usermodel.Row> context)
     
    stream(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
     
    stream(org.apache.poi.ss.usermodel.Sheet sheet)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JoinSheetMapper

      public JoinSheetMapper(org.simpleflatmapper.map.ContextualSourceFieldMapper<org.apache.poi.ss.usermodel.Row,T> mapper, org.simpleflatmapper.map.ConsumerErrorHandler consumerErrorHandler, org.simpleflatmapper.map.context.MappingContextFactory<? super org.apache.poi.ss.usermodel.Row> mappingContextFactory)
  • Method Details

    • iterator

      public Iterator<T> iterator(org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      iterator in interface org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,T,RuntimeException>
      Specified by:
      iterator in interface SheetMapper<T>
      Parameters:
      sheet - the sheet to map from
      Returns:
      an iterator of mapped newInstance of T
    • iterator

      public Iterator<T> iterator(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      iterator in interface SheetMapper<T>
      Parameters:
      startRow - row index to start at
      sheet - the sheet to map from
      Returns:
      an iterator of mapped newInstance of T
    • enumerate

      public org.simpleflatmapper.util.Enumerable<T> enumerate(org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      enumerate in interface org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,T,RuntimeException>
      Specified by:
      enumerate in interface SheetMapper<T>
      Parameters:
      sheet - the sheet to map from
      Returns:
      an iterator of mapped newInstance of T
    • enumerate

      public org.simpleflatmapper.util.Enumerable<T> enumerate(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      enumerate in interface SheetMapper<T>
      Parameters:
      startRow - row index to start at
      sheet - the sheet to map from
      Returns:
      an iterator of mapped newInstance of T
    • forEach

      public <RH extends org.simpleflatmapper.util.CheckedConsumer<? super T>> RH forEach(org.apache.poi.ss.usermodel.Sheet sheet, RH consumer)
      Specified by:
      forEach in interface org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,T,RuntimeException>
      Specified by:
      forEach in interface SheetMapper<T>
      Type Parameters:
      RH - the type of the handler
      Parameters:
      sheet - the sheet to map from
      consumer - the handler to call back
      Returns:
      the handler
    • forEach

      public <RH extends org.simpleflatmapper.util.CheckedConsumer<? super T>> RH forEach(int startRow, org.apache.poi.ss.usermodel.Sheet sheet, RH consumer)
      Specified by:
      forEach in interface SheetMapper<T>
      Type Parameters:
      RH - the type of the handler
      Parameters:
      startRow - row index to start at
      sheet - the sheet to map from
      consumer - the handler to call back
      Returns:
      the handler
    • stream

      public Stream<T> stream(org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      stream in interface org.simpleflatmapper.map.EnumerableMapper<org.apache.poi.ss.usermodel.Sheet,T,RuntimeException>
      Specified by:
      stream in interface SheetMapper<T>
      Parameters:
      sheet - the sheet to map from
      Returns:
      a stream on mapped newInstance of T
    • stream

      public Stream<T> stream(int startRow, org.apache.poi.ss.usermodel.Sheet sheet)
      Specified by:
      stream in interface SheetMapper<T>
      Parameters:
      startRow - row index to start at
      sheet - the sheet to map from
      Returns:
      a stream on mapped newInstance of T
    • map

      public T map(org.apache.poi.ss.usermodel.Row source) throws org.simpleflatmapper.map.MappingException
      Specified by:
      map in interface org.simpleflatmapper.map.ContextualSourceMapper<org.apache.poi.ss.usermodel.Row,T>
      Throws:
      org.simpleflatmapper.map.MappingException
    • map

      public T map(org.apache.poi.ss.usermodel.Row source, org.simpleflatmapper.map.MappingContext<? super org.apache.poi.ss.usermodel.Row> context) throws org.simpleflatmapper.map.MappingException
      Specified by:
      map in interface org.simpleflatmapper.map.SourceMapper<org.apache.poi.ss.usermodel.Row,T>
      Throws:
      org.simpleflatmapper.map.MappingException