@@ -215,46 +215,111 @@ public PropertyQueryCondition<ENTITY> between(Date lowerBoundary, Date upperBoun
215
215
return new LongLongCondition <>(this , LongLongCondition .Operation .BETWEEN , lowerBoundary , upperBoundary );
216
216
}
217
217
218
- /** Creates an "equal ('=')" condition for this property. */
218
+ /**
219
+ * Creates an "equal ('=')" condition for this property.
220
+ * <p>
221
+ * Ignores case when matching results, e.g. {@code equal("example")} matches both "Example" and "example".
222
+ * <p>
223
+ * Use {@link #equal(String, StringOrder) equal(value, StringOrder.CASE_SENSITIVE)} to only match if case is equal.
224
+ * <p>
225
+ * Note: Use a case sensitive condition to utilize an {@link io.objectbox.annotation.Index @Index}
226
+ * on {@code property}, dramatically speeding up look-up of results.
227
+ *
228
+ * @see #equal(String, StringOrder)
229
+ */
219
230
public PropertyQueryCondition <ENTITY > equal (String value ) {
220
231
return new StringCondition <>(this , StringCondition .Operation .EQUAL , value );
221
232
}
222
233
223
- /** Creates an "equal ('=')" condition for this property. */
234
+ /**
235
+ * Creates an "equal ('=')" condition for this property.
236
+ * <p>
237
+ * Set {@code order} to {@link StringOrder#CASE_SENSITIVE StringOrder.CASE_SENSITIVE} to only match
238
+ * if case is equal. E.g. {@code equal("example", StringOrder.CASE_SENSITIVE)} only matches "example",
239
+ * but not "Example".
240
+ * <p>
241
+ * Note: Use a case sensitive condition to utilize an {@link io.objectbox.annotation.Index @Index}
242
+ * on {@code property}, dramatically speeding up look-up of results.
243
+ */
224
244
public PropertyQueryCondition <ENTITY > equal (String value , StringOrder order ) {
225
245
return new StringCondition <>(this , StringCondition .Operation .EQUAL , value , order );
226
246
}
227
247
228
- /** Creates a "not equal ('<>')" condition for this property. */
248
+ /**
249
+ * Creates a "not equal ('<>')" condition for this property.
250
+ * <p>
251
+ * Ignores case when matching results, e.g. {@code notEqual("example")} excludes both "Example" and "example".
252
+ * <p>
253
+ * Use {@link #notEqual(String, StringOrder) notEqual(value, StringOrder.CASE_SENSITIVE)} to only exclude
254
+ * if case is equal.
255
+ * <p>
256
+ * Note: Use a case sensitive condition to utilize an {@link io.objectbox.annotation.Index @Index}
257
+ * on {@code property}, dramatically speeding up look-up of results.
258
+ *
259
+ * @see #notEqual(String, StringOrder)
260
+ */
229
261
public PropertyQueryCondition <ENTITY > notEqual (String value ) {
230
262
return new StringCondition <>(this , StringCondition .Operation .NOT_EQUAL , value );
231
263
}
232
264
233
- /** Creates a "not equal ('<>')" condition for this property. */
265
+ /**
266
+ * Creates a "not equal ('<>')" condition for this property.
267
+ * <p>
268
+ * Set {@code order} to {@link StringOrder#CASE_SENSITIVE StringOrder.CASE_SENSITIVE} to only exclude
269
+ * if case is equal. E.g. {@code notEqual("example", StringOrder.CASE_SENSITIVE)} only excludes "example",
270
+ * but not "Example".
271
+ * <p>
272
+ * Note: Use a case sensitive condition to utilize an {@link io.objectbox.annotation.Index @Index}
273
+ * on {@code property}, dramatically speeding up look-up of results.
274
+ */
234
275
public PropertyQueryCondition <ENTITY > notEqual (String value , StringOrder order ) {
235
276
return new StringCondition <>(this , StringCondition .Operation .NOT_EQUAL , value , order );
236
277
}
237
278
238
- /** Creates a "greater than ('>')" condition for this property. */
279
+ /**
280
+ * Creates a "greater than ('>')" condition for this property.
281
+ * <p>
282
+ * Ignores case when matching results. Use the overload and pass
283
+ * {@link StringOrder#CASE_SENSITIVE StringOrder.CASE_SENSITIVE} to specify that case should not be ignored.
284
+ *
285
+ * @see #greater(String, StringOrder)
286
+ */
239
287
public PropertyQueryCondition <ENTITY > greater (String value ) {
240
288
return new StringCondition <>(this , StringCondition .Operation .GREATER , value );
241
289
}
242
290
243
- /** Creates a "greater than ('>')" condition for this property. */
291
+ /**
292
+ * Creates a "greater than ('>')" condition for this property.
293
+ */
244
294
public PropertyQueryCondition <ENTITY > greater (String value , StringOrder order ) {
245
295
return new StringCondition <>(this , StringCondition .Operation .GREATER , value , order );
246
296
}
247
297
248
- /** Creates a "less than ('<')" condition for this property. */
298
+ /**
299
+ * Creates a "less than ('<')" condition for this property.
300
+ * <p>
301
+ * Ignores case when matching results. Use the overload and pass
302
+ * {@link StringOrder#CASE_SENSITIVE StringOrder.CASE_SENSITIVE} to specify that case should not be ignored.
303
+ *
304
+ * @see #less(String, StringOrder)
305
+ */
249
306
public PropertyQueryCondition <ENTITY > less (String value ) {
250
307
return new StringCondition <>(this , StringCondition .Operation .LESS , value );
251
308
}
252
309
253
- /** Creates a "less than ('<')" condition for this property. */
310
+ /**
311
+ * Creates a "less than ('<')" condition for this property.
312
+ */
254
313
public PropertyQueryCondition <ENTITY > less (String value , StringOrder order ) {
255
314
return new StringCondition <>(this , StringCondition .Operation .LESS , value , order );
256
315
}
257
316
317
+ /**
318
+ * Ignores case when matching results. Use the overload and pass
319
+ * {@link StringOrder#CASE_SENSITIVE StringOrder.CASE_SENSITIVE} to specify that case should not be ignored.
320
+ *
321
+ * @see #contains(String, StringOrder)
322
+ */
258
323
public PropertyQueryCondition <ENTITY > contains (String value ) {
259
324
return new StringCondition <>(this , StringCondition .Operation .CONTAINS , value );
260
325
}
@@ -263,6 +328,12 @@ public PropertyQueryCondition<ENTITY> contains(String value, StringOrder order)
263
328
return new StringCondition <>(this , StringCondition .Operation .CONTAINS , value , order );
264
329
}
265
330
331
+ /**
332
+ * Ignores case when matching results. Use the overload and pass
333
+ * {@link StringOrder#CASE_SENSITIVE StringOrder.CASE_SENSITIVE} to specify that case should not be ignored.
334
+ *
335
+ * @see #startsWith(String, StringOrder)
336
+ */
266
337
public PropertyQueryCondition <ENTITY > startsWith (String value ) {
267
338
return new StringCondition <>(this , Operation .STARTS_WITH , value );
268
339
}
@@ -271,6 +342,12 @@ public PropertyQueryCondition<ENTITY> startsWith(String value, StringOrder order
271
342
return new StringCondition <>(this , Operation .STARTS_WITH , value , order );
272
343
}
273
344
345
+ /**
346
+ * Ignores case when matching results. Use the overload and pass
347
+ * {@link StringOrder#CASE_SENSITIVE StringOrder.CASE_SENSITIVE} to specify that case should not be ignored.
348
+ *
349
+ * @see #endsWith(String, StringOrder)
350
+ */
274
351
public PropertyQueryCondition <ENTITY > endsWith (String value ) {
275
352
return new StringCondition <>(this , Operation .ENDS_WITH , value );
276
353
}
@@ -279,12 +356,21 @@ public PropertyQueryCondition<ENTITY> endsWith(String value, StringOrder order)
279
356
return new StringCondition <>(this , Operation .ENDS_WITH , value , order );
280
357
}
281
358
282
- /** Creates an "IN (..., ..., ...)" condition for this property. */
359
+ /**
360
+ * Creates an "IN (..., ..., ...)" condition for this property.
361
+ * <p>
362
+ * Ignores case when matching results. Use the overload and pass
363
+ * {@link StringOrder#CASE_SENSITIVE StringOrder.CASE_SENSITIVE} to specify that case should not be ignored.
364
+ *
365
+ * @see #oneOf(String[], StringOrder)
366
+ */
283
367
public PropertyQueryCondition <ENTITY > oneOf (String [] values ) {
284
368
return new StringArrayCondition <>(this , StringArrayCondition .Operation .IN , values );
285
369
}
286
370
287
- /** Creates an "IN (..., ..., ...)" condition for this property. */
371
+ /**
372
+ * Creates an "IN (..., ..., ...)" condition for this property.
373
+ */
288
374
public PropertyQueryCondition <ENTITY > oneOf (String [] values , StringOrder order ) {
289
375
return new StringArrayCondition <>(this , StringArrayCondition .Operation .IN , values , order );
290
376
}
0 commit comments