DATACMNS-469 - Removed deprecations.

This commit is contained in:
Oliver Gierke
2014-07-16 11:53:20 +02:00
parent 789f620af1
commit ed0f7c51f8
12 changed files with 34 additions and 171 deletions

View File

@@ -37,40 +37,4 @@ public interface Page<T> extends Slice<T> {
* @return the total amount of elements
*/
long getTotalElements();
/**
* Returns if there is a previous page.
*
* @deprecated use {@link #hasPrevious()} instead.
* @return if there is a previous page
*/
@Deprecated
boolean hasPreviousPage();
/**
* Returns whether the current page is the first one.
*
* @deprecated use {@link #isFirst()} instead.
* @return
*/
@Deprecated
boolean isFirstPage();
/**
* Returns if there is a next page.
*
* @deprecated use {@link #hasNext()} instead.
* @return if there is a next page
*/
@Deprecated
boolean hasNextPage();
/**
* Returns whether the current page is the last one.
*
* @deprecated use {@link #isLast()} instead.
* @return
*/
@Deprecated
boolean isLastPage();
}

View File

@@ -56,6 +56,7 @@ public class PageImpl<T> extends Chunk<T> implements Page<T> {
* (non-Javadoc)
* @see org.springframework.data.domain.Page#getTotalPages()
*/
@Override
public int getTotalPages() {
return getSize() == 0 ? 1 : (int) Math.ceil((double) total / (double) getSize());
}
@@ -64,40 +65,17 @@ public class PageImpl<T> extends Chunk<T> implements Page<T> {
* (non-Javadoc)
* @see org.springframework.data.domain.Page#getTotalElements()
*/
@Override
public long getTotalElements() {
return total;
}
/*
* (non-Javadoc)
* @see org.springframework.data.domain.Page#hasPreviousPage()
*/
public boolean hasPreviousPage() {
return hasPrevious();
}
/*
* (non-Javadoc)
* @see org.springframework.data.domain.Page#isFirstPage()
*/
public boolean isFirstPage() {
return isFirst();
}
/*
* (non-Javadoc)
* @see org.springframework.data.domain.Slice#hasNext()
*/
@Override
public boolean hasNext() {
return hasNextPage();
}
/*
* (non-Javadoc)
* @see org.springframework.data.domain.Page#hasNextPage()
*/
public boolean hasNextPage() {
return getNumber() + 1 < getTotalPages();
}
@@ -107,15 +85,7 @@ public class PageImpl<T> extends Chunk<T> implements Page<T> {
*/
@Override
public boolean isLast() {
return isLastPage();
}
/*
* (non-Javadoc)
* @see org.springframework.data.domain.Page#isLastPage()
*/
public boolean isLastPage() {
return !hasNextPage();
return !hasNext();
}
/*

View File

@@ -326,19 +326,6 @@ public class Sort implements Iterable<org.springframework.data.domain.Sort.Order
this.nullHandling = nullHandling == null ? NullHandling.NATIVE : nullHandling;
}
/**
* @deprecated use {@link Sort#Sort(Direction, List)} instead.
*/
@Deprecated
public static List<Order> create(Direction direction, Iterable<String> properties) {
List<Order> orders = new ArrayList<Sort.Order>();
for (String property : properties) {
orders.add(new Order(direction, property));
}
return orders;
}
/**
* Returns the order the property shall be sorted for.
*