官术网_书友最值得收藏!

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.
主站蜘蛛池模板: 台安县| 当阳市| 黄骅市| 华安县| 崇文区| 汉川市| 长岛县| 万年县| 资溪县| 昌吉市| 瑞金市| 印江| 荣成市| 水富县| 大同市| 中牟县| 都江堰市| 安溪县| 湛江市| 沁阳市| 兴业县| 林甸县| 平度市| 瑞昌市| 兖州市| 长宁区| 班玛县| 高州市| 锡林浩特市| 疏勒县| 安达市| 新丰县| 石楼县| 乐昌市| 容城县| 河西区| 武夷山市| 黄平县| 崇明县| 久治县| 景东|