Skip to content

Commit

Permalink
feat: create select with cursoredPage
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Mar 30, 2024
1 parent 3abaaad commit f17cbac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Expand Up @@ -10,6 +10,9 @@
*/
package org.eclipse.jnosql.mapping.semistructured;

import jakarta.data.page.CursoredPage;
import jakarta.data.page.Page;
import jakarta.data.page.PageRequest;
import org.eclipse.jnosql.mapping.PreparedStatement;
import jakarta.nosql.Template;
import org.eclipse.jnosql.communication.semistructured.DeleteQuery;
Expand Down Expand Up @@ -154,4 +157,15 @@ public interface SemistructuredTemplate extends Template {
* @throws NullPointerException when type is null
*/
<T> void deleteAll(Class<T> type);

/**
* Select entities using pagination
*
* @param query - query to figure out entities
* @param pageRequest - page definition
* @param <T> the instance type
* @return a {@link CursoredPage} instance
* @throws NullPointerException when query or pageRequest is null
*/
<T> CursoredPage<T> select(SelectQuery query, PageRequest<T> pageRequest);
}
Expand Up @@ -16,7 +16,7 @@

import jakarta.data.page.Page;
import jakarta.data.page.PageRequest;
;

import org.eclipse.jnosql.communication.semistructured.SelectQuery;
import org.eclipse.jnosql.mapping.core.NoSQLPage;
import org.eclipse.jnosql.mapping.semistructured.SemistructuredTemplate;
Expand Down

0 comments on commit f17cbac

Please sign in to comment.