File tree 2 files changed +29
-0
lines changed
api/src/main/java/jakarta/persistence/criteria
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,14 @@ public interface CriteriaBuilder {
266
266
*/
267
267
Predicate and (Predicate ... restrictions );
268
268
269
+ /**
270
+ * Create a conjunction of the given restriction predicates.
271
+ * A conjunction of zero predicates is true.
272
+ * @param restrictions a list of zero or more restriction predicates
273
+ * @return and predicate
274
+ */
275
+ Predicate and (List <Predicate > restrictions );
276
+
269
277
/**
270
278
* Create a disjunction of the given boolean expressions.
271
279
* @param x boolean expression
@@ -282,6 +290,14 @@ public interface CriteriaBuilder {
282
290
*/
283
291
Predicate or (Predicate ... restrictions );
284
292
293
+ /**
294
+ * Create a disjunction of the given restriction predicates.
295
+ * A disjunction of zero predicates is false.
296
+ * @param restrictions a list of zero or more restriction predicates
297
+ * @return or predicate
298
+ */
299
+ Predicate or (List <Predicate > restrictions );
300
+
285
301
/**
286
302
* Create a negation of the given restriction.
287
303
* @param restriction restriction expression
Original file line number Diff line number Diff line change @@ -204,6 +204,19 @@ public interface CriteriaQuery<T> extends AbstractQuery<T> {
204
204
*/
205
205
CriteriaQuery <T > where (Predicate ... restrictions );
206
206
207
+ /**
208
+ * Modify the query to restrict the query result according
209
+ * to the conjunction of the specified restriction predicates.
210
+ * Replaces the previously added restriction(s), if any.
211
+ * If no restrictions are specified, any previously added
212
+ * restrictions are simply removed.
213
+ * This method only overrides the return type of the
214
+ * corresponding <code>AbstractQuery</code> method.
215
+ * @param restrictions a list of zero or more restriction predicates
216
+ * @return the modified query
217
+ */
218
+ CriteriaQuery <T > where (List <Predicate > restrictions );
219
+
207
220
/**
208
221
* Specify the expressions that are used to form groups over
209
222
* the query results.
You can’t perform that action at this time.
0 commit comments