@Override public Page<T> findAll(Pageable pageable) { Assert.notNull(pageable, "Pageable must not be null!"); if (pageable.isUnpaged()) { List<T> result = findAll(); return new PageImpl<>(result, Pageable.unpaged(), result.size()); } Iterable<T> content = operations.findInRange(pageable.getOffset(), pageable.getPageSize(), pageable.getSort(), entityInformation.getJavaType()); return new PageImpl<>(IterableConverter.toList(content), pageable, this.operations.count(entityInformation.getJavaType())); }
@Override public Page<T> findAll(Pageable pageable) { Assert.notNull(pageable, "Pageable must not be null!"); if (pageable.isUnpaged()) { List<T> result = findAll(); return new PageImpl<>(result, Pageable.unpaged(), result.size()); } Iterable<T> content = operations.findInRange(pageable.getOffset(), pageable.getPageSize(), pageable.getSort(), entityInformation.getJavaType()); return new PageImpl<>(IterableConverter.toList(content), pageable, this.operations.count(entityInformation.getJavaType())); }
@Override public Page<T> findAll(Pageable pageable) { Assert.notNull(pageable, "Pageable must not be null!"); if (pageable.isUnpaged()) { List<T> result = findAll(); return new PageImpl<>(result, Pageable.unpaged(), result.size()); } Iterable<T> content = operations.findInRange(pageable.getOffset(), pageable.getPageSize(), pageable.getSort(), entityInformation.getJavaType()); return new PageImpl<>(IterableConverter.toList(content), pageable, this.operations.count(entityInformation.getJavaType())); }