Enterprise Java Development@TOPIC@

JPA Queries

Revision: v2013-10-08

2014-03-07 00:09 EST

Abstract

This presentation provides information covering JPA Queries, JPA Query Language, and the JPA Criteria API.


Purpose
1. Goals
2. Objectives
I. General Queries
1. JPA Query Types
1.1. JPA Query Language (JPA-QL) Queries
1.2. Native SQL Queries
1.3. Criteria API Queries
1.4. Strongly Typed Queries
1.4.1. Metamodel API
1.4.2. Query using JPA Metamodel
1.4.3. Canonical Metamodel
1.4.4. Generating Canonical Metamodel Classes
1.5. Summary
2. JPA Query Overview
2.1. EntityManager Query Methods
2.2. Query.getSingleResult()
2.3. Query.getResultList
2.4. Parameters
2.5. Paging Properties
2.6. Pessimistic Locking
2.7. Bulk Updates
2.8. Named Queries
2.9. Summary
II. JPAQL
3. JPA Query Language
3.1. Simple Entity Query
3.2. Non-Entity Queries
3.3. Multi-select Query
3.3.1. Multi-select Query with Object[]
3.3.2. Multi-select Query with Tuple
3.3.3. Multi-select Query with Constructor
3.4. Path Expressions
3.4.1. Single Element Path Expressions
3.4.2. Collection Element Path Expressions
3.5. Eager Fetching through JOINs
3.5.1. Lazy Fetch Problem
3.5.2. Adding Eager Fetch during Query
3.6. Distinct Results
3.7. Summary
4. JPAQL Where Clauses
4.1. Equality Test
4.2. Like Test
4.3. Formulas
4.4. Logic Operators
4.5. Equality Tests
4.6. Between
4.7. Testing for Null
4.8. Testing Empty Collection
4.9. Membership Test
4.10. Subqueries
4.11. All
4.12. Any
4.13. Summary
5. JPAQL Functions
5.1. String Functions
5.1.1. Base Query
5.1.2. LOWER
5.1.3. UPPER
5.1.4. TRIM
5.1.5. CONCAT
5.1.6. LENGTH
5.1.7. LOCATE
5.1.8. SUBSTRING
5.2. Date Functions
5.3. Order By
5.4. Aggregate Functions
5.4.1. COUNT
5.4.2. MIN/MAX
5.4.3. SUM/AVE
5.5. Group By
5.6. Having
5.7. Summary
III. Criteria API
6. JPA Criteria API
6.1. Criteria API Demo Template
6.2. Simple Entity Query
6.3. Non-Entity Query
6.4. Multi-select Query
6.4.1. Multi-select Query with Object[]
6.4.2. Multi-select Query with Tuple
6.4.3. Multi-select Query with Constructor
6.5. Path Expressions
6.5.1. Single Element Path Expressions
6.5.2. Collection Element Path Expressions
6.6. Eager Fetching through JOINs
6.6.1. Lazy Fetch Problem
6.6.2. Adding Eager Fetch during Query
6.7. Distinct Results
6.8. Summary
7. Criteria Where Clauses
7.1. Equality Test
7.2. Like Test
7.2.1. Like Test Literal
7.2.2. Like Test Literal Parameter
7.2.3. Like Test Concatenated String
7.2.4. Like Test Single Character Wildcard
7.3. Formulas
7.4. Logic Operators
7.5. Equality Tests
7.6. Between
7.7. Testing for Null
7.8. Testing Empty Collection
7.9. Membership Test
7.10. Subqueries
7.11. All
7.12. Any
7.13. Summary
8. Criteria Functions
8.1. String Functions
8.1.1. Base Query
8.1.2. LOWER
8.1.3. UPPER
8.1.4. TRIM
8.1.5. CONCAT
8.1.6. LENGTH
8.1.7. LOCATE
8.1.8. SUBSTRING
8.2. Date Functions
8.3. Order By
8.4. Aggregate Functions
8.4.1. COUNT
8.4.2. MIN/MAX
8.4.3. SUM/AVE
8.5. Group By
8.6. Having
8.7. Summary