@@ -453,6 +453,10 @@ public QueryBuilder<T> notNull(Property<T> property) {
453
453
return this ;
454
454
}
455
455
456
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
457
+ // Integers
458
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
459
+
456
460
public QueryBuilder <T > equal (Property <T > property , long value ) {
457
461
verifyHandle ();
458
462
checkCombineCondition (nativeEqual (handle , property .getId (), value ));
@@ -554,22 +558,20 @@ public QueryBuilder<T> notIn(Property<T> property, int[] values) {
554
558
return this ;
555
559
}
556
560
561
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
562
+ // String
563
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
564
+
557
565
public QueryBuilder <T > equal (Property <T > property , String value ) {
558
566
verifyHandle ();
559
567
checkCombineCondition (nativeEqual (handle , property .getId (), value , false ));
560
568
return this ;
561
569
}
562
570
563
- // Help people with floating point equality...
564
-
565
- /**
566
- * Floating point equality is non-trivial; this is just a convenience for
567
- * {@link #between(Property, double, double)} with parameters(property, value - tolerance, value + tolerance).
568
- * When using {@link Query#setParameters(Property, double, double)},
569
- * consider that the params are the lower and upper bounds.
570
- */
571
- public QueryBuilder <T > equal (Property <T > property , double value , double tolerance ) {
572
- return between (property , value - tolerance , value + tolerance );
571
+ public QueryBuilder <T > equal (Property <T > property , String value , StringOrder order ) {
572
+ verifyHandle ();
573
+ checkCombineCondition (nativeEqual (handle , property .getId (), value , order == StringOrder .CASE_SENSITIVE ));
574
+ return this ;
573
575
}
574
576
575
577
public QueryBuilder <T > notEqual (Property <T > property , String value ) {
@@ -578,6 +580,12 @@ public QueryBuilder<T> notEqual(Property<T> property, String value) {
578
580
return this ;
579
581
}
580
582
583
+ public QueryBuilder <T > notEqual (Property <T > property , String value , StringOrder order ) {
584
+ verifyHandle ();
585
+ checkCombineCondition (nativeNotEqual (handle , property .getId (), value , order == StringOrder .CASE_SENSITIVE ));
586
+ return this ;
587
+ }
588
+
581
589
public QueryBuilder <T > contains (Property <T > property , String value ) {
582
590
verifyHandle ();
583
591
checkCombineCondition (nativeContains (handle , property .getId (), value , false ));
@@ -596,18 +604,6 @@ public QueryBuilder<T> endsWith(Property<T> property, String value) {
596
604
return this ;
597
605
}
598
606
599
- public QueryBuilder <T > equal (Property <T > property , String value , StringOrder order ) {
600
- verifyHandle ();
601
- checkCombineCondition (nativeEqual (handle , property .getId (), value , order == StringOrder .CASE_SENSITIVE ));
602
- return this ;
603
- }
604
-
605
- public QueryBuilder <T > notEqual (Property <T > property , String value , StringOrder order ) {
606
- verifyHandle ();
607
- checkCombineCondition (nativeNotEqual (handle , property .getId (), value , order == StringOrder .CASE_SENSITIVE ));
608
- return this ;
609
- }
610
-
611
607
public QueryBuilder <T > contains (Property <T > property , String value , StringOrder order ) {
612
608
verifyHandle ();
613
609
checkCombineCondition (nativeContains (handle , property .getId (), value , order == StringOrder .CASE_SENSITIVE ));
@@ -626,6 +622,23 @@ public QueryBuilder<T> endsWith(Property<T> property, String value, StringOrder
626
622
return this ;
627
623
}
628
624
625
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
626
+ // Floating point
627
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
628
+
629
+
630
+ // Help people with floating point equality...
631
+
632
+ /**
633
+ * Floating point equality is non-trivial; this is just a convenience for
634
+ * {@link #between(Property, double, double)} with parameters(property, value - tolerance, value + tolerance).
635
+ * When using {@link Query#setParameters(Property, double, double)},
636
+ * consider that the params are the lower and upper bounds.
637
+ */
638
+ public QueryBuilder <T > equal (Property <T > property , double value , double tolerance ) {
639
+ return between (property , value - tolerance , value + tolerance );
640
+ }
641
+
629
642
public QueryBuilder <T > less (Property <T > property , double value ) {
630
643
verifyHandle ();
631
644
checkCombineCondition (nativeLess (handle , property .getId (), value ));
0 commit comments