Skip Headers

# Advantages and Disadvantages

Previous

Next

The use of TopLink JPA entities offers the following advantages:

- POJO persistence–in JPA, persistent objects are POJOs.

- Object-relational mapping is completely metadata-driven.

- The persistence API exists as a separate layer form the persistent objects and does not intrude upon them.

- Using the query framework you can query across entities and their relationships without having to use concrete foreign keys or database columns. Also, you can define queries statically in metadata or create them dynamically by passing query criteria on construction. Queries can return entities as results.

- Entities are mobile–objects are able to move from one JVM to another and back, and at the same time be usable by the application.

- You can configure persistence features through the use of Java SE 5 annotations, or XML, or a combination of both. You may also rely on defaults.

- If your application is running inside a container, the container provides support and ease of use; you can configure the same application to run outside a container.