|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object olg.csv.bean.annotations.processor.ColumnProcessor<B>
B
- the bean on which research its fields annoted with column
annotationpublic final class ColumnProcessor<B>
This class is responsible for processing the @Column annotation.
Field Summary | |
---|---|
private Class<B> |
clazz
the class of the bean on which research its fields annoted with column annotation. |
private static String |
DEFAULT_DEFAULT_VALUE
Default value assigned as defaultValue column attribute. |
private static org.slf4j.Logger |
LOGGER
Class logger. |
private static String |
NULL_DEFAULT_VALUE
"null" as default value. |
Constructor Summary | |
---|---|
ColumnProcessor(Class<B> clazz)
Constructor. |
Method Summary | |
---|---|
private boolean |
checkConcreteClass(Field field,
Class<?> fieldConcreteClass)
Check if a class is concrete. |
private boolean |
chekcAsSubClass(Field field,
Column column)
check if the concrete class declared on a column is a subclass of a field. |
private String |
getDefaultValue(Column column)
Return the default value defined on a column annotation. |
boolean |
getReadingProcessor(int translate,
Field field,
List<IPropertyProcessor<B>> propertyProcessors,
Map<Integer,Integer> map)
Complete a list with the propertyProcessor built from the column annotation setted on a field. |
boolean |
getWritingProcessor(Field field,
Map<Integer,List<CellProcessor<B>>> map)
Complete a map with the cellprocessor built from the column annotation setted on a field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.slf4j.Logger LOGGER
private static final String DEFAULT_DEFAULT_VALUE
null
.
private static final String NULL_DEFAULT_VALUE
private Class<B> clazz
Constructor Detail |
---|
public ColumnProcessor(Class<B> clazz)
clazz
- the class of the bean.Method Detail |
---|
public boolean getWritingProcessor(Field field, Map<Integer,List<CellProcessor<B>>> map)
field
- the field (of the beanClass) from which build the cell
processor.map
- the map to complete with the CellProcessor built from column
annotation setted on the field. the keys are the cell num
target of the cellProcessor.
public boolean getReadingProcessor(int translate, Field field, List<IPropertyProcessor<B>> propertyProcessors, Map<Integer,Integer> map)
translate
- column index to add to the column num found on the field.
Useful to define the index of a field herited by an embedded
attribute.field
- the field (of the beanClass) from which read the Column
annotationpropertyProcessors
- the list to completemap
- the map to complete. this map shows for each cell num the
count of the property processors setted on.
private boolean chekcAsSubClass(Field field, Column column)
field
- the fieldcolumn
- the column annotation setted on the field
private boolean checkConcreteClass(Field field, Class<?> fieldConcreteClass)
field
- the field on which the processor works.fieldConcreteClass
- concrete class to use to instanciate the field.
private String getDefaultValue(Column column)
column
- the column
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |