Hi there,

You're right, that's currently not possible, and from a product development
perspective I'm not yet 100% convinced that we should go too far with
allowing additional ad-hoc templating methods. I wonder if you wouldn't be
better off writing your own generator implementation for DAOs? DAOs are
pretty straight-forward as most of the implementation is really in DAOImpl.

Another option, of course, would be to do file-based post-processing on the
generated output.

In the long run, we're also contemplating making use of the JDK class
building model, instead of operating on strings for output. That would be a
major redo of the code generator, though. If we do that, it won't be before
jOOQ 4.0

Cheers
Lukas


2014-05-21 16:25 GMT+02:00 Clément Allain <[email protected]>:

> Still working on generation i wish to add the spring @Repository on all
> the generated DAOs because i'm lazy to write a spring context file
> declaring all beans and that will be more generic.
> But based on the following example, i could not find how. I wish a method
> like strategy.getJavaAnnotation(TableDefinition, Mode) exist ?
>
> package com.example.tables;//   1: ^^^^^^^^^^^^^^^^^^public class Book 
> extends TableImpl<com.example.tables.records.BookRecord> {//        2: ^^^^   
>                                         3: ^^^^^^^^^^
>     public static final Book    BOOK = new Book();//                   2: 
> ^^^^ 4: ^^^^
>     public final TableField<BookRecord, Integer> ID = /* ... *///             
>           3: ^^^^^^^^^^        5: ^^ }
> // 1: strategy.getJavaPackageName(table)// 2: 
> strategy.getJavaClassName(table)// 3: strategy.getJavaClassName(table, 
> Mode.RECORD)// 4: strategy.getJavaIdentifier(table)// 5: 
> strategy.getJavaIdentifier(column)
>
>  --
> 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.
>

-- 
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.

Reply via email to