Enterprise Java Development@TOPIC@

Chapter 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


  • Located two Sales that occurred prior to today's date


  • Located no sales on today's date


  • Update all sales to today


  • Now locating sales for today's date

Note

Bulk commands (i.e., update) invalidate cached entities. You must refresh their state with the database or detach/clear them from the persistence context to avoid using out-dated information.


  • Note the ASC order on amount


  • Note the DESC order on amount


  • Get count of sales for each clerk



  • Provide a list of Clerks and their count of Sales for counts <= 1


  • Wed matched on Moe (1 sale) and Jack (0 sales)