title: jooq - Add code to the generated Record class
body: <p>I learning how to work with jooq. I would like to know if I can add some domain-level methods in to the generated Record classes.</p>
  
  <p>Suppose the record was this:</p>
  
  <pre><code>public class ConCalCompanyRecord extends org.jooq.impl.UpdatableRecordImpl&lt;com.aesthete.csmart.connect.model.db.gen.tables.records.ConCalCompanyRecord&gt; implements org.jooq.Record6&lt;java.lang.Integer, java.lang.Integer, java.lang.String, java.lang.String, java.sql.Timestamp, java.sql.Timestamp&gt; {
  
  // properties
  // getters and setters
  
  // I would like to add a method like this:
     public void isABlueCompany(){
       // work with the fields
     }
  
  }
  </code></pre>
  
  <p>But I know if I do this, as soon as I generate this class again from the DB, all my changes will get lost. So what is the recommended way of doing this? </p>
  
  <p>A wrapper class? A sub class to the record? If its any of these, how do I get jooq to recognise these classes at the time of fetching. For example:</p>
  
  <pre><code>connectionFacade.getDSLContext()
              .selectFrom(CON_CAL_INSTANCE)
              .where(CON_CAL_INSTANCE.DATE.between(
                      new Date(datesOfTheWeekForDate[0].toDate().getTime()), new Date(datesOfTheWeekForDate[1].toDate().getTime())))
              .orderBy(CON_CAL_INSTANCE.DATE)
              .fetch()
              .into(new RecordHandler&lt;ConCalInstanceRecord&gt;() {
                  @Override
                  public void next(ConCalInstanceRecord record) {
                      calendarEntries.addToList(new com.aesthete.csmart.connect.model.domain.records.ConCalInstance(record));
                     }
              });
  </code></pre>
  
  <p>In the above case I am providing a wrapper called ConCalInstance to the record class. Do I have to write a RecordHandler like this for every query I execute if I need to use a wrapper? 
  What is the recommended way of doing this?</p>