Interface BindyFactory
-
- All Known Implementing Classes:
BindyAbstractFactory,BindyCsvFactory,BindyFixedLengthFactory,BindyKeyValuePairFactory
public interface BindyFactoryThe 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbind(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. voidinitModel()Prior to bind or unbind the data to and from string or model classes, the factory must create a collection of objects representing the modelStringunbind(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 ExceptionPrior 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 ExceptionThe bind allow to read the content of a record (expressed as a List) and map it to the model classes. - Parameters:
data- Listrepresents the csv, ... data to transform model- Mapis 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- Mapis 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
-
-