further improvements to jdoc of @Find and @HQL
This commit is contained in:
parent
5c0486f840
commit
dfdf49dfa6
|
@ -47,6 +47,14 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
|
|||
* encode no semantics.
|
||||
* </ul>
|
||||
* <p>
|
||||
* It's even possible to query by a field of an embedded object:
|
||||
* <pre>
|
||||
* @Find
|
||||
* List<Book> publishedBooks(String publisher$name);
|
||||
* </pre>
|
||||
* Here, {@code publisher$name} refers to the field {@code name} of
|
||||
* the {@code Book}'s {@code Publisher}.
|
||||
* <p>
|
||||
* The Metamodel Generator automatically creates an "implementation"
|
||||
* of every finder method in the static metamodel class {@code Books_}.
|
||||
* The generated method may be called according to the following
|
||||
|
@ -133,6 +141,12 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
|
|||
* (varargs) where {@code E} is the entity type returned by the
|
||||
* query.
|
||||
* </ul>
|
||||
* <p>
|
||||
* For example:
|
||||
* <pre>
|
||||
* @Find
|
||||
* List<Book> getBooksWithTitle(String title, List<Order<Book>> order);
|
||||
* </pre>
|
||||
*
|
||||
* @see HQL
|
||||
* @see SQL
|
||||
|
|
|
@ -23,13 +23,13 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
|
|||
* For example:
|
||||
* <pre>
|
||||
* public interface Books {
|
||||
* @HQL("from Book where isbn = :isbn")
|
||||
* @HQL("where isbn = :isbn")
|
||||
* Book findBookByIsbn(String isbn);
|
||||
*
|
||||
* @HQL("from Book where title like ?1 order by title offset ?3 fetch first ?2 rows only")
|
||||
* @HQL("where title like ?1 order by title offset ?3 fetch first ?2 rows only")
|
||||
* List<Book> findBooksByTitleWithPagination(String title, int max, int start);
|
||||
*
|
||||
* @HQL("from Book where title like ?1")
|
||||
* @HQL("where title like ?1")
|
||||
* TypedQuery<Book> createBooksByTitleQuery(String title);
|
||||
* }
|
||||
* </pre>
|
||||
|
@ -111,6 +111,12 @@ import static java.lang.annotation.RetentionPolicy.CLASS;
|
|||
* query.
|
||||
* </ul>
|
||||
* <p>
|
||||
* For example:
|
||||
* <pre>
|
||||
* @HQL("where title like :title)
|
||||
* List<Book> findBooksByTitleWithPagination(String title, Page page, Order<Book> order);
|
||||
* </pre>
|
||||
* <p>
|
||||
* Queries specified using this annotation are always validated by
|
||||
* the Metamodel Generator, and so it isn't necessary to specify the
|
||||
* {@link CheckHQL} annotation.
|
||||
|
|
Loading…
Reference in New Issue