improve preamble of Generator.adoc

This commit is contained in:
Gavin King 2024-02-03 13:39:53 +01:00
parent c6c8d2cc0f
commit 1f6564d345
1 changed files with 9 additions and 3 deletions

View File

@ -130,9 +130,14 @@ The Metamodel Generator is not currently able to generate finder methods and que
We're going to meet three different kinds of generated method:
- a _named query method_ has its signature and implementation generated directly from a `@NamedQuery` annotation,
- a _query method_ has a signature that's explicitly declared, and a generated implementation which executes a HQL or SQL query specified via a `@HQL` or `@SQL` annotation, and
- a _finder method_ annotated `@Find` has a signature that's explicitly declared, and a generated implementation inferred from the parameter list.
- a _<<generated-named-queries,named query method>>_ has its signature and implementation generated directly from a `@NamedQuery` annotation,
- a _<<generated-query-methods,query method>>_ has a signature that's explicitly declared, and a generated implementation which executes a HQL or SQL query specified via a `@HQL` or `@SQL` annotation, and
- a _<<generated-finder-methods,finder method>>_ annotated `@Find` has a signature that's explicitly declared, and a generated implementation inferred from the parameter list.
We're also going to see two ways that these methods can be called:
- as static methods of a generated abstract class, or
- as <<static-or-instance,instance methods of an interface>> with a generated implementation which may even be <<cdi-bean-injection,injected>>.
To whet our appetites, let's see how this works for a `@NamedQuery`.
@ -355,6 +360,7 @@ interface Queries {
What if we would like to inject a `Queries` object instead of calling its constructor directly?
[[cdi-bean-injection]]
[%unbreakable]
[TIP]
====