Will a DAO invoke methods on another DAO?
一个DAO是否调用另一个DAO的方法?
Listing 1 shows a DAO with two data operations: create and update.
清单1显示了一个有两种数据操作的DAO:创建和更新。
Another example would be a DAO that provides caching services for another DAO.
类似的一个例子将是一个为另一个DAO提供缓存服务的DAO。
In most cases, a DAO application like the one above would use JDBC for database access.
在大多数情况下,类似于上述示例的DAO应用程序会使用JDBC进行数据库访问。
A DAO should strive to encapsulate JDBC rather than expose JDBC to the rest of the application.
一个DAO应该力争封装jdbc而不是将JDBC公开给应用程序的其余部分。
In this case, I start by writing a DAO to provide search capabilities on the product catalog datastore.
在这个示例中,我从编写dao开始,用它提供对产品目录数据存储的搜索功能。
For some people, creating a DAO for each database table may seem to be a very straightforward approach.
对于有些人而言,为每个数据库表创建一个DAO也许看上去是非常简单的方法。
Adding an abstraction in the form of a DAO decouples the database implementation from the GUI implementation.
以DAO的形式添加一个抽象可以从GUI实现将数据库实现解耦。
In this section, I'll present a code example that shows how to incorporate Jakarta Commons Logging into a DAO.
在本节,我将展示一个显示如何将JakartaCommonsLogging加入到DAO中的代码示例。
If you encounter a failure in a DAO, logs often provide the best information for understanding what went wrong.
如果在DAO中遇到故障,那么日志通常可以提供判断出错位置的最好信息。
Repository: Identifies a DAO object as representing the Repository pattern (in Domain Driven Design terminology).
@Repository:把一个DAO对象认作Repository模式(在领域驱动设计术语中)。
Each operation performed by a DAO — such as creating, updating, or deleting data — is associated with a transaction.
由DAO所执行的每一个操作——如创建、更新或者删除数据——都与一个事务相关联。
What we have achieved so far is a lean and mean implementation of a DAO pattern which allows the persistence of 'state-only' entities.
到目前为止,我们精简了DAO模式的实现,该实现只能持久化实体的状态。
MovieDAO is a DAO that demonstrates all of the techniques discussed in this article: transaction demarcation, logging, and exception handling.
MovieDAO是一个展示本文中讨论的所有技术的DAO:事务界定、日志和异常处理。
To support the usage model of extending a DAO support class, Spring 2.0 provides the SimpleJdbcDaoSupport class, offering a preconfigured JdbcTemplate.
为了支持扩展DAO支持类的用法模型,Spring 2.0提供了SimpleJdbcDaoSupport类,提供一个预先配置的JdbcTemplate。
The result of code generation is a DAO implementation class which is compiled and used to execute the SQL statements declared in the original interface.
代码生成的结果就是第二个实现类,该实现类被编译并用于执行初始接口中声明的sql语句。
The business delegate may in turn rely on a DAO object that in turn relies on a database query or an or mapping query that sorts the CDs very efficiently.
业务代理又可能会依赖于一个dao对象,而后者又依赖于一个数据库查询或OR映射查询,这样可以对CD进行有效的查询。
A typical DAO performs transactional operations such as create, update, and delete. When designing a DAO, start by asking yourself the following questions.
一个典型的DAO执行像创建、更新和删除这样的事务性操作。
When a DAO operation fails the SQLException or other persistence technology-specific exception should be translated to ensure that DAO interfaces do not provide a leaky abstraction
当DAO操作失败时,SQLException或者其他特殊持久化技术的异常应该被翻译,以确保DAO接口不会有漏掉的抽象。
If the application USES a DAO (data access object) with dynamic SQLs and stored procedures, the value object that is passed to DAO can be declared as a cloud resource using annotations.
如果应用程序使用DAO(数据访问对象)来产生动态sql和存储过程,那么传递给DAO的值对象就可以使用注释声明为一种云资源。
Applying this technique with the help of a DAO, as you've seen this month, ensures that not only will you be able to modify your code base when you need to, but so will other developers.
借助一个DAO来应用这个技巧,就如您这个月所看到的,不仅可以确保您能够在需要的时候修改代码库,还可以使其它的开发人员修改代码库。
Other similar operations such as deleting a given entity in the model or retrieving all of the instances of an entity from the model are common in a DAO and are also similar from entity to entity.
其他操作(比如删除模型中的给定实体或者从模型中获取某一实体的所有实例)在DAO中是相似的,在不同实体之间也是相似的。
Today, Dao De Jing still plays a role in the development of Chinese thoughts.
时至今日,《道德经》在中国思想的发展中仍然发挥着重要作用。
For most developers, writing almost the same code for every DAO in a system has by now become a habit.
对于大多数开发人员,为系统中的每个DAO编写几乎相同的代码到目前为止已经成为一种习惯。
External dependencies — For instance, my DAO needs a data source.
外部依赖性——例如,我的DAO需要一个数据源。
Different database structures, technologies, and business requirements have different common functionality that can be moved into the common code of a generic DAO.
不同的数据库结构、技术和业务需求具有不同的通用功能,可以把这些功能转移到泛型DAO的通用代码中。
A well-implemented DAO class will use logging to capture details about its run-time behavior.
一个良好实现的dao类将使用日志记录来捕捉有关其运行时行为的细节。
Use a Data Access Object (DAO) to abstract and encapsulate all access to the data source.
使用数据访问对象来抽象和封装对数据源的所有访问。
Use a Data Access Object (DAO) to abstract and encapsulate all access to the data source.
使用数据访问对象来抽象和封装对数据源的所有访问。
应用推荐