io.sphere.sdk.queries.PagedQueryResultDsl Maven / Gradle / Ivy
package io.sphere.sdk.queries;
import java.util.List;
public class PagedQueryResultDsl extends PagedQueryResult {
PagedQueryResultDsl(final Integer offset, final Integer total, final List results) {
super(offset, total, results);
}
/**
* Creates a copy of this item with the given offset.
* @param offset the offset of the new copy
* @return the copy
*/
public PagedQueryResultDsl withOffset(final Integer offset) {
return PagedQueryResult.of(offset, getTotal(), getResults());
}
/**
* Creates a copy of this with the given total items count.
* @param total the number of total items in the backend.
* @return a copy with total as new total.
*/
public PagedQueryResultDsl withTotal(final Integer total) {
return PagedQueryResult.of(getOffset(), total, getResults());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy