Menu

#164 Print header separately

wont-fix
None
5
2024-03-31
2024-03-17
Six Douglas
No

Hi,
First of all, let me thank you for your work here. This lib is really good, easy to use and quite self explained!
However, in my specific case, I would like to be able to print headers at need.
Do you think it would be possible to add this functionality in a next release?
If you want, I can help with your guidance.
Thanks in advance

Discussion

  • Scott Conway

    Scott Conway - 2024-03-23
    • assigned_to: Scott Conway
     
  • Scott Conway

    Scott Conway - 2024-03-23

    Hello Six

    All mapping strategies have a generateHeader that creates the header as a array of Strings. It can be called at will.

    If that does not work for you then please explain your use case with some sample code.

    Scott :)

     
  • Six Douglas

    Six Douglas - 2024-03-24

    Hello Scott,

    In deed, this a possibility but I don't see why an existing bean is required to export the header?

     
  • Scott Conway

    Scott Conway - 2024-03-25

    I believe its a chicken and egg thing. The bean is probably the best way to get all the fields and annotations. Though if we were to ever try a ground up rewrite we might try and use the class first.

     
  • Andrew Rucker Jones

    Nope. I went back and checked the code, or rather my javadoc, to refresh my memory. The reason an actual bean is necessary is because of the joining and splitting functionality we added a few years ago. Any fields joined on reading and split on writing are represented as a MultiValuedMap, with the exact column names in the index of the map. These names, as in the documented example, might be "Track1," "Track2," "Track3," and so on. These column names do not exist in the class. They only exist in an instantiated bean that has been properly filled.

     
  • Andrew Rucker Jones

    • status: open --> wont-fix
     

Log in to post a comment.