public class BindyKeyValuePairFactory extends BindyAbstractFactory implements BindyFactory
annotatedLinkFields, crlf, eol, formatFactory, modelClassNames, models
Constructor and Description |
---|
BindyKeyValuePairFactory(Class<?> type) |
Modifier and Type | Method and 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
|
void |
bind(org.apache.camel.CamelContext camelContext,
List<String> data,
Map<String,Object> model,
int line,
Map<String,List<Object>> lists) |
String |
getKeyValuePairSeparator()
Find the key value pair separator used to link the key with its value
|
String |
getPairSeparator()
Find the pair separator used to delimit the key value pair fields
|
void |
initAnnotatedFields()
Find fields annotated in each class of the model
|
void |
initKeyValuePairModel()
method uses to initialize the model representing the classes who will bind the data This process will scan for
classes according to the package name provided, check the annotated classes and fields.
|
boolean |
isMessageOrdered()
Flag indicating if the message must be ordered
|
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.
|
factory, formatString, generateKey, getCarriageReturn, getDefaultValueForPrimitive, getEndOfLine, getLocale, initModel, link, setFormatFactory, setLocale, supportsModel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initModel
public void initKeyValuePairModel() throws Exception
Exception
public void initAnnotatedFields()
BindyAbstractFactory
initAnnotatedFields
in class BindyAbstractFactory
public void bind(org.apache.camel.CamelContext camelContext, List<String> data, Map<String,Object> model, int line) throws Exception
BindyFactory
bind
in interface BindyFactory
bind
in class BindyAbstractFactory
data
- Listmodel
- Mapline
- is the position of the record into the fileException
- can be thrownpublic void bind(org.apache.camel.CamelContext camelContext, List<String> data, Map<String,Object> model, int line, Map<String,List<Object>> lists) throws Exception
Exception
public String unbind(org.apache.camel.CamelContext camelContext, Map<String,Object> model) throws Exception
BindyFactory
unbind
in interface BindyFactory
unbind
in class BindyAbstractFactory
model
- MapException
- can be thrownpublic String getPairSeparator()
public String getKeyValuePairSeparator()
public boolean isMessageOrdered()
Apache Camel