Skip to content

Commit

Permalink
Add result transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
uwburn committed Mar 22, 2022
1 parent 3a59f7f commit 5f6cd0c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ public int getPageSize() {
public int getPages() {
return (int) Math.round(Math.ceil(count.doubleValue() / pageSize));
}

public <V> List<V> transform(JpaJsonSearchResultTransformer<T> transformer) {
return transformer.transform(values);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package it.mgt.uti.jpajsonsearch;

import java.util.List;

public interface JpaJsonSearchResultTransformer<T> {

<V> List<V> transform(List<T> result);

}

0 comments on commit 5f6cd0c

Please sign in to comment.