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

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.
主站蜘蛛池模板: 唐海县| 松滋市| 枣强县| 石台县| 淮北市| 松溪县| 玉门市| 盐津县| 文昌市| 康平县| 万全县| 垫江县| 呼图壁县| 黄大仙区| 云和县| 高台县| 新闻| 潍坊市| 陕西省| 高唐县| 汉沽区| 长兴县| 汕头市| 合川市| 思南县| 商南县| 元阳县| 桓台县| 沐川县| 涞水县| 九江县| 石台县| 永清县| 施秉县| 东源县| 方城县| 东海县| 衡水市| 黄平县| 仙居县| 承德县|