JPA

  1. What is JPA
  2. Architecture of JPA
  3. JPA Annotation
  4. JPA Persistance.xml file
  5. JPA Entity
    1. Entity Introduction
    2. Creating an Entiry
  6. JPA Entity Manager
    1. Entity Manager
    2. Inserting an Entity
    3. Finding an Entity
    4. Updating an Entity
    5. Deleting an Entity
    6. Example of Find, insert, Update, Delete in JPA
  7. JPA Collections
    1. Collection Mapping
    2. List Mapping
    3. Set Mapping
    4. Map Mapping
  8. JPA Type of Mapping
    1. One to One Mapping
    2. One to Many Mapping
    3. Many to One Mapping
    4. Many to Many Mapping
  9. JPA Cascading Operations
    1. Persist
    2. Merge
    3. Detach
    4. Refresh
    5. Remove
    6. All
  10. JPA JPQL
    1. JPQL Basic Operations
    2. JPQL Bulk Data Operations
    3. JPQL Advanced Operations
  11. JPA Criteria API
    1. Select
    2. From
    3. Where
    4. Order by
    5. Group by
    6. Having
  12. JPA Inheritance
    1. Inheritance Overview
    2. Single Table Strategy
    3. Joined Table Strategy
    4. Table per class Strategy
  13. Annotations
  14. Validations

Examples :

  • JPA example

`

To Do :

  • details of the XML
  • Create tables
  • @GeneratedValue
  • @SequenceGenerator
  • @DynamicUpdate
  • @Query
  • @Modify
  • XML
    • transaction-type in persistance.xml
    • <provider> tag in persistance.xml
    • classes
    • hibernate dilect
    • hibernate showsql
    • hibernate formatsql
    • hibrnate hbm2ddl.auto
  • PrimaryAndForeignKey in JPA
  • It allows fetching of objects.
  • It provides support for criteria update/delete.
  • It generates schema.
  • It supports Java 8 Date and Time.
  • It provides @Repeatable annotation that can be used when we want to apply the same annotations to a declaration or type use.
  • It allows JPA annotation to be used in meta-annotations.
  • It provides an ability to stream a query result.

Reference :

Interview Questions