Skip to content

Commit

Permalink
Merge pull request #3 from BlackBeltTechnology/JNG-1596_pagination
Browse files Browse the repository at this point in the history
Jng 1596 pagination
  • Loading branch information
borcsokj authored Oct 19, 2020
2 parents 60500d1 + a261326 commit 82201ef
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/main/java/hu/blackbelt/judo/dao/api/DAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ public interface DAO<ID> {
* @param clazz mapped transfer object type
* @param filter filter expression
* @param orderByList order by clauses
* @param seek seek parameters (limit, last item, reverse pagination)
* @returnlist of instances
*/
List<Payload> search(EClass clazz, String filter, List<OrderBy> orderByList);
List<Payload> search(EClass clazz, String filter, List<OrderBy> orderByList, Seek seek);

/**
* Get instance of a given mapped transfer object type by the given identifier.
Expand Down Expand Up @@ -168,10 +169,11 @@ public interface DAO<ID> {
* @param reference static navigation
* @param clazz mapped transfer object type
* @param orderByList order by clauses
* @return all instances that are matching a static navigation
* @oaram filter filter expression
* @param seek seek parameters (limit, last item, reverse pagination)
* @return all instances that are matching a static navigation
*/
List<Payload> searchReferencedInstancesOf(EReference reference, EClass clazz, String filter, List<OrderBy> orderByList);
List<Payload> searchReferencedInstancesOf(EReference reference, EClass clazz, String filter, List<OrderBy> orderByList, Seek seek);

/**
* Update a mapped transfer object of a given reference (static navigation).
Expand Down Expand Up @@ -267,9 +269,10 @@ public interface DAO<ID> {
* @param reference transfer object reference
* @param filter filter expression
* @param orderByList order by clauses
* @param seek seek parameters (limit, last item, reverse pagination)
* @return list of instances
*/
List<Payload> searchNavigationResultAt(ID id, EReference reference, String filter, List<OrderBy> orderByList);
List<Payload> searchNavigationResultAt(ID id, EReference reference, String filter, List<OrderBy> orderByList, Seek seek);

/**
* Create a mapped transfer object of a given reference from a given mapped transfer object.
Expand Down Expand Up @@ -370,4 +373,15 @@ class OrderBy {

private boolean descending;
}

@Getter
@Builder
class Seek {

private int limit;

private boolean reverse;

private Payload lastItem;
}
}

0 comments on commit 82201ef

Please sign in to comment.