Feature: Pagination, Search, Filtering and Sorting (Notes and Quizzes)#16
Merged
Feature: Pagination, Search, Filtering and Sorting (Notes and Quizzes)#16
Conversation
…eature/pagination
pvdev1805
approved these changes
Feb 3, 2026
Collaborator
pvdev1805
left a comment
There was a problem hiding this comment.
Verified the changes, all features tested and working as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces pagination, search, filtering, and sorting capabilities for the notes and quizzes features.
Detail changes
Pagination
PageResponse<T>class that standardizes paginated responses by containing both the page metadata (current page, total pages, page size, total elements) and the page content.Page<T>instead ofList<T>to prevent loading large datasets into memory.getAllmethods to use Spring Data’sPageableinstead of retrieving all records. The service now:Pageableobject (with pagination + sorting).Page<T>from the repository.PageResponse<T>.pageandsizeparameters. If omitted, default values fromcommon/DefaultConstants.javaare appliedSearch and Filtering
JpaSpecificationExecutor<T>to support dynamic filtering via JPA Specifications.@ModelAttribute:BasicFilterDTO: supports keyword search and date-range filtering.QuizFilterDTO: extendsBasicFilterDTOand addsquizSetIdfor filtering quizzes belonging to a specific quiz set.CommonPredicateBuilder: provides reusable predicate helpers to reduce duplication across specifications.NoteSpecificationBuilder,QuizSpecificationBuilder, andQuizSetSpecificationBuilder: construct entity-specific filtering logic used by repositories.Sorting
sortByandsortOrderparameters. Defaults to sorting byupdatedAtin descending order.Pageableconfiguration before querying the repository.Testing
Remaining & Upcomming Works