Interface BindyFactory

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void bind​(org.apache.camel.CamelContext camelContext, List<String> data, Map<String,​Object> model, int line)
      The bind allow to read the content of a record (expressed as a List) and map it to the model classes.
      void initModel()
      Prior to bind or unbind the data to and from string or model classes, the factory must create a collection of objects representing the model
      String unbind​(org.apache.camel.CamelContext camelContext, Map<String,​Object> model)
      The unbind is used to transform the content of the classes model objects into a string.
    • Method Detail

      • initModel

        void initModel()
                throws Exception
        Prior to bind or unbind the data to and from string or model classes, the factory must create a collection of objects representing the model
        Throws:
        Exception - can be thrown
      • bind

        void bind​(org.apache.camel.CamelContext camelContext,
                  List<String> data,
                  Map<String,​Object> model,
                  int line)
           throws Exception
        The bind allow to read the content of a record (expressed as a List) and map it to the model classes.
        Parameters:
        data - List represents the csv, ... data to transform
        model - Map is a collection of objects used to bind data. String is the key name of the class link to POJO objects
        line - is the position of the record into the file
        Throws:
        Exception - can be thrown
      • unbind

        String unbind​(org.apache.camel.CamelContext camelContext,
                      Map<String,​Object> model)
               throws Exception
        The unbind is used to transform the content of the classes model objects into a string. The string represents a record of a CSV file
        Parameters:
        model - Map is a collection of objects used to create csv, ... records. String is the key name of the class link to POJO objects
        Returns:
        String represents a csv record created
        Throws:
        Exception - can be thrown