Saturday, February 2, 2013

Spring Data JPA Tutorials

http://www.petrikainulainen.net/spring-data-jpa-tutorial/
The goal of the Spring Data JPA is to make the implementation of data access layer easier and faster. (...) This tutorial is based on Spring Data JPA 1.0.2 (...)

Part One: Configuration describes how you can get the required dependencies with Maven and configure your application.
Part Two: CRUD helps you to implement a simple CRUD application by using Spring Data JPA.
Part Three: Custom Queries with Query Methods describes how you can create custom queries by adding query methods to your repository interfaces.
Part Four: JPA Criteria Queries teaches you to create dynamic queries by using the JPA Criteria API.
Part Five: Querydsl describes how you can create custom queries with Querydsl and Spring Data JPA.
Part Six: Sorting describes how you can sort your query results.
Part Seven: Pagination helps you to paginate your query results.
Part Eight: Adding Functionality to a Repository describes how you can add custom functions to a single repository.
Part Nine: Conclusions evaluates the usefulness of Spring Data JPA, gives recommendations about its usage and provides links to useful resources.


http://blog.springsource.org/2011/02/10/getting-started-with-spring-data-jpa/
In the course of this blog post we have reduced the amount of code to be written for repositories to two interfaces with 3 methods and a single line of XML. We have type safe CRUD methods, query execution and pagination built right in. The cool thing is that this is not only working for JPA based repositories but also for non-relational databases.


http://blog.jeroenreijn.com/2011/07/getting-started-with-mongodb-and-spring.html
MongoDB is as they describe it on their website: A scalable, high-performance, open source, document-oriented database.

Spring Data makes it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services as well as provide improved support for relational database technologies. Spring Data is an umbrella open source project which contains many subprojects that are specific to a given database.