JPA 2.0 Features II (Java EE 6)

Topics 

  • Criteria API 
    • Criteria API with single entity 
    • Criteria API with relationship 
    • Criteria API with meta-model 
  • Locking 
    • Optimistic locking 
    • Pessimistic locking

Criteria API with Single Entity

JPA 2.0: Criteria API 

  • Strongly typed criteria API 
    • Compile time type-checking possible 
    • Similar to Hibernate Criteria API 
  • Object-based query definition objects 
    • Rather than string-based JPQL 
  • You could use a metamodel – compile time type checking using Generics 
    • Each entity X has a metamodel class X_ 
    • Criteria API operates on the metamodel

You must have an active subscription to download PDF and Lab Zip of this course topic.Please click the "Subscribe" button or the "Login" button if you already have an account.