File tree 2 files changed +23
-3
lines changed
hibernate-core/src/main/java/org/hibernate/annotations/processing
2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 47
47
* encode no semantics.
48
48
* </ul>
49
49
* <p>
50
+ * It's even possible to query by a field of an embedded object:
51
+ * <pre>
52
+ * @Find
53
+ * List<Book> publishedBooks(String publisher$name);
54
+ * </pre>
55
+ * Here, {@code publisher$name} refers to the field {@code name} of
56
+ * the {@code Book}'s {@code Publisher}.
57
+ * <p>
50
58
* The Metamodel Generator automatically creates an "implementation"
51
59
* of every finder method in the static metamodel class {@code Books_}.
52
60
* The generated method may be called according to the following
133
141
* (varargs) where {@code E} is the entity type returned by the
134
142
* query.
135
143
* </ul>
144
+ * <p>
145
+ * For example:
146
+ * <pre>
147
+ * @Find
148
+ * List<Book> getBooksWithTitle(String title, List<Order<Book>> order);
149
+ * </pre>
136
150
*
137
151
* @see HQL
138
152
* @see SQL
Original file line number Diff line number Diff line change 23
23
* For example:
24
24
* <pre>
25
25
* public interface Books {
26
- * @HQL("from Book where isbn = :isbn")
26
+ * @HQL("where isbn = :isbn")
27
27
* Book findBookByIsbn(String isbn);
28
28
*
29
- * @HQL("from Book where title like ?1 order by title offset ?3 fetch first ?2 rows only")
29
+ * @HQL("where title like ?1 order by title offset ?3 fetch first ?2 rows only")
30
30
* List<Book> findBooksByTitleWithPagination(String title, int max, int start);
31
31
*
32
- * @HQL("from Book where title like ?1")
32
+ * @HQL("where title like ?1")
33
33
* TypedQuery<Book> createBooksByTitleQuery(String title);
34
34
* }
35
35
* </pre>
111
111
* query.
112
112
* </ul>
113
113
* <p>
114
+ * For example:
115
+ * <pre>
116
+ * @HQL("where title like :title)
117
+ * List<Book> findBooksByTitleWithPagination(String title, Page page, Order<Book> order);
118
+ * </pre>
119
+ * <p>
114
120
* Queries specified using this annotation are always validated by
115
121
* the Metamodel Generator, and so it isn't necessary to specify the
116
122
* {@link CheckHQL} annotation.
You can’t perform that action at this time.
0 commit comments