Re: RecordMapper question

2016-06-25 Thread Lukas Eder
Hi Aram, Sorry for the delay, and thanks for sharing your example. Indeed, it's not out of the ordinary, yet it is a bit complex. As I thought before, this doesn't lend itself to a set of new features in the jOOQ loader API. I think it is best if the loader API just processes records that are alr

Re: RecordMapper question

2016-06-12 Thread Aram Mirzadeh
It isn't anything abnormal, just a lot of processing. BIRT was considered at one point. The business logic layer consists of reading each item (CSVItem row - a row from a sales entry system) 1 & 2) Normalizing the values in some fields. 3) Finding the monies conversation equivalence of cost a

Re: RecordMapper question

2016-06-12 Thread Lukas Eder
2016-06-12 9:34 GMT+02:00 Aram Mirzadeh : > > No you're right as far as doing it manually vs. a mapper is probably not > much of a time saver but it's easier to read IMHO. > Well, there's a tradeoff... Readability and complex business logic. I suspect you'll need to pick one :) Of course, if you'

Re: RecordMapper question

2016-06-12 Thread Aram Mirzadeh
Hi Lukas, I would have loved to use jOOQ's CSV importer ... sadly the data is a little too finiky and after spending a bit of time trying to get it to import directly into Table I gave up and went back to SuperCSV. No you're right as far as doing it manually vs. a mapper is probably not mu

Re: RecordMapper question

2016-06-11 Thread Lukas Eder
I think that jOOQ's importing API is the right API for you to choose: http://www.jooq.org/doc/latest/manual/sql-execution/importing But I believe that you should no longer think of your data in terms of CSV, once you pass it to jOOQ. You have already parsed your CSV data into your List data struct

Re: RecordMapper question

2016-06-09 Thread Aram Mirzadeh
Thank you for that. My scenario is a bit different as I already have the List of POJOs in hand since they're being parsed from a file rather than reading them via jOOQ. I also want to apply the business rules before persisting the data to the database. At this point I think one of the gener

Re: RecordMapper question

2016-06-08 Thread Samir Faci
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 returni

RecordMapper question

2016-06-08 Thread aram535
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 has 30+ members of various types) which I have gotten via parsing a very complicated CSV file using SuperCSV (I do know jOOQ has