Review and edit the 'Repositories and Apache Geode or Pivotal GemFire' chapter.
This commit is contained in:
@@ -1,26 +1,25 @@
|
||||
[[geode-repositories]]
|
||||
== Repositories and Apache Geode or Pivotal GemFire
|
||||
|
||||
Using Spring Data Repositories with Apache Geode or Pivotal GemFire makes short work of data access operations
|
||||
when using either Apache Geode or Pivotal GemFire as your System of Record (SOR), persisting your application's
|
||||
state.
|
||||
Using Spring Data Repositories with Apache Geode or Pivotal GemFire makes short work of data access operations when
|
||||
using either Apache Geode or Pivotal GemFire as your System of Record (SOR) to persist your application's state.
|
||||
|
||||
{spring-data-commons-docs-html}/#repositories[Spring Data Repositories] provides a convenient and highly powerful way
|
||||
to define basic CRUD and simply query data access operations simply by specifying the contract of those data access
|
||||
operations with a Java interface.
|
||||
to define basic CRUD and simple query data access operations easily just by specifying the contract of those data access
|
||||
operations in a Java interface.
|
||||
|
||||
Spring Boot for Apache Geode & Pivotal GemFire _auto-configures_ the Spring Data for Apache Geode/Pivotal GemFire
|
||||
{spring-data-geode-docs-html}/#gemfire-repositories[Repository infrastructure and extension] when either is
|
||||
declared on your application's classpath. You do not need to do anything special to enable it. Simply start coding
|
||||
your application-specific Repository interface extensions and the way you go.
|
||||
{spring-data-geode-docs-html}/#gemfire-repositories[Repository extension] when either is declared on your application's
|
||||
classpath. You do not need to do anything special to enable it. Simply start coding your application-specific
|
||||
Repository interfaces and the way you go.
|
||||
|
||||
For example:
|
||||
|
||||
Define the `Customer` application domain object modeling customers and map it to the GemFire/Geode "Customers" Region
|
||||
using SDG's {spring-data-geode-javadoc}/org/springframework/data/gemfire/mapping/annotation/Region.html[`@Region`]
|
||||
mapping annotation:
|
||||
Define a `Customer` class to model customers and map it to the GemFire/Geode "Customers" Region using the SDG
|
||||
{spring-data-geode-javadoc}/org/springframework/data/gemfire/mapping/annotation/Region.html[`@Region`] mapping
|
||||
annotation:
|
||||
|
||||
.Customer application domain object
|
||||
.`Customer` entity class
|
||||
[source,java]
|
||||
----
|
||||
package example.app.model;
|
||||
@@ -38,9 +37,9 @@ class Customer {
|
||||
}
|
||||
----
|
||||
|
||||
Declare your _Repository_ (Data Access Object (DAO)) for `Customers`...
|
||||
Declare your _Repository_ (a.k.a. {wikipedia-docs}/Data_access_object[Data Access Object (DAO)]) for `Customers`...
|
||||
|
||||
.CustomerRepository for peristing and accessing `Customers`
|
||||
.`CustomerRepository` for peristing and accessing `Customers`
|
||||
[source,java]
|
||||
----
|
||||
package example.app.repo;
|
||||
|
||||
Reference in New Issue
Block a user