Foreword
Preface
Part I. Background
1. The Spring Data Project
NoSQL Data Access for Spring Developers
General Themes
The Domain
The Sample Code
Importing the Source Code into Your IDE
2. Repositories: Convenient Data Access Layers
Quick Start
Defining Query Methods
Query Lookup Strategies
Query Derivation
Pagination and Sorting
Defining Repositories
Fine-Tuning Repository Interfaces
Manually Implementing Repository Methods
IDE Integration
IntelliJ IDEA
3. Type-Safe Querying Using Querydsl
Introduction to Querydsl
Generating the Query Metamodel
Build System Integration
Supported Annotation Processors
Querying Stores Using Querydsl
Integration with Spring Data Repositories
Executing Predicates
Manually Implementing Repositories
Part II. Relational Databases
4. JPA Repositories
The Sample Project
The Traditional Approach
Bootstrapping the Sample Code
Using Spring Data Repositories
Transactionality
Repository Querydsl Integration
S. Type-SafeJDBC Programming with Querydsl SQL
The Sample Project and Setup
The HyperSQL Database
The SQL Module of Querydsl
Build System Integration
The Database Schema
The Domain Implementation of the Sample Project
The QueryDslJdbcTemplate
Executing Queries
The Beginning of the Repository Implementation
Querying for a Single Object
The OneToManyResultSetExtractor Abstract Class
The CustomerListExtractor Implementation
The Implementations for the RowMappers
Querying for a List of Objects
Insert, Update, and Delete Operations
Inserting with the SQLInsertClause
Updating with the SQLUpdateClause
Deleting Rows with the SQLDeleteClause
Part III. NoSQL
6. MongoDB:A Document Store
MongoDB in a Nutshell
Setting Up MongoDB
Using the MongoDB Shell
The MongoDB Java Driver
Setting Up the Infrastructure Using the Spring Namespace
The Mapping Subsystem
The Domain Model
Setting Up the Mapping Infrastructure
Indexing
Customizing Conversion
MongoTemplate
Mongo Repositories
Infrastructure Setup
Repositories in Detail
Mongo Querydsl Integration
7. Neo4j: A Graph Database
Graph Databases
Neo4j
Spring Data Neo4j Overview
Modeling the Domain as a Graph
Persisting Domain Objects with Spring Data Neo4j
Neo4jTemplate
Combining Graph and Repository Power
Basic Graph Repository Operations
Derived and Annotated Finder Methods
Advanced Graph Use Cases in the Example Domain
Multiple Roles for a Single Node
Product Categories and Tags as Examples for In-Graph Indexes
Leverage Similar Interests (Collaborative Filtering)
Recommendations
Transactions, Entity Life Cycle, and Fetch Strategies
Advanced Mapping Mode
Working with Neo4j Server
Continuing From Here
8. Redis: A Key/Value Store
Redis in a Nutshell
Setting Up Redis
Using the Redis Shell
Connecting to Redis
Object Conversion
Object Mapping
Atomic Counters
Pub/Sub Functionality
Listening and Responding to Messages
Using Spring's Cache Abstraction with Redis
PartlY. Rapid Application Development
9. Persistence Layers with Spring Roo
A Brief Introduction to Roo
Roo's Persistence Layers
Quick Start
Using Roo from the Command Line
Using Roo with Spring Tool Suite
A Spring Roo JPA Repository Example
Creating the Project
Setting Up JPA Persistence
Creating the Entities
Defining the Repositories
Creating the Web Layer
Running the Example
A Spring Roo MongoDB Repository Example
Creating the Project
Setting Up MongoDB Persistence
Creating the Entities
Defining the Repositories
Creating the Web Layer
Running the Example
10. REST Repository Exporter
The Sample Project
Interacting with the REST Exporter
Accessing Products
Accessing Customers
Accessing Orders
Part V. Big Data
11. Spring forApache Hadoop
Challenges Developing with Hadoop
Hello World
Hello World Revealed
Hello World Using Spring for Apache Hadoop
Scripting HDFS on the JVM
Combining HDFS Scripting and Job Submission
Job Scheduling
Scheduling MapReduce Jobs with a TaskScheduler
Scheduling MapReduce Jobs with Quartz
12. Analyzing Datawith Hadoop
Using Hive
Hello World
Running a Hive Server
Using the Hive Thrift Client
Using the Hive JDBC Client
Apache Logfile Analysis Using Hive
Using Pig
Hello World
Running a PigServer
Controlling Runtime Script Execution
Calling Pig Scripts Inside Spring Integration Data Pipelines
Apache Logfile Analysis Using Pig
Using HBase
Hello World
Using the HBase Java Client
13. Creating Big Data Pipelines with Spring Batch and Spring
Integration
Collecting and Loading Data into HDFS
An Introduction to Spring Integration
Copying Logfiles
Event Streams
Event Forwarding
Management
An Introduction to Spring Batch
Processing and Loading Data from a Database
Hadoop Workflows
Spring Batch Support for Hadoop
Wordcount as a Spring Batch Application
Hive and Pig Steps
Exporting Data from HDFS
From HDFS to JDBC
From HDFS to MongoDB
Collecting and Loading Data into Splunk
Part VI. Data Grids
14. GemFire: A Distributed Data Grid
GemFire in a Nutshell
Caches and Regions
How to Get GemFire
Configuring GemFire with the Spring XML Namespace
Cache Configuration
Region Configuration
Cache Client Configuration
Cache Server Configuration
WAN Configuration
Disk Store Configuration
Data Access with GemfireTemplate
Repository Usage
POJO Mapping
Creating a Repository
PDX Serialization
Continuous Query Support
Bibliography
Index