@@ -270,8 +270,8 @@ void andWhere() {
270270 @ Test
271271 void where_withSpecification () {
272272 var pedals = guitarPedalRepository .findAll (
273- SpecificationBuilder .withRoot (GuitarPedal .class )
274- .where (SpecificationBuilder .withRoot (GuitarPedal .class )
273+ SpecificationBuilder .from (GuitarPedal .class )
274+ .where (SpecificationBuilder .from (GuitarPedal .class )
275275 .where ().isNull (GuitarPedal_ .dateSold )
276276 .toSpecification ())
277277 .and ().isLike (GuitarPedal_ .name , "%and%" )
@@ -285,9 +285,9 @@ void where_withSpecification() {
285285 @ Test
286286 void and_withSpecification () {
287287 var pedals = guitarPedalRepository .findAll (
288- SpecificationBuilder .withRoot (GuitarPedal .class )
288+ SpecificationBuilder .from (GuitarPedal .class )
289289 .where ().isLike (GuitarPedal_ .name , "%and%" )
290- .and (SpecificationBuilder .withRoot (GuitarPedal .class )
290+ .and (SpecificationBuilder .from (GuitarPedal .class )
291291 .where ().isNull (GuitarPedal_ .dateSold )
292292 .toSpecification ())
293293 .toSpecification (), Sort .by ("name" ));
@@ -300,9 +300,9 @@ void and_withSpecification() {
300300 @ Test
301301 void or_withSpecification () {
302302 var pedals = guitarPedalRepository .findAll (
303- SpecificationBuilder .withRoot (GuitarPedal .class )
303+ SpecificationBuilder .from (GuitarPedal .class )
304304 .where ().isEqualTo (GuitarPedal_ .id , 2L )
305- .or (SpecificationBuilder .withRoot (GuitarPedal .class )
305+ .or (SpecificationBuilder .from (GuitarPedal .class )
306306 .where ().isEqualTo (GuitarPedal_ .id , 3L )
307307 .toSpecification ())
308308 .toSpecification (), Sort .by ("name" ));
@@ -316,7 +316,7 @@ void or_withSpecification() {
316316 @ Test
317317 void isEqualTo () {
318318 var optionalPedal = guitarPedalRepository .findOne (
319- SpecificationBuilder .withRoot (GuitarPedal .class )
319+ SpecificationBuilder .from (GuitarPedal .class )
320320 .isEqualTo (GuitarPedal_ .id , 3L )
321321 .toSpecification ());
322322 assertTrue (optionalPedal .isPresent ());
@@ -327,7 +327,7 @@ void isEqualTo() {
327327 @ Test
328328 void isNotEqualTo () {
329329 var pedals = guitarPedalRepository .findAll (
330- SpecificationBuilder .withRoot (GuitarPedal .class )
330+ SpecificationBuilder .from (GuitarPedal .class )
331331 .isNotEqualTo (GuitarPedal_ .id , 3L )
332332 .toSpecification ());
333333 assertEquals (3 , pedals .size ());
@@ -340,7 +340,7 @@ void isNotEqualTo() {
340340 @ Test
341341 void isLike () {
342342 var pedals = guitarPedalRepository .findAll (
343- SpecificationBuilder .withRoot (GuitarPedal .class )
343+ SpecificationBuilder .from (GuitarPedal .class )
344344 .isLike (GuitarPedal_ .name , "%and%" )
345345 .toSpecification (), Sort .by ("name" ));
346346 assertEquals (2 , pedals .size ());
@@ -351,7 +351,7 @@ void isLike() {
351351 @ Test
352352 void isNotLike () {
353353 var pedals = guitarPedalRepository .findAll (
354- SpecificationBuilder .withRoot (GuitarPedal .class )
354+ SpecificationBuilder .from (GuitarPedal .class )
355355 .isNotLike (GuitarPedal_ .name , "%and%" )
356356 .toSpecification (), Sort .by ("name" ));
357357 assertEquals (2 , pedals .size ());
@@ -361,7 +361,7 @@ void isNotLike() {
361361
362362 @ Test
363363 void isEqualToOrLike () {
364- var pedals = guitarPedalRepository .findAll (SpecificationBuilder .withRoot (GuitarPedal .class )
364+ var pedals = guitarPedalRepository .findAll (SpecificationBuilder .from (GuitarPedal .class )
365365 .isEqualToOrLike (GuitarPedal_ .name , "Deco%" )
366366 .toSpecification (), Sort .by ("name" ));
367367 assertEquals (1 , pedals .size ());
@@ -371,7 +371,7 @@ void isEqualToOrLike() {
371371 @ Test
372372 void isNull () {
373373 var pedals = guitarPedalRepository .findAll (
374- SpecificationBuilder .withRoot (GuitarPedal .class )
374+ SpecificationBuilder .from (GuitarPedal .class )
375375 .isNull (GuitarPedal_ .dateSold )
376376 .toSpecification (), Sort .by ("name" ));
377377 assertEquals (3 , pedals .size ());
@@ -386,7 +386,7 @@ void isNull() {
386386 @ Test
387387 void isNotNull () {
388388 var pedals = guitarPedalRepository .findAll (
389- SpecificationBuilder .withRoot (GuitarPedal .class )
389+ SpecificationBuilder .from (GuitarPedal .class )
390390 .isNotNull (GuitarPedal_ .dateSold )
391391 .toSpecification (), Sort .by ("name" ));
392392 assertEquals (1 , pedals .size ());
@@ -397,7 +397,7 @@ void isNotNull() {
397397 @ Test
398398 void isTrue () {
399399 var pedals = guitarPedalRepository .findAll (
400- SpecificationBuilder .withRoot (GuitarPedal .class )
400+ SpecificationBuilder .from (GuitarPedal .class )
401401 .isTrue (GuitarPedal_ .hasStereoOutput )
402402 .toSpecification (), Sort .by ("name" ));
403403 assertEquals (1 , pedals .size ());
@@ -409,7 +409,7 @@ void isTrue() {
409409 @ Test
410410 void isFalse () {
411411 var pedals = guitarPedalRepository .findAll (
412- SpecificationBuilder .withRoot (GuitarPedal .class )
412+ SpecificationBuilder .from (GuitarPedal .class )
413413 .isFalse (GuitarPedal_ .hasStereoOutput )
414414 .toSpecification (), Sort .by ("name" ));
415415 assertEquals (3 , pedals .size ());
@@ -424,7 +424,7 @@ void isFalse() {
424424 @ Test
425425 void isGreaterThan () {
426426 var pedals = guitarPedalRepository .findAll (
427- SpecificationBuilder .withRoot (GuitarPedal .class )
427+ SpecificationBuilder .from (GuitarPedal .class )
428428 .isGreaterThan (GuitarPedal_ .usedValue , 200 )
429429 .toSpecification (), Sort .by ("name" ));
430430 assertEquals (1 , pedals .size ());
@@ -435,7 +435,7 @@ void isGreaterThan() {
435435 @ Test
436436 void isGreaterThanOrEqualTo () {
437437 var pedals = guitarPedalRepository .findAll (
438- SpecificationBuilder .withRoot (GuitarPedal .class )
438+ SpecificationBuilder .from (GuitarPedal .class )
439439 .isGreaterThanOrEqualTo (GuitarPedal_ .usedValue , 200 )
440440 .toSpecification (), Sort .by ("name" ));
441441 assertEquals (2 , pedals .size ());
@@ -448,7 +448,7 @@ void isGreaterThanOrEqualTo() {
448448 @ Test
449449 void isLessThan () {
450450 var pedals = guitarPedalRepository .findAll (
451- SpecificationBuilder .withRoot (GuitarPedal .class )
451+ SpecificationBuilder .from (GuitarPedal .class )
452452 .isLessThan (GuitarPedal_ .usedValue , 150 )
453453 .toSpecification (), Sort .by ("name" ));
454454 assertEquals (1 , pedals .size ());
@@ -459,7 +459,7 @@ void isLessThan() {
459459 @ Test
460460 void isLessThanOrEqualTo () {
461461 var pedals = guitarPedalRepository .findAll (
462- SpecificationBuilder .withRoot (GuitarPedal .class )
462+ SpecificationBuilder .from (GuitarPedal .class )
463463 .isLessThanOrEqualTo (GuitarPedal_ .usedValue , 150 )
464464 .toSpecification (), Sort .by ("name" ));
465465 assertEquals (2 , pedals .size ());
@@ -472,7 +472,7 @@ void isLessThanOrEqualTo() {
472472 @ Test
473473 void isBetween () {
474474 var pedals = guitarPedalRepository .findAll (
475- SpecificationBuilder .withRoot (GuitarPedal .class )
475+ SpecificationBuilder .from (GuitarPedal .class )
476476 .isBetween (
477477 GuitarPedal_ .datePurchased ,
478478 LocalDate .of (2021 , 7 , 19 ),
@@ -488,7 +488,7 @@ void isBetween() {
488488 @ Test
489489 void isIn_collection () {
490490 var pedals = guitarPedalRepository .findAll (
491- SpecificationBuilder .withRoot (GuitarPedal .class )
491+ SpecificationBuilder .from (GuitarPedal .class )
492492 .isIn (GuitarPedal_ .id , List .of (2L , 3L ))
493493 .toSpecification (), Sort .by ("name" ));
494494 assertEquals (2 , pedals .size ());
@@ -501,7 +501,7 @@ void isIn_collection() {
501501 @ Test
502502 void isIn_array () {
503503 var pedals = guitarPedalRepository .findAll (
504- SpecificationBuilder .withRoot (GuitarPedal .class )
504+ SpecificationBuilder .from (GuitarPedal .class )
505505 .isIn (GuitarPedal_ .id , 2L , 3L )
506506 .toSpecification (), Sort .by ("name" ));
507507 assertEquals (2 , pedals .size ());
0 commit comments