|
||||||||||
| 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 java.util.Map<java.lang.String,java.util.List<java.lang.reflect.Field>> |
annotatedLinkFields
|
protected java.lang.String |
crlf
|
protected java.util.Set<java.lang.Class<?>> |
models
|
| Constructor Summary | |
|---|---|
BindyAbstractFactory(org.apache.camel.spi.PackageScanClassResolver resolver,
java.lang.String... packageNames)
|
|
| Method Summary | |
|---|---|
abstract void |
bind(java.util.List<java.lang.String> data,
java.util.Map<java.lang.String,java.lang.Object> model,
int line)
The bind allow to read the content of a record (expressed as a List |
java.util.Map<java.lang.String,java.lang.Object> |
factory()
Factory method generating new instances of the model and adding them to a HashMap |
java.lang.String |
formatString(Format format,
java.lang.Object value)
Format the object into a string according to the format rue defined |
protected static java.lang.Integer |
generateKey(java.lang.Integer key1,
java.lang.Integer key2)
Generate a unique key |
java.lang.String |
getCarriageReturn()
Find the carriage return set |
static java.lang.Object |
getDefaultValueForPrimitive(java.lang.Class<?> clazz)
|
java.lang.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(java.util.Map<java.lang.String,java.lang.Object> model)
Link objects together |
void |
setLocale(java.lang.String locale)
|
abstract java.lang.String |
unbind(java.util.Map<java.lang.String,java.lang.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 java.util.Map<java.lang.String,java.util.List<java.lang.reflect.Field>> annotatedLinkFields
protected java.util.Set<java.lang.Class<?>> models
protected java.lang.String crlf
| Constructor Detail |
|---|
public BindyAbstractFactory(org.apache.camel.spi.PackageScanClassResolver resolver,
java.lang.String... packageNames)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public void initModel()
throws java.lang.Exception
initModel in interface BindyFactoryjava.lang.Exception
public abstract void initAnnotatedFields()
throws java.lang.Exception
java.lang.Exception
public abstract void bind(java.util.List<java.lang.String> data,
java.util.Map<java.lang.String,java.lang.Object> model,
int line)
throws java.lang.Exception
BindyFactory
bind in interface BindyFactorydata - Listmodel - Mapline - is the position of the record into the file
java.lang.Exception - can be thrown
public abstract java.lang.String unbind(java.util.Map<java.lang.String,java.lang.Object> model)
throws java.lang.Exception
BindyFactory
unbind in interface BindyFactorymodel - Mapjava.lang.Exception - can be thrown
public void link(java.util.Map<java.lang.String,java.lang.Object> model)
throws java.lang.Exception
java.lang.Exception
public java.util.Map<java.lang.String,java.lang.Object> factory()
throws java.lang.Exception
java.lang.Exception - can be thrown
protected static java.lang.Integer generateKey(java.lang.Integer key1,
java.lang.Integer key2)
key1 - The key of the section numberkey2 - The key of the position of the field
public static java.lang.Object getDefaultValueForPrimitive(java.lang.Class<?> clazz)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getCarriageReturn()
public java.lang.String formatString(Format format,
java.lang.Object value)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getLocale()
public void setLocale(java.lang.String locale)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||