olg.csv.bean.annotations.processor
Class EmbeddedProcessor<B>

Package class diagram package EmbeddedProcessor
java.lang.Object
  extended by olg.csv.bean.annotations.processor.EmbeddedProcessor<B>
Type Parameters:
B - the bean on which research its fields annoted with embedded annotation

public final class EmbeddedProcessor<B>
extends Object

This class is responsible for processing the @Embedded annotation.


Field Summary
private  Class<B> clazz
          the class of the bean on which research its fields annoted with column annotation.
private static org.slf4j.Logger LOGGER
          Class logger.
 
Constructor Summary
EmbeddedProcessor(Class<B> clazz)
          Constructor.
 
Method Summary
private  boolean checkConcreteClass(Field field, Class<?> fieldConcreteClass)
          check if a field class is concrete.
 boolean getReadingProcessor(int translate, Field field, List<IPropertyProcessor<B>> propertyProcessors, Map<Integer,Integer> map)
          Complete a list with the propertyProcessors built from the embedded annotation setted on a field.
 boolean getWritingProcessor(Field field, Map<Integer,List<CellProcessor<B>>> map)
          Complete a map with the cellprocessors built from the embedded 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

LOGGER

private static final org.slf4j.Logger LOGGER
Class logger.


clazz

private Class<B> clazz
the class of the bean on which research its fields annoted with column annotation.

Constructor Detail

EmbeddedProcessor

public EmbeddedProcessor(Class<B> clazz)
Constructor.

Parameters:
clazz - the class of the bean
Method Detail

getWritingProcessor

public boolean getWritingProcessor(Field field,
                                   Map<Integer,List<CellProcessor<B>>> map)
Complete a map with the cellprocessors built from the embedded annotation setted on a field.

Parameters:
field - the field
map - the map to complete with the cellProcessors built from the embedded Annotation setted on the field. the keys are the cell num target of the cellProcessor.
Returns:
true if no error happens during this operation.

getReadingProcessor

public boolean getReadingProcessor(int translate,
                                   Field field,
                                   List<IPropertyProcessor<B>> propertyProcessors,
                                   Map<Integer,Integer> map)
Complete a list with the propertyProcessors built from the embedded annotation setted on a field.

Parameters:
translate - index from which begin the column numerotation
field - the field on which search an embedded annoation
propertyProcessors - processors map to complete with the processors match on the field
map - map of couple (column num, nb properties built on ) to complete with the processors built.
Returns:
true if noError occurs.

checkConcreteClass

private boolean checkConcreteClass(Field field,
                                   Class<?> fieldConcreteClass)
check if a field class is concrete.

Parameters:
field - the field
fieldConcreteClass - the class used to set the field
Returns:
true if the class is really concrete.


Copyright © 2014. All Rights Reserved.