O'Reilly logo

Spring Data by Petri Kainulainen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we have learned that:

  • We can use query generation from method name, named queries, or the @Query annotation for the purpose of creating query methods with Spring Data JPA
  • We can create dynamic queries by using either JPA Criteria API or Querydsl
  • There are three different methods we can use to sort query results
  • If we are paginating the query results of a query method, the return type of the method can be either List or Page
  • Each query creation method has its strengths and weaknesses that we must consider when we are selecting the correct solution for the current problem

Sometimes we need to add custom functions to our repositories. This issue is addressed in the next chapter.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required