- 1、本文档共13页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
外文翻译管理持久性实体WritingContainerManaged Persistent Entity Beans
Writing Container-Managed Persistent Entity Beans
Container-Managed Fields
A container-managed persistent entity bean allows the container to handle some or all of its data access logic. Rather than coding JDBC or SQL/J operations in your bean class, your container implicitly performs all database operations behind the scenes.
With container-managed persistence, you must make some of your entity bean class’s fields public so that the container can set the fields when it performs database operations on behalf of your bean. The fields that you want to be persistent are called container-managed fields. You don’t have to worry about setting these fields—the EJB container will automatically manipulate them for you
behind the scenes when it performs storage operations.
One restriction of container-managed fields is that every field you want to be managed by the container must follow the rules for Java object serialization (we describe these rules in full in Appendix A). This means that primitive types such as doubles and Booleans, as well as serializable classes such as primary key classes or EJB handles to other entity beans, can be container-managed fields.
For example, the following is a snippet of code from our bank account entity bean class that we wrote in Chapter 8:
With container-managed persistence, the container can persist each of these fields for you behind the scenes. When saving your bean instance’s fields, the container is responsible for querying your bean instance for these field values. When loading data into your bean instance, the container sets these fields. This is possible because each of the fields is declared as public.
Of course, you still must inform the container about which fields it should manipulate. You specify this in your bean’s deployment descriptor. The EJB container will inspect the deployment descriptor to figure out which of your entity bean’s fields to manipulate.
Note that not all fields within the bean have to be managed by the co
您可能关注的文档
- 基于物联技术的集装箱物流监控运营平台的设计与实现.doc
- 基于窄帯量子点CdSe敏化的纳米TiO2基太阳能电池制备与表征 开题PPT.ppt
- 基于组态王水塔水位控制系统的仿真设计.doc
- 基于空间矢量SPWM的控制算法最终版.doc
- 基于笛卡尔坐标制的外感位姿测量三自由度电气驱动运动平台.doc
- 基于码分复用技术光分插复用器的设计.doc
- 基于组态王的自动配控制系统设计.doc
- 基于网络协作探究学的设1.doc
- 基于物联网的智能家居制系统.ppt
- 基于统建模语言的同步电机建模及仿真.doc
- 中考语文总复习语文知识及应用专题5仿写修辞含句子理解市赛课公开课一等奖省课获奖课件.pptx
- 湖南文艺版(2024)新教材一年级音乐下册第二课《藏猫猫》精品课件.pptx
- 湖南文艺版(2024)新教材一年级音乐下册第三课《我向国旗敬个礼》精品课件.pptx
- 高中生物第四章生物的变异本章知识体系构建全国公开课一等奖百校联赛微课赛课特等奖课件.pptx
- 整数指数幂市公开课一等奖省赛课微课金奖课件.pptx
- 一年级音乐上册第二单元你早全国公开课一等奖百校联赛微课赛课特等奖课件.pptx
- 八年级数学上册第二章实数27二次根式第四课时习题省公开课一等奖新课获奖课件.pptx
- 九年级物理全册11简单电路习题全国公开课一等奖百校联赛微课赛课特等奖课件.pptx
- 八年级语文下册第五单元19邹忌讽齐王纳谏省公开课一等奖新课获奖课件.pptx
- 2024年秋季新人教PEP版3年级上册英语全册教学课件 (2).pptx
文档评论(0)