Closed kryger closed 10 years ago
Sounds good. Usually in Java that would be solved via the constructor, like so:
ColumnPositionMappingStrategy<Institution> strategy =
new ColumnPositionMappingStrategy<Institution>(Institution.class);
so I think that would be a good addition.
Just pushed a commit to add this constructor to all the MappingStrategies. Added new tests as well. Let me know if this works for you.
Thanks for quick reaction, will give it a try when I get a chance. Closing this issue to keep things clean, will reopen if needed.
As mentioned in #6 it took me some time to get
BeanToCsv
writer to work, only after analysing in the debugger I discovered thattype
variable insideHeaderColumnNameMappingStrategy
(code) is not being set, I had to do it manually:This feels redundant, would be nice if the strategy object set it automatically upon construction.