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

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.
主站蜘蛛池模板: 平潭县| 武胜县| 赣榆县| 涞源县| 永州市| 田东县| 肥西县| 偃师市| 罗江县| 黄平县| 丘北县| 安远县| 富裕县| 六安市| 隆尧县| 沂南县| 绥芬河市| 玛纳斯县| 明光市| 乌拉特中旗| 云阳县| 南投市| 南雄市| 山东| 南靖县| 平罗县| 襄樊市| 博爱县| 虹口区| 和静县| 昔阳县| 来宾市| 舟山市| 增城市| 弥勒县| 巴林左旗| 新郑市| 乐至县| 滦南县| 平南县| 卓资县|