Class MojetLineMapper<T>

java.lang.Object
pro.cyberyon.mojet.MojetLineMapper<T>
Type Parameters:
T - pojo type
All Implemented Interfaces:
org.springframework.batch.item.file.LineMapper<T>

public class MojetLineMapper<T> extends Object implements org.springframework.batch.item.file.LineMapper<T>
MojetLineMapper is an implementation of LineMapper that uses a POJO type to map data that are annotated.
Author:
Guillaume CHAUVET
  • Field Details

    • root

      protected final RecordNode root
      The pojo class type
  • Constructor Details

    • MojetLineMapper

      public MojetLineMapper(Class<T> targetType)
      Construct a new pojo LineMapper instance
      Parameters:
      targetType - the bean type to manage
    • MojetLineMapper

      public MojetLineMapper(NodesBuilder builder, Class<T> targetType)
      Construct a new pojo LineMapper instance
      Parameters:
      builder - the node builder instance to use
      targetType - the bean type to manage
  • Method Details

    • mapLine

      public T mapLine(String line, int lineNumber) throws Exception
      Specified by:
      mapLine in interface org.springframework.batch.item.file.LineMapper<T>
      Throws:
      Exception