Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
jOOQ Masterclass

You're reading from  jOOQ Masterclass

Product type Book
Published in Aug 2022
Publisher Packt
ISBN-13 9781800566897
Pages 764 pages
Edition 1st Edition
Languages
Author (1):
Anghel Leonard Anghel Leonard
Profile icon Anghel Leonard

Table of Contents (26) Chapters

Preface Part 1: jOOQ as a Query Builder, SQL Executor, and Code Generator
Chapter 1: Starting jOOQ and Spring Boot Chapter 2: Customizing the jOOQ Level of Involvement Part 2: jOOQ and Queries
Chapter 3: jOOQ Core Concepts Chapter 4: Building a DAO Layer (Evolving the Generated DAO Layer) Chapter 5: Tackling Different Kinds of SELECT, INSERT, UPDATE, DELETE, and MERGE Chapter 6: Tackling Different Kinds of JOINs Chapter 7: Types, Converters, and Bindings Chapter 8: Fetching and Mapping Part 3: jOOQ and More Queries
Chapter 9: CRUD, Transactions, and Locking Chapter 10: Exporting, Batching, Bulking, and Loading Chapter 11: jOOQ Keys Chapter 12: Pagination and Dynamic Queries Part 4: jOOQ and Advanced SQL
Chapter 13: Exploiting SQL Functions Chapter 14: Derived Tables, CTEs, and Views Chapter 15: Calling and Creating Stored Functions and Procedures Chapter 16: Tackling Aliases and SQL Templating Chapter 17: Multitenancy in jOOQ Part 5: Fine-tuning jOOQ, Logging, and Testing
Chapter 18: jOOQ SPI (Providers and Listeners) Chapter 19: Logging and Testing Other Books You May Enjoy

Configuring jOOQ to generate interfaces

Besides POJOs and DAOs, jOOQ can generate an interface for each table. Each column is associated with a getter and a setter. In Maven, this can be done as shown here:

<generate>
  <interfaces>true</interfaces>
  <immutableInterfaces>true</immutableInterfaces>
</generate>

Basically, jOOQ generates interfaces that look like Spring Data's so-called interfaces-based closed projections. We can use these interfaces for mapping results sets exactly as we do with closed projections.

Nevertheless, note that at the time of writing, this feature has been proposed to be removed. You can track the deprecation here: https://github.com/jOOQ/jOOQ/issues/10509.

Next, let's continue with the programmatic configuration of the jOOQ Code Generator.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}