Part Ⅰ.Background 3
1.The Spring Data Project 3
NoSQL Data Access for Spring Developers 3
General Themes 5
TheDomain 6
The Sample Code 6
Importing the Source Code into Your IDE 7
2.Repositories:Convenient Data Access Layers 13
Quick Start 13
Defining Query Methods 16
Query Lookup Strategies 16
Query Derivation 17
Pagination and Sorting 18
Defining Repositories 19
Fine-Tuning Repository Interfaces 20
Manually Implementing Repository Methods 21
IDE Integration 22
IntelliJ IDEA 25
3.Type-Safe Querying Using Querydsl 27
Introduction to Querydsl 27
Generating the Query Metamodel 30
Build System Integration 30
Supported Annotation Processors 31
Querying Stores Using Querydsl 32
Integration with Spring Data Repositories 32
Executing Predicates 33
Manually Implementing Repositories 34
Part Ⅱ.Relational Databases 37
4.JPA Repositories 37
The Sample Project 37
The Traditional Approach 42
Bootstrapping the Sample Code 44
Using Spring Data Repositories 47
Transactionality 50
Repository Querydsl Integration 51
5.Type-Safe JDBC Programming with Querydsl SQL 53
The Sample Project and Setup 53
The HyperSQL Database 54
The SQL Module of Querydsl 54
Build System Integration 58
The Database Schema 59
The Domain Implementation of the Sample Project 60
The QueryDslJdbcTemplate 63
Executing Queries 64
The Beginning of the Repository Implementation 64
Querying for a Single Object 65
The OneToManyResultSetExtractor Abstract Class 67
The CustomerListExtractor Implementation 68
The Implementations for the RowMappers 69
Querying for a List of Objects 71
Insert,Update,and Delete Operations 71
Inserting with the SQLInsertClause 71
Updating with the SQLUpdateClause 72
Deleting Rows with the SQLDeleteClause 73
Part Ⅲ.NoSQL 77
6.MongoDB:A Document Store 77
MongoDB in a Nutshell 77
Setting Up MongoDB 78
Using the MongoDB Shell 79
The MongoDB Java Driver 80
Setting Up the Infrastructure Using the Spring Namespace 81
The Mapping Subsystem 83
The Domain Model 83
Setting Up the Mapping Infrastructure 89
Indexing 91
Customizing Conversion 91
MongoTemplate 94
Mongo Repositories 96
Infrastructure Setup 96
Repositories in Detail 97
Mongo Querydsl Integration 99
7.Neo4j:A Graph Database 101
Graph Databases 101
Neo4j 102
Spring Data Neo4j Overview 105
Modeling the Domain as a Graph 106
Persisting Domain Objects with Spring Data Neo4j 111
Neo4jTemplate 112
Combining Graph and Repository Power 113
Basic Graph Repository Operations 115
Derived and Annotated Finder Methods 116
Advanced Graph Use Cases in the Example Domain 119
Multiple Roles for a Single Node 119
Product Categories and Tags as Examples for In-Graph Indexes 120
Leverage Similar Interests(Collaborative Filtering) 121
Recommendations 122
Transactions,Entity Life Cycle,and Fetch Strategies 122
Advanced Mapping Mode 123
Working with Neo4j Server 124
Continuing From Here 126
8.Redis:AKey/ValueStore 127
Redis in a Nutshell 127
Setting Up Redis 127
Using the Redis Shell 128
Connecting to Redis 129
Object Conversion 130
Object Mapping 133
Atomic Counters 134
Pub/Sub Functionality 135
Listening and Responding to Messages 135
Using Spring's Cache Abstraction with Redis 136
Part Ⅳ.Rapid Application Development 141
9.Persistence Layerswith Spring Roo 141
A Brief Introduction to Roo 141
Roo's Persistence Layers 143
Quick Start 143
Using Roo from the Command Line 143
Using Roo with Spring Tool Suite 145
A Spring Roo JPA Repository Example 147
Creating the Project 147
Setting Up JPA Persistence 148
Creating the Entities 148
Defining the Repositories 150
Creating the Web Layer 150
Running the Example 151
A Spring Roo MongoDB Repository Example 152
Creating the Project 153
Setting Up MongoDB Persistence 153
Creating the Entities 153
Defining the Repositories 154
Creating the Web Layer 154
Running the Example 154
10.REST Repository Exporter 157
The Sample Project 158
Interacting with the REST Exporter 160
Accessing Products 162
Accessing Customers 165
Accessing Orders 169
Part Ⅴ.Big Data 175
11.Spring for Apache Hadoop 175
Challenges Developing with Hadoop 176
Hello World 177
Hello World Revealed 179
Hello World Using Spring for Apache Hadoop 183
Scripting HDFS on the JVM 187
Combining HDFS Scripting and Job Submission 190
Job Scheduling 191
Scheduling MapReduce Jobs with a TaskScheduler 191
Scheduling MapReduce Jobs with Quartz 193
12.Analyzing Data with Hadoop 195
Using Hive 195
Hello World 196
Running a Hive Server 197
Using the Hive Thrift Client 198
Using the Hive JDBC Client 201
Apache Logfile Analysis Using Hive 202
Using Pig 204
Hello World 205
Running a PigServer 207
Controlling Runtime Script Execution 209
Calling Pig Scripts Inside Spring Integration Data Pipelines 211
Apache Logfile Analysis Using Pig 212
Using HBase 214
Hello World 214
Using the HBase Java Client 215
13.Creating Big Data Pipelines with Spring Batch and Spring Integration 219
Collecting and Loading Data into HDFS 219
An Introduction to Spring Integration 220
Copying Logfiles 222
Event Streams 226
Event Forwarding 229
Management 230
An Introduction to Spring Batch 232
Processing and Loading Data from a Database 234
Hadoop Workflows 238
Spring Batch Support for Hadoop 238
Wordcount as a Spring Batch Application 240
Hive and Pig Steps 242
Exporting Data from HDFS 243
From HDFS to JDBC 243
From HDFS to MongoDB 249
Collecting and Loading Data into Splunk 250
Part Ⅵ.Data Grids 255
14.GemFire:A Distributed Data Grid 255
GemFire in a Nutshell 255
Caches and Regions 257
How to Get GemFire 258
Configuring GemFire with the Spring XML Namespace 258
Cache Configuration 258
Region Configuration 263
Cache Client Configuration 265
Cache Server Configuration 267
WAN Configuration 267
Disk Store Configuration 268
Data Access with GemfireTemplate 269
Repository Usage 271
POJO Mapping 271
Creating a Repository 272
PDX Serialization 272
Continuous Query Support 273
Bibliography 275
Index 277