Chapter 7 Java Persistence API.doc

  1. 1、本文档共55页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Chapter 7 Java Persistence API 7.1 Persistence Basics 7.1.1 Entity Classes 7.1.2 Persistent Fields and Properties 7.1.3 Entity Ids and Primary Keys 7.2 Entity Relationships 7.2.1 Multiplicity 7.2.2 Direction in Entity Relationships 7.3 Storing and Manipulating Entities 7.3.1 Persistence Context 7.3.2 Manipulating entities 7.3.3 Finding Entities by EntityManager Your First JPA Application 7.5 Practice Labs 7.6 Summary 7.7. Self Review Questions 7.8 Exercises Java Persistence 7.1 Persistence Basics 7.1.1 Introduction Java programs consist of classes and objects. As you may recall from when you first learned Java, the classes are sort of like types in that they represent kinds of things or concepts. The objects, which are particular instances of the classes, represent specific examples of the more general class. All of this is an attempt to model real-world information in a way that computers (and programmers) can easily work with. The program starts, creates some objects of various classes, and goes on to manipulate them to achieve the desired results. When it is finished, the Java garbage collector throws away the left-over objects in order to free up precious system resources. But sometimes that isn’t what you want. Suppose you need to keep a log of every user to access your application along with the time, date, and what the user did in the application. All of a sudden classes and objects seem to come up short of the goal. What is needed is a way to make the objects stick around between the first time the program was run (when the users accesses the program) and the last time the program was run (when it is time to review the logs to make sure both the application and the users are behaving themselves). This is the problem of persistence and exactly the situation that the Java Persistence API (JPA) was designed for. There are many ways to solve t

文档评论(0)

gujf + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档