Listing 4 shows some example code for the generic dao.
清单4给出这个泛型DAO的一些示例代码。
Yang received the 1957 Nobel Prize in Physics together with Tsung-dao Lee, for their work on parity non-conservation of weak interaction.
杨振宁和李政道因为在弱相互作用下宇称不守恒原理方面的工作获得了1957年的诺贝尔物理学奖。
Will a DAO invoke methods on another DAO?
一个DAO是否调用另一个DAO的方法?
The DAO layer has strong database cohesion.
dao层具有强大的数据库内聚力。
The DAO participates in a global transaction.
dao加入一个全局事务。
DAO methods should throw meaningful exceptions.
DAO方法应该抛出有意义的异常。
Consider defining standard DAO exception classes.
考虑定义标准dao异常类。
A concrete class that implements the DAO interface.
一个实现了dao接口的具体类。
Or you can use your own custom DAO-based framework.
或者您也可以使用自己的自定义基于DAO的框架。
Will a transaction involve one DAO or multiple DAOs?
事务涉及到一个DAO还是多个DAO ?
Add the 10-line Spring configuration file for the DAO.
为dao添加10行spring配置文件。
Transaction demarcation code is separated from the DAO.
事务界定代码从DAO中分离出来。
The foundation for a generic DAO is its CRUD operations.
泛型DAO的基础是其CRUD操作。
These are handled outside the DAO to achieve flexibility.
这些不由DAO处理是为了实现灵活性。
For the sample application the DAO trait looks as follows.
对于该示例应用来说,其DAOtrait如下代码所示。
Next, we'll build on Part 1's discussion of the generic DAO.
接下来,继续第1部分对泛型DAO的讨论。
The DAO pattern is one of the standard J2EE design patterns.
dao模式是标准J2EE设计模式之一。
Transaction demarcation code is embedded inside the DAO class.
事务界定代码嵌入在dao类中。
You will learn how to incorporate all three in your DAO classes.
您将学到如何将这三者结合到自己的dao类中。
External dependencies — For instance, my DAO needs a data source.
外部依赖性——例如,我的DAO需要一个数据源。
In Listing 8, you can see this updated version of the DAO in use.
在清单8中,可以看到使用了这个更新后的DAO版本。
Listing 1 shows a DAO with two data operations: create and update.
清单1显示了一个有两种数据操作的DAO:创建和更新。
Should the DAO be responsible for starting and ending transactions?
DAO 是否要负责事务的开始和结束?
When implementing the DAO pattern, consider the following questions
在实现DAO模式时,考虑以下问题
How will exceptions be handled within the DAO implementation class?
在DAO实现类中如何处理异常?
Undoubtedly, Jia Dao was a poet with distinct individual character.
贾岛无疑是一位创作个性十分鲜明的诗人。
The engine generates packages for each layer (DAO, service, and Web).
引擎会为每一层(DAO、服务以及Web)生成包。
Data Access Object (DAO) and Session Facade are both good ones to use.
数据访问对象(Data Access Object,DAO)及会话外观(Session Facade)都是非常值得一用的。
The DAO may allow queries based on criteria other than the primary key.
DAO可允许基于除主键之外的标准进行查询。
Specifically, DAO separates business logic from database persistence code.
具体来说,DAO将业务逻辑与数据库持久性代码分隔开来。
应用推荐