Skip to content

Commit

Permalink
Fix TCK broken by jakartaee#639 so that it compiles again
Browse files Browse the repository at this point in the history
  • Loading branch information
njr-11 committed Apr 4, 2024
1 parent f369f5d commit 73b4451
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Stream<AsciiCharacter> findByHexadecimalIgnoreCaseBetweenAndHexadecimalNotIn(Str

Optional<AsciiCharacter> findByNumericValue(int id);

Page<AsciiCharacter> findByNumericValueBetween(int min, int max, PageRequest<AsciiCharacter> pagination);
Page<AsciiCharacter> findByNumericValueBetween(int min, int max, PageRequest pagination, Order<AsciiCharacter> order);

List<AsciiCharacter> findByNumericValueLessThanEqualAndNumericValueGreaterThanEqual(int max, int min);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public interface NaturalNumbers extends BasicRepository<NaturalNumber, Long>, Id
long countBy();

CursoredPage<NaturalNumber> findByFloorOfSquareRootOrderByIdAsc(long sqrtFloor,
PageRequest<NaturalNumber> pagination);
PageRequest pagination);

Stream<NaturalNumber> findByIdBetweenOrderByNumTypeAsc(long minimum,
long maximum,
Expand All @@ -58,20 +58,23 @@ List<NaturalNumber> findByIdGreaterThanEqual(long minimum,
List<NaturalNumber> findByIdLessThanEqual(long maximum, Sort<?>... sorts);

Page<NaturalNumber> findByIdLessThanOrderByFloorOfSquareRootDesc(long exclusiveMax,
PageRequest<NaturalNumber> pagination);
PageRequest pagination,
Order<NaturalNumber> order);

CursoredPage<NaturalNumber> findByNumTypeAndNumBitsRequiredLessThan(NumberType type,
short bitsUnder,
PageRequest<NaturalNumber> pagination);
Order<NaturalNumber> order,
PageRequest pagination);

NaturalNumber[] findByNumTypeNot(NumberType notThisType, Limit limit, Order<NaturalNumber> sorts);

Page<NaturalNumber> findByNumTypeAndFloorOfSquareRootLessThanEqual(NumberType type,
long maxSqrtFloor,
PageRequest<NaturalNumber> pagination);
PageRequest pagination,
Sort<NaturalNumber> sort);

@Query("SELECT id WHERE isOdd = true AND id BETWEEN 21 AND ?1 ORDER BY id ASC")
Page<Long> oddsFrom21To(long max, PageRequest<NaturalNumber> pageRequest);
Page<Long> oddsFrom21To(long max, PageRequest pageRequest);

@Query("WHERE isOdd = false AND numType = ee.jakarta.tck.data.framework.read.only.NaturalNumber.NumberType.PRIME")
Optional<NaturalNumber> two();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import ee.jakarta.tck.data.framework.read.only.NaturalNumber.NumberType;
import jakarta.data.Limit;
import jakarta.data.Order;
import jakarta.data.Sort;
import jakarta.data.page.CursoredPage;
import jakarta.data.page.Page;
import jakarta.data.page.PageRequest;
Expand All @@ -45,7 +46,8 @@ public interface PositiveIntegers extends BasicRepository<NaturalNumber, Long> {

CursoredPage<NaturalNumber> findByFloorOfSquareRootNotAndIdLessThanOrderByNumBitsRequiredDesc(long excludeSqrt,
long eclusiveMax,
PageRequest<NaturalNumber> pagination);
PageRequest pagination,
Order<NaturalNumber> order);

List<NaturalNumber> findByIsOddTrueAndIdLessThanEqualOrderByIdDesc(long max);

Expand All @@ -57,7 +59,7 @@ CursoredPage<NaturalNumber> findByFloorOfSquareRootNotAndIdLessThanOrderByNumBit

@Find
Page<NaturalNumber> findMatching(long floorOfSquareRoot, Short numBitsRequired, NumberType numType,
PageRequest<NaturalNumber> pagination);
PageRequest pagination, Sort<?>... sorts);

@Find
Optional<NaturalNumber> findNumber(long id);
Expand All @@ -73,5 +75,7 @@ Page<NaturalNumber> findMatching(long floorOfSquareRoot, Short numBitsRequired,
CursoredPage<NaturalNumber> withBitCountOrOfTypeAndBelow(@Param("bits") short bitsRequired,
@Param("type") NumberType numberType,
@Param("xmax") long exclusiveMax,
PageRequest<?> pageRequest);
Sort<NaturalNumber> sort1,
Sort<NaturalNumber> sort2,
PageRequest pageRequest);
}
Loading

0 comments on commit 73b4451

Please sign in to comment.