- Developing Middleware in Java EE 8
- Abdalla Mahmoud
- 146字
- 2021-07-23 19:24:37
Entities
An entity is a domain object that represents a business entity, and correspondingly, a record in a database table. An entity class should satisfy the following requirements:
- The class must be annotated with the javax.persistence.Entity annotation.
- The class must have a public or protected no-argument constructor. The class may have other constructors.
- The class must not be declared final. No methods or persistent instance variables may be declared final.
- If an entity instance is passed by value as a detached object, such as through a session bean's remote business interface, the class must implement the Serializable interface.
- Entities may extend both entity and non-entity classes, and non-entity classes may extend entity classes.
- Persistent instance variables must be declared private, protected, or package-private and can be accessed directly only by the entity class's methods. Clients must access the entity's state through accessor or business methods.
推薦閱讀
- JIRA 7 Administration Cookbook(Second Edition)
- VSTO開發(fā)入門教程
- 程序是怎樣跑起來的(第3版)
- Instant Lucene.NET
- Kubernetes源碼剖析
- Python:Deeper Insights into Machine Learning
- Mastering Android Studio 3
- 實戰(zhàn)Python網(wǎng)絡(luò)爬蟲
- UML基礎(chǔ)與Rose建模實用教程(第三版)
- 從零開始學(xué)Unity游戲開發(fā):場景+角色+腳本+交互+體驗+效果+發(fā)布
- Instant AppFog
- R High Performance Programming
- 編譯原理學(xué)習(xí)與實踐指導(dǎo)
- Mathematica Data Visualization
- UI設(shè)計參考手冊