图1不包括任何持久性或者系统类,但是如果包括了,您将创建一个我们的模型视图,它没有显示这些类。
Figure 1 does not include any persistence or system classes, but if it did, you would want to create a view of our model that did not show them.
活动记录模式则可用来在域类内包装关系数据库持久性方法。
You use the active record pattern to wrap relational database persistence methods in domain classes.
建立到数据存储的连接、查找标注为实体的所有类、配置持久化逻辑以将这些类绑定到数据存储中的实体,整个过程不可能快速完成。
Setting up connectivity to a data store, finding all classes annotated as entities, and configuring the persistence logic to bind these classes to entities in the data store is not a quick operation.
您可以很自由地在持久性类中放置您喜欢的任何方法-注册表只是在各次对动态页面的调用之间将实例保存在内存中。
You are free to put whatever methods you like in persistence classes -- the registry simply holds instances in memory between different calls to dynamic pages.
这样一来,每个动态页面都可以利用您编写的持久性类。
This way, every dynamic page can utilize persistence classes you write.
图7显示了将每个具体类映射成数据实体时的持久性模型。
Figure 7 presents the persistence model when each concrete class is mapped to a data entity.
这一部分探讨了过程的头两步:简化持久性和系统类以及简化层次结构。
This tip explores the first two steps of that process: simplifying persistence and system classes and simplifying hierarchies.
持久性类封装对持久性存储的访问,包括关系数据库、平面文件和对象库。
Persistence classes encapsulate access to your persistent stores, including relational databases, flat files, and object bases.
在JPA 2.0之前,这种语义区分是通过持久化类定义中的对应类级别注释来表示的。
Before JPA 2.0, this semantic distinction was represented via corresponding class-level annotations in the persistent-class definition.
这些类之后又被转换为适合进行持久化的实体。
The classes can in turn be transformed into entities suitable for persistence solutions.
要想使用领域设计方法,你就需要为实体类定义和构建资源库来实现领域对象的持久化。
Using a domain driven design approach you will need to define and build repositories for the entities that make up your domain.
图6显示了一个更新过的持久性模型,用于将整个类层次结构映射成一个数据实体。
Figure 6 presents the updated persistence model for mapping the entire class hierarchy into one data entity.
图1为包含审计字段的持久化实体提供了一个基类。
Figure 1 presents a base class for persistent entities that contains the necessary auditing fields.
从PURL到持久性较底的HTTPURI,这种的间接性和DNS提供的间接性非常相似,只要重定向的来源和目的不在同一类别中即可。
The indirection from PURLs to less-persistent HTTP URIs is much like the indirection provided by DNS, except that the source and the destination of the redirection are in the same category.
通常是由于持久化框架在编译期或者运行期修改类的定义,添加某些所需信息以减少持久化实体时的麻烦。
Usually the problem occurs because the persistence frameworks will alter classes during compilation or runtime, to include information they require, to ease the pain related to persisting entities.
类之间的关系,以及程序逻辑都不会去考虑持久性存储的特征或者结构。
Neither the relationships between our classes, nor the application logic took into consideration the characteristics or structure of an underlying persistence storage.
现在将一组严格的可相互引用的类称为运行时作用域,而在JPA 1.0 中称为 持久化单元。
This notion of run-time scope as a strict set of mutually referable classes is captured in JPA 1.0 as a persistence unit.
好了,我们只需要在程序中添加几行代码,和为每一个映射文件创建持久化类,而且NHibernate可以照顾到所有的数据库操作。
So, one need only add a few lines of code to an application and create a simple mapping file for each persistent class, and NHibernate takes care of all database operations.
然而,在我们使用ofy之前,我们需要在一个静态的初始化方法中注册持久化类,如清单2的Photo。
Before we can use ofy, however, we need to register persistent classes in a static initializer like Photo in Listing 2.
您需要servletAPI程序包,当然还有来自持久性捆绑包的持久性实体和bletheruserinterface类。
You need the servlet API packages and, of course, the persistence entities and the BletherUserInterface class from the persistence bundle.
JPA 2.0提供的解决办法通过静态地公开相同的持久化属性实例化名为 Person_的元模型类(对应于Person)。
The solution that JPA 2.0 provides is the ability to instantiate a metamodel class named Person_ that corresponds to Person by exposing the same persistent attributes statically.
这个模型由5个类组成,其中的4个是要持久化的类,非持久化类oradersystem当做这个对象模型的宿主。
The model is made up of five classes, four of which are persistent. The non-persistent OrderSystem class serves as the root of the object model.
事实上这些类是持久性调用类(persistence-aware),需要一种容器内测试策略,这将在 测试 一节进行描述。
The fact that the classes are persistence-aware demands an in-container testing strategy, which the Testing section describes.
通过将DAO代码封装到trait中,该DAO trait所提供的所有持久化方法可自动为所有实现类所用。
By encapsulating DAO code in a trait all persistence methods provided by this DAO trait are automatically available to all implementing classes.
这种方式完美地诠释了DRY (DontRepeat Yourself)准则,因为持久化逻辑只实现一次,在需要的时候可以多次混合到领域类中。
This approach perfectly epitomizes the DRY (Don't Repeat Yourself) principle, since the persistence logic is implemented once and mixed in domain classes as many times as needed.
通过延迟对appointment类的构建和初始化,简化了对附加包装行为(比如持久性)的分离。
By deferring construction and initialization to the Appointment class, I make it easier to separate additional wrapping behavior (such as persistence).
尽管ActiveRecord与处理持久性有关,您总是希望将行为添加到类中,而不仅仅进行数据库存储和检索。
Though ActiveRecord deals with persistence, you often want to add behavior to your classes beyond database storage and retrieval.
第一个类使用容器管理持久性(Container - Managed Persistence,CMP)来提供对简单数据库表phonebookentrybean的基于对象的访问。
The first one, which USES Container-Managed Persistence (CMP) to provide object-based access to a simple database table, is called PhoneBookEntryBean.
persistent类旨在使数据持久性变得简单。
CPANPersistent类是您搜索数据持久性解决方案时的有力帮手。
The CPAN Persistent classes are powerful allies in your search for data persistence solutions.
应用推荐