- Developing Middleware in Java EE 8
- Abdalla Mahmoud
- 264字
- 2021-07-23 19:24:35
Architecture
The Java persistence API is built around the following components:

- Persistence provider: A persistence provider is a JPA implementation provided by a vendor. As with most Java APIs, JPA is a standard API, where a set of different actual implementations are available from different vendors. The persistence provider means the vendor of the actual implementation we are using.
- Entities: An entity is a class that represents a domain object in our enterprise application. From a JPA perspective, an entity is represented with a table in the database, and an instance of this entity represents a record in that table.
- Entity managers: An entity manager is an object that represents a connection to a database, and contains all methods for the different operations that can be performed with the database, such as inserting a new record, retrieving a single record, performing advanced queries, and so on.
- Entity transaction: An entity transaction represents a database transaction that can be either committed or rolled back according to the application state. Any update operations (insert, update, delete) should be performed within the boundaries of an entity transaction.
- Query: As the name suggests, a query is an object that is used to perform a database query! In addition to the regular SQL, JPA provides a custom query language (called JPQL) that can be used to perform queries exactly like SQL, but with object-oriented concepts.
- Persistence unit: A persistence unit is a group of entities involved in a persistence context. A persistence unit is specified using a configuration file (persistence.xml), describing connection information, entities involved, and other useful configurations.
推薦閱讀
- UNIX編程藝術
- Google Flutter Mobile Development Quick Start Guide
- .NET之美:.NET關鍵技術深入解析
- 一步一步學Spring Boot 2:微服務項目實戰(zhàn)
- 精通軟件性能測試與LoadRunner實戰(zhàn)(第2版)
- Scratch真好玩:教小孩學編程
- Android開發(fā):從0到1 (清華開發(fā)者書庫)
- Mobile Device Exploitation Cookbook
- JavaScript應用開發(fā)實踐指南
- Scala Functional Programming Patterns
- 進入IT企業(yè)必讀的324個Java面試題
- 分布式架構原理與實踐
- 算法精解:C語言描述
- Python趣味創(chuàng)意編程
- Visual FoxPro程序設計實驗教程