add some missing info to javadoc for @Find, @HQL, @SQL

This commit is contained in:
Gavin King 2024-01-19 20:11:58 +01:00
parent 2edd192b8d
commit 9a8f02bd21
3 changed files with 11 additions and 2 deletions

View File

@ -74,7 +74,7 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
* session object, instead of having a parameter of type
* {@code EntityManager}, and
* <li>the generated static metamodel class will actually implement
* the type which declares the method annotated {@code @SQL}.
* the type which declares the method annotated {@code @Find}.
* </ul>
* <p>
* Thus, the generated method may be called according to the following
@ -91,6 +91,7 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
* or one of the following types:
* <ul>
* <li>{@link java.util.List java.util.List&lt;E&gt;},
* <li>{@code io.smallrye.mutiny.Uni&lt;E&gt;}, when used with Hibernate Reactive,
* <li>{@link org.hibernate.query.Query org.hibernate.query.Query&lt;E&gt;},
* <li>{@link org.hibernate.query.SelectionQuery org.hibernate.query.SelectionQuery&lt;E&gt;},
* <li>{@link jakarta.persistence.Query jakarta.persistence.Query&lt;E&gt;}, or
@ -105,8 +106,14 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
* {@code @EmbeddedId} field of the entity, the finder method uses
* {@link jakarta.persistence.EntityManager#find(Class, Object)}
* to retrieve the entity.
* <li>Similarly, if there is one parameter, and its type matches the
* type of the {@link jakarta.persistence.IdClass IdClass} of the
* entity, the finder method uses
* {@link jakarta.persistence.EntityManager#find(Class, Object)}
* to retrieve the entity. In this case the parameter name is not
* significant.
* <li>If the parameters match exactly with the {@code @NaturalId}
* field of the entity, the finder method uses
* field or fields of the entity, the finder method uses
* {@link org.hibernate.Session#byNaturalId(Class)} to retrieve the
* entity.
* <li>Otherwise, the finder method builds and executes a

View File

@ -80,6 +80,7 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
* <ul>
* <li>an entity type,
* <li>{@link java.util.List},
* <li>{@code io.smallrye.mutiny.Uni}, when used with Hibernate Reactive,
* <li>{@link org.hibernate.query.Query},
* <li>{@link org.hibernate.query.SelectionQuery},
* <li>{@link jakarta.persistence.Query}, or

View File

@ -79,6 +79,7 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
* <ul>
* <li>an entity type,
* <li>{@link java.util.List},
* <li>{@code io.smallrye.mutiny.Uni}, when used with Hibernate Reactive,
* <li>{@link org.hibernate.query.Query},
* <li>{@link jakarta.persistence.Query}, or
* <li>{@link org.hibernate.query.NativeQuery}.