Replace deprecated of hasNext and hasPrevious to hasNextPage and hasPreviousPage

This PR is to fix #18