jOOQ is an Object Relational Mapper (ORM). It provides a framework for mapping an object-oriented domain model to a relational database.


This module adds support for the Transactional annotation as well as setting up an DSLContext provider pre-configured with all the data sources configured via the datasource module. There is no special configuration to apply, just add the voidframework-persistence-jooq module to the pom.xml file of your project.



To work, jOOQ needs files generated during the compilation of the project. It is possible to generate the required classes in different ways (scan database, scan entity, …). For more information, please visit the official jOOQ website.

To enable code generation, add & customize the code below.





                <!-- A comma separated list of Java packages, that contain your entities -->

                <!-- Whether JPA 2.1 AttributeConverters should be auto-mapped to jOOQ Converters.
                     Custom <forcedType/> configurations will have a higher priority than these auto-mapped converters.
                     This defaults to true. -->

                <!-- The default schema for unqualified objects:

                     - public: all unqualified objects are located in the PUBLIC (upper case) schema
                     - none: all unqualified objects are located in the default schema (default)

                     This configuration can be overridden with the schema mapping feature -->

Working with transaction manually

final DSLContext dslContext = this.dslContextProvider.get();
dslContext.transaction((configuration) -> {
    /* insert/update/delete operations with configuration.dsl() */


@Table(name = "NEWS")
public class NewsModel {

    @Column(name = "ID", nullable = false)
    public String id;

    @Column(name = "TITLE", nullable = false)
    public String title;
public class NewsRepositoryImpl implements NewsRepository {

    private final Conversion conversion;
    private final Provider<DSLContext> dslContext;

    public NewsRepositoryImpl(final Conversion conversion,
                              final Provider<DSLContext> dslContextProvider) {
        this.conversion = conversion;
        this.dslContext = dslContext;

    public List<News> findAll() {
        final List<NewsModel> newsModelList = dslContextProvider.get()

        return conversion.convert(newsModelList, NewsModel.class, News.class);