HHH-18979 add Order/Restriction to jdoc for @Find and @HQL
This commit is contained in:
parent
f27e5e8be1
commit
aea72cccd5
|
@ -39,12 +39,25 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
|
||||||
* Notice that:
|
* Notice that:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>the types and names of the method parameters exactly match the
|
* <li>the types and names of the method parameters exactly match the
|
||||||
* types and names of the corresponding fields of the entity.
|
* types and names of the corresponding fields of the entity, and
|
||||||
* <li>there's no special naming convention for the {@code @Find}
|
* <li>there's no special naming convention for the {@code @Find}
|
||||||
* methods—they may be named arbitrarily, and their names
|
* methods—they may be named arbitrarily, and their names
|
||||||
* encode no semantics.
|
* encode no semantics.
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
|
* Alternatively, a method parameter may have the type
|
||||||
|
* {@link org.hibernate.query.range.Range Range<T>} where
|
||||||
|
* {@code T} is the type of the corresponding field in the entity.
|
||||||
|
* <pre>
|
||||||
|
* @Find
|
||||||
|
* Book getBookForIsbn(Range<String> isbn);
|
||||||
|
*
|
||||||
|
* @Find
|
||||||
|
* List<Book> getBooksWithTitle(Range<String> title);
|
||||||
|
* </pre>
|
||||||
|
* This allows the matching field to be restricted based on a variety
|
||||||
|
* of criteria expressed via the static factory methods of {@code Range}.
|
||||||
|
* <p>
|
||||||
* It's even possible to query by a field of an embedded object:
|
* It's even possible to query by a field of an embedded object:
|
||||||
* <pre>
|
* <pre>
|
||||||
* @Find
|
* @Find
|
||||||
|
@ -154,6 +167,17 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
|
||||||
* <li>return type {@link org.hibernate.query.KeyedResultList}, and
|
* <li>return type {@link org.hibernate.query.KeyedResultList}, and
|
||||||
* <li>a parameter of type {@link org.hibernate.query.KeyedPage}.
|
* <li>a parameter of type {@link org.hibernate.query.KeyedPage}.
|
||||||
* </ul>
|
* </ul>
|
||||||
|
* <p>
|
||||||
|
* Finally, a method might have a parameter of type
|
||||||
|
* {@link org.hibernate.query.Restriction Restriction<? super E>},
|
||||||
|
* allowing the caller to apply an arbitrary filtering criterion to
|
||||||
|
* the query results.
|
||||||
|
* <p>
|
||||||
|
* For example:
|
||||||
|
* <pre>
|
||||||
|
* @Find
|
||||||
|
* List<Book> getBooks(Restriction<Book> filter, List<Order<Book>> order);
|
||||||
|
* </pre>
|
||||||
*
|
*
|
||||||
* @see HQL
|
* @see HQL
|
||||||
* @see SQL
|
* @see SQL
|
||||||
|
|
|
@ -134,6 +134,17 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
|
||||||
* <li>a parameter of type {@link org.hibernate.query.KeyedPage}.
|
* <li>a parameter of type {@link org.hibernate.query.KeyedPage}.
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
|
* Finally, a method might have a parameter of type
|
||||||
|
* {@link org.hibernate.query.Restriction Restriction<? super E>},
|
||||||
|
* allowing the caller to apply an arbitrary filtering criterion to
|
||||||
|
* the query results.
|
||||||
|
* <p>
|
||||||
|
* For example:
|
||||||
|
* <pre>
|
||||||
|
* @HQL("from Book")
|
||||||
|
* List<Book> findBooks(Restriction<Book> filter, List<Order<Book>> order);
|
||||||
|
* </pre>
|
||||||
|
* <p>
|
||||||
* Queries specified using this annotation are always validated by
|
* Queries specified using this annotation are always validated by
|
||||||
* the Metamodel Generator, and so it isn't necessary to specify the
|
* the Metamodel Generator, and so it isn't necessary to specify the
|
||||||
* {@link CheckHQL} annotation.
|
* {@link CheckHQL} annotation.
|
||||||
|
|
Loading…
Reference in New Issue