org.apache.camel.dataformat.bindy
Interface BindyFactory

All Known Implementing Classes:
BindyAbstractFactory, BindyCsvFactory, BindyFixedLengthFactory, BindyKeyValuePairFactory

public interface BindyFactory

The bindy factory is a factory used to create the POJO models and bind or unbind the data to and from the record (CSV, ...)


Method Summary
 void bind(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(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(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 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(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 the key name of the class link to POJO objects
Returns:
String represents a csv record created
Throws:
Exception - can be thrown


Apache CAMEL