Hi,
I just recently started using and learning jOOQ.
As it turns out I would love to have master data tables feature, which has been removed as of jOOQ 3.0.
Let me explain, what I would like to do:
First of all, I'm using MySQL. I have some tables, which contain typed items. That means, e.g. I have a table item with a field itemtype_id. Then I also have a table item_type, with the fields id, name, description, etc. So far, to avoid magic numbers, we have used enums or at least int constants in our code. But since every time a type is added in the database the java code needs to be updated manually, I would like to generate it.
I've read about Enum Converters and Custom Data Types in the manual and I think I know how to use them. But still I would have to create the enums myself.
So what I would like to do is to write my own code generator that generates Enum Converters from the item_type tables, somewhat similar to:
public enum ItemType {
/**
* Description of Type A
*/
TYPE_A(1),
/**
* Description of Type B
*/
TYPE_B(2),
...
But I don't know yet where to start to write a own generator and how to integrate it with the default jOOQ-generator.
Therefore I'm very grateful about any advice from you :)
Cheers,
Felix