JPA : Mapping

JPA defines an interface (or API) to persist normal Java objects (or POJO's in some peoples terminology) to a datastore. It uses a definition of how the users Java objects map to the chosen datastore structure. This mapping can be provided by way of XML metadata, or alternatively by having Java annotations in the code. The whole point of having a standard mapping is that users can, in principle, swap between implementations of JPA without changing their code.

The process of mapping a class can be split into the following areas

If in doubt about how things fit together, please make use of the JPA Tutorial