Enterprise Java Development@TOPIC@

Chapter 72. JPAQL Functions

72.1. String Functions
72.1.1. Base Query
72.1.2. LOWER
72.1.3. UPPER
72.1.4. TRIM
72.1.5. CONCAT
72.1.6. LENGTH
72.1.7. LOCATE
72.1.8. SUBSTRING
72.2. Date Functions
72.3. Order By
72.4. Aggregate Functions
72.4.1. COUNT
72.4.2. MIN/MAX
72.4.3. SUM/AVE
72.5. Group By
72.6. Having
72.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)