mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-24 10:38:57 +00:00
#823 - Remove deprecated API from PagedList
This commit is contained in:
@@ -112,13 +112,6 @@ public interface PagedList<T> {
|
||||
*/
|
||||
void loadCount();
|
||||
|
||||
/**
|
||||
* Deprecated in favor of loadCount().
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
void loadRowCount();
|
||||
|
||||
/**
|
||||
* Return the Future row count. You might get this if you wish to cancel the total row count query
|
||||
* or specify a timeout for the row count query.
|
||||
@@ -147,13 +140,6 @@ public interface PagedList<T> {
|
||||
*/
|
||||
Future<Integer> getFutureCount();
|
||||
|
||||
/**
|
||||
* Deprecated in favor of getFutureCount().
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
Future<Integer> getFutureRowCount();
|
||||
|
||||
/**
|
||||
* Return the list of entities for this page.
|
||||
*/
|
||||
@@ -186,13 +172,6 @@ public interface PagedList<T> {
|
||||
*/
|
||||
int getTotalCount();
|
||||
|
||||
/**
|
||||
* Deprecated in favor of getTotalCount().
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
int getTotalRowCount();
|
||||
|
||||
/**
|
||||
* Return the total number of pages based on the page size and total row count.
|
||||
* <p>
|
||||
|
||||
@@ -47,10 +47,6 @@ public class LimitOffsetPagedList<T> implements PagedList<T> {
|
||||
getFutureCount();
|
||||
}
|
||||
|
||||
public void loadRowCount() {
|
||||
loadCount();
|
||||
}
|
||||
|
||||
public Future<Integer> getFutureCount() {
|
||||
synchronized (monitor) {
|
||||
if (futureRowCount == null) {
|
||||
@@ -60,10 +56,6 @@ public class LimitOffsetPagedList<T> implements PagedList<T> {
|
||||
}
|
||||
}
|
||||
|
||||
public Future<Integer> getFutureRowCount() {
|
||||
return getFutureCount();
|
||||
}
|
||||
|
||||
public List<T> getList() {
|
||||
synchronized (monitor) {
|
||||
if (list == null) {
|
||||
@@ -110,10 +102,6 @@ public class LimitOffsetPagedList<T> implements PagedList<T> {
|
||||
}
|
||||
}
|
||||
|
||||
public int getTotalRowCount() {
|
||||
return getTotalCount();
|
||||
}
|
||||
|
||||
public boolean hasNext() {
|
||||
return (firstRow + maxRows) < getTotalCount();
|
||||
}
|
||||
|
||||
@@ -58,11 +58,11 @@ public class TestQueryFindPagedList extends BaseTestCase {
|
||||
.setMaxRows(3)
|
||||
.findPagedList();
|
||||
|
||||
Future<Integer> rowCount = pagedList.getFutureRowCount();
|
||||
Future<Integer> rowCount = pagedList.getFutureCount();
|
||||
List<Order> orders = pagedList.getList();
|
||||
|
||||
// these are each getting the total row count
|
||||
int totalRowCount = pagedList.getTotalRowCount();
|
||||
int totalRowCount = pagedList.getTotalCount();
|
||||
Integer totalRowCountWithTimeout = rowCount.get(30, TimeUnit.SECONDS);
|
||||
Integer totalRowCountViaFuture = rowCount.get();
|
||||
|
||||
@@ -81,7 +81,7 @@ public class TestQueryFindPagedList extends BaseTestCase {
|
||||
.setMaxRows(3)
|
||||
.findPagedList();
|
||||
|
||||
pagedList.loadRowCount();
|
||||
pagedList.loadCount();
|
||||
List<Order> orders = pagedList.getList();
|
||||
int totalRowCount = pagedList.getTotalCount();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user