You could just create a bean and add any extra logic you need when constructing the object.
See: http://www.jooq.org/doc/3.8/manual/sql-execution/fetching/pojos/ (I'm mostly using the "immutable" pojos pattern) I tend to have objects that represent the data in the strutted format I'll be returning as a response (REST services). You can then read the data in and apply any manipulation, validation and such you need when you're constructing the object. for example. I had a use case where an external ID was being read in as a string, validation that it's numeric and greater then 0 occurs in the bean and it's not it throws an exception marking it as an invalid Data state. Alternatively you can introduce a service that does this. It's just a mater of preference if you want your pojo to do this work or a related service responsible for transformation from data type A to data type B. -- Samir Faci On Wed, Jun 8, 2016 at 10:19 AM, <[email protected]> wrote: > > Hi, > > This all seems a lot simpler when I started but now that I have wade into > the deep end I think I maybe incorrect in some assumptions. > > I have a List<CSVItems> (CSVItems has 30+ members of various types) which > I have gotten via parsing a very complicated CSV file using SuperCSV (I do > know jOOQ has it's CSV importer, but needed SuperCSV). > > Now I need to map these CSVItems to a table within the jooq generated > structure which has about 50 members. While importing the data I need to > apply a bunch of business rules to the data which CRUDs data List members > to fit into the table. > > Is RecordMapper the right solution for this? > > Aram > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Thank you Samir Faci -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
