0

I am creating a functionality for search where user can select the desired option and based on that it should filter the record from DB and display the response with pagination

This is my search page. https://i.stack.imgur.com/AWXOC.png

This is my entity class

@Entity
@Table(name = "userDetails")
public class UserDetails {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)

private int age;
    private String manglik;
    private String maritalStatus;
    private String manglikStatus;
    private String religion;
    private String caste;
    private String location;

and this is my Repository class...

public interface UserDetailsRepository extends JpaRepository<UserDetails, Integer>, JpaSpecificationExecutor<UserDetails> {

So, please help me how do I fetch the record and show the result to user with pagination.

I have tried with all the possibilities based on my experience but I am unable to perform search. As these all fields are optionals, so, User can select any of the field. Main issue I am getting with to get the result between specified fields only and result should be showing with pagination.

Please help me how do I make it function?

João Dias
  • 16,277
  • 6
  • 33
  • 45
Ravi
  • 1
  • 4

0 Answers0