HHH-16000 improve javadoc for @HQLSelect and @SQLSelect

This commit is contained in:
Gavin 2023-01-07 20:06:48 +01:00
parent f8f6e4d541
commit 0007820aba
2 changed files with 19 additions and 3 deletions

View File

@ -16,8 +16,14 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/** /**
* Specifies a custom HQL/JPQL query to be used in place of the default SQL * Specifies a custom HQL/JPQL query to be used in place of the default SQL
* generated by Hibernate when an entity or collection is loaded from the * generated by Hibernate when an entity or collection is fetched from the
* database. * database by id. This occurs when:
* <ul>
* <li>an association to an entity is fetched lazily,
* <li>a collection is fetched lazily, or
* <li>when an entity is retrieved using {@link org.hibernate.Session#get}
* or {@link org.hibernate.Session#find}.
* </ul>
* <p> * <p>
* The given {@linkplain #query HQL query} must have exactly one parameter * The given {@linkplain #query HQL query} must have exactly one parameter
* which accepts the {@linkplain jakarta.persistence.Id id} of the entity * which accepts the {@linkplain jakarta.persistence.Id id} of the entity
@ -25,6 +31,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* in the select list, and that item must be the correct type of entity or * in the select list, and that item must be the correct type of entity or
* collection element. * collection element.
* *
* @see SQLSelect
*
* @author Gavin King * @author Gavin King
* *
* @since 6.2 * @since 6.2

View File

@ -19,7 +19,13 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/** /**
* Specifies a custom SQL query to be used in place of the default SQL * Specifies a custom SQL query to be used in place of the default SQL
* generated by Hibernate when an entity or collection is loaded from the * generated by Hibernate when an entity or collection is loaded from the
* database. * database by id. This occurs when:
* <ul>
* <li>an association to an entity is fetched lazily,
* <li>a collection is fetched lazily, or
* <li>when an entity is retrieved using {@link org.hibernate.Session#get}
* or {@link org.hibernate.Session#find}.
* </ul>
* <p> * <p>
* The given {@linkplain #sql SQL statement} must have exactly the number * The given {@linkplain #sql SQL statement} must have exactly the number
* of JDBC {@code ?} parameters that Hibernate expects, that is, one for * of JDBC {@code ?} parameters that Hibernate expects, that is, one for
@ -44,6 +50,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* of basic-typed values. * of basic-typed values.
* </ol> * </ol>
* *
* @see HQLSelect
*
* @author Gavin King * @author Gavin King
* *
* @since 6.2 * @since 6.2