JPA is a specification for accessing, persisting and managing the data between Java objects and the relational database. As the definition says its API, it is only the specification. There is no implementation for the API. JPA specifies the set of rules and guidelines for developing the interfaces
JPA is just guidelines to implement the Object Relational Mapping (ORM) and there is no underlying code for the implementation.
Hibernate is the actual implementation of JPA guidelines. When hibernate implements the JPA specification.
Hibernate is a JPA provider. When there is new changes to the specification, hibernate would release its updated implementation for the JPA specification. Other popular JPA providers are Eclipse Link (Reference Implementation), OpenJPA, etc
JPA is not an implementation, it will not provide any concrete functionality to your application. Its purpose is to provide a set of rules and guidelines that can be followed by JPA implementation vendors to create an ORM implementation in a standardized manner.
JPA is just guidelines to implement the Object Relational Mapping (ORM) and there is no underlying code for the implementation.
Hibernate is the actual implementation of JPA guidelines. When hibernate implements the JPA specification.
Hibernate is a JPA provider. When there is new changes to the specification, hibernate would release its updated implementation for the JPA specification. Other popular JPA providers are Eclipse Link (Reference Implementation), OpenJPA, etc
JPA is not an implementation, it will not provide any concrete functionality to your application. Its purpose is to provide a set of rules and guidelines that can be followed by JPA implementation vendors to create an ORM implementation in a standardized manner.
Hibernate JPA Annotations - Contents:
| Annotation | Package Detail/Import statement |
|---|---|
| @Entity | import javax.persistence.Entity; |
| @Table | import javax.persistence.Table; |
| @Column | import javax.persistence.Column; |
| @Id | import javax.persistence.Id; |
| @GeneratedValue | import javax.persistence.GeneratedValue; |
| @Version | import javax.persistence.Version; |
| @OrderBy | import javax.persistence.OrderBy; |
| @Transient | import javax.persistence.Transient; |
| @Lob | import javax.persistence.Lob; |
| Hibernate Association Mapping Annotations | |
| @OneToOne | import javax.persistence.OneToOne; |
| @ManyToOne | import javax.persistence.ManyToOne; |
| @OneToMany | import javax.persistence.OneToMany; |
| @ManyToMany | import javax.persistence.ManyToMany; |
| @PrimaryKeyJoinColumn | import javax.persistence.PrimaryKeyJoinColumn; |
| @JoinColumn | import javax.persistence.JoinColumn; |
| @JoinTable | import javax.persistence.JoinTable; |
| @MapsId | import javax.persistence.MapsId; |
| Hibernate Inheritance Mapping Annotations | |
| @Inheritance | import javax.persistence.Inheritance; |
| @DiscriminatorColumn | import javax.persistence.DiscriminatorColumn; |
| @DiscriminatorValue | import javax.persistence.DiscriminatorValue; |
Comments
Post a Comment