|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.dataformat.bindy.BindyAbstractFactory
public abstract class BindyAbstractFactory
The BindyAbstractFactory implements what its common to all the formats
supported by Camel Bindy
| Field Summary | |
|---|---|
protected Map<String,List<Field>> |
annotatedLinkFields
|
protected String |
crlf
|
protected Set<Class<?>> |
models
|
| Constructor Summary | |
|---|---|
BindyAbstractFactory(org.apache.camel.spi.PackageScanClassResolver resolver,
Class<?> type)
|
|
BindyAbstractFactory(org.apache.camel.spi.PackageScanClassResolver resolver,
String... packageNames)
|
|
| Method Summary | |
|---|---|
abstract 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 |
Map<String,Object> |
factory()
Factory method generating new instances of the model and adding them to a HashMap |
String |
formatString(Format format,
Object value)
Format the object into a string according to the format rule defined |
protected static Integer |
generateKey(Integer key1,
Integer key2)
Generate a unique key |
String |
getCarriageReturn()
Find the carriage return set |
static Object |
getDefaultValueForPrimitive(Class<?> clazz)
|
String |
getLocale()
|
abstract void |
initAnnotatedFields()
Find fields annotated in each class of the model |
void |
initModel()
method uses to initialize the model representing the classes who will bind the data. |
void |
link(Map<String,Object> model)
Link objects together |
void |
setLocale(String locale)
|
abstract String |
unbind(Map<String,Object> model)
The unbind is used to transform the content of the classes model objects into a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Map<String,List<Field>> annotatedLinkFields
protected Set<Class<?>> models
protected String crlf
| Constructor Detail |
|---|
public BindyAbstractFactory(org.apache.camel.spi.PackageScanClassResolver resolver,
String... packageNames)
throws Exception
Exception
public BindyAbstractFactory(org.apache.camel.spi.PackageScanClassResolver resolver,
Class<?> type)
throws Exception
Exception| Method Detail |
|---|
public void initModel()
throws Exception
initModel in interface BindyFactoryException
public abstract void initAnnotatedFields()
throws Exception
Exception
public abstract void bind(List<String> data,
Map<String,Object> model,
int line)
throws Exception
BindyFactory
bind in interface BindyFactorydata - Listmodel - Mapline - is the position of the record into the file
Exception - can be thrown
public abstract String unbind(Map<String,Object> model)
throws Exception
BindyFactory
unbind in interface BindyFactorymodel - MapException - can be thrown
public void link(Map<String,Object> model)
throws Exception
Exception
public Map<String,Object> factory()
throws Exception
Exception - can be thrown
protected static Integer generateKey(Integer key1,
Integer key2)
key1 - The key of the section numberkey2 - The key of the position of the field
public static Object getDefaultValueForPrimitive(Class<?> clazz)
throws Exception
Exceptionpublic String getCarriageReturn()
public String formatString(Format format,
Object value)
throws Exception
Exceptionpublic String getLocale()
public void setLocale(String locale)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||