Code generation POJOs could follow builder style

18 views
Skip to first unread message

kannan....@gmail.com

unread,
Jul 16, 2020, 7:02:28 AM7/16/20
to jOOQ User Group
I am working with JOOQ and trying to do code generation as shown in https://www.jooq.org/doc/3.14/manual-single-page/#code-generation

It works like a charm and generated great DAOs, table records and POJOs. The generated POJOs follow a traditional Java bean style approach with getters/setters. 

In our projects we are used to having domain objects immutable with Lombok annotations so we have builder classes, fluent method styles ex: order.withAmount(200).withCurrency("USD") etc. 

Is there any way we can get JOOQ to generate pojos with this flavour?

Lukas Eder

unread,
Jul 16, 2020, 8:09:51 AM7/16/20
to jOOQ User Group
Thanks for your message.

You can turn on <fluentSetters>true</fluentSetters> for this.

Hope this helps,
Lukas

--
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 jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/b70f2472-3f81-4e48-9d8a-02afd91800bco%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages