Skip to content

Commit

Permalink
improve preamble of Generator.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Feb 3, 2024
1 parent c6c8d2c commit 1f6564d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions documentation/src/main/asciidoc/introduction/Generator.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down Expand Up @@ -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]
====
Expand Down

0 comments on commit 1f6564d

Please sign in to comment.