本文整理了Java中org.springframework.data.domain.Pageable.unpaged()
方法的一些代码示例,展示了Pageable.unpaged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Pageable.unpaged()
方法的具体详情如下:
包路径:org.springframework.data.domain.Pageable
类名称:Pageable
方法名:unpaged
[英]Returns a Pageable instance representing no pagination setup.
[中]返回不表示分页设置的可分页实例。
代码示例来源:origin: spring-projects/spring-data-elasticsearch
public FacetedPageImpl(List<T> content, Pageable pageable, long total) {
super(content, ofNullable(pageable).orElse(Pageable.unpaged()), total);
}
代码示例来源:origin: spring-projects/spring-data-elasticsearch
public <T> Page<T> continueScroll(@Nullable String scrollId, long scrollTimeInMillis, Class<T> clazz) {
SearchScrollRequest request = new SearchScrollRequest(scrollId);
request.scroll(TimeValue.timeValueMillis(scrollTimeInMillis));
SearchResponse response;
try {
response = client.searchScroll(request);
} catch (IOException e) {
throw new ElasticsearchException("Error for search request with scroll: " + request.toString(), e);
}
return resultsMapper.mapResults(response, clazz, Pageable.unpaged());
}
代码示例来源:origin: spring-projects/spring-data-elasticsearch
public <T> Page<T> continueScroll(@Nullable String scrollId, long scrollTimeInMillis, Class<T> clazz,
SearchResultMapper mapper) {
SearchScrollRequest request = new SearchScrollRequest(scrollId);
request.scroll(TimeValue.timeValueMillis(scrollTimeInMillis));
SearchResponse response;
try {
response = client.searchScroll(request);
} catch (IOException e) {
throw new ElasticsearchException("Error for search request with scroll: " + request.toString(), e);
}
return mapper.mapResults(response, clazz, Pageable.unpaged());
}
代码示例来源:origin: spring-projects/spring-data-solr
/**
* @param criteria
*/
public SimpleQuery(Criteria criteria) {
this(criteria, Pageable.unpaged());
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Creates a new {@link SliceImpl} with the given content. This will result in the created {@link Slice} being
* identical to the entire {@link List}.
*
* @param content must not be {@literal null}.
*/
public SliceImpl(List<T> content) {
this(content, Pageable.unpaged(), false);
}
代码示例来源:origin: de.knightsoft-net/gwtp-spring-integration-shared
public DeserializeablePage(final List<T> content) {
this(content, Pageable.unpaged(), null == content ? 0 : content.size());
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Creates a new {@link PageImpl} with the given content. This will result in the created {@link Page} being identical
* to the entire {@link List}.
*
* @param content must not be {@literal null}.
*/
public PageImpl(List<T> content) {
this(content, Pageable.unpaged(), null == content ? 0 : content.size());
}
代码示例来源:origin: de.knightsoft-net/gwtp-spring-integration
public DeserializeablePage(final List<T> content) {
this(content, Pageable.unpaged(), null == content ? 0 : content.size());
}
代码示例来源:origin: com.github.derjust/spring-data-dynamodb
public UnpagedPageImpl(@NonNull List<T> content, long total) {
Assert.notNull(content, "content must not be null!");
this.pageable = Pageable.unpaged();
this.content = content;
this.total = total;
}
代码示例来源:origin: spring-projects/spring-data-r2dbc
DefaultSelectSpecSupport(String table) {
Assert.hasText(table, "Table name must not be null!");
this.table = table;
this.projectedFields = Collections.emptyList();
this.sort = Sort.unsorted();
this.page = Pageable.unpaged();
}
代码示例来源:origin: spring-projects/spring-data-solr
@Override
public Pageable getPageRequest() {
if (this.rows == null && this.offset == null) {
return Pageable.unpaged();
}
int rows = this.rows != null ? this.rows : DEFAULT_PAGE_SIZE;
long offset = this.offset != null ? this.offset : 0;
return new SolrPageRequest(rows != 0 ? (int) (offset / rows) : 0, rows, this.sort);
}
代码示例来源:origin: org.springframework.data/spring-data-r2dbc
DefaultSelectSpecSupport(String table) {
Assert.hasText(table, "Table name must not be null!");
this.table = table;
this.projectedFields = Collections.emptyList();
this.sort = Sort.unsorted();
this.page = Pageable.unpaged();
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Creates a new empty {@link Page}.
*
* @return
* @since 2.0
*/
static <T> Page<T> empty() {
return empty(Pageable.unpaged());
}
代码示例来源:origin: apache/servicemix-bundles
public Pageable getPageable() {
if (!parameters.hasPageableParameter()) {
return Pageable.unpaged();
}
Pageable pageable = (Pageable) values.get(parameters.getPageableIndex());
return pageable == null ? Pageable.unpaged() : pageable;
}
代码示例来源:origin: apache/servicemix-bundles
public Pageable previousPageable() {
return hasPrevious() ? pageable.previousOrFirst() : Pageable.unpaged();
}
代码示例来源:origin: VanRoy/spring-data-jest
public <T> Page<T> mapResults(SearchScrollResult response, Class<T> clazz) {
LinkedList<T> results = new LinkedList<>();
for (SearchScrollResult.Hit<JsonObject, Void> hit : response.getHits(JsonObject.class)) {
if (hit != null) {
results.add(mapSource(hit.source, clazz));
}
}
return new AggregatedPageImpl<>(results, Pageable.unpaged(), response.getTotal(), response.getScrollId());
}
代码示例来源:origin: spring-projects/spring-data-couchbase
public Pageable getPageable() {
return delegate.getPageable().isPaged() ? new CountPageable(delegate.getPageable()) : Pageable.unpaged();
}
代码示例来源:origin: spring-projects/spring-data-keyvalue
@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()));
}
代码示例来源:origin: org.springframework.data/spring-data-keyvalue
@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()));
}
代码示例来源:origin: apache/servicemix-bundles
@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()));
}
内容来源于网络,如有侵权,请联系作者删除!