concept dao in category java

appears as: DAOs, DAOs
Portlets in Action

This is an excerpt from Manning's book Portlets in Action.

A portlet’s web application context XML file defines the controllers, services, DAOs, and other application objects that form part of that portlet. You may also define Spring’s special beans in your web application context XML; they provide functionality suitable for implementing most portlets. For instance, the Spring Portlet MVC framework’s PortletModeHandlerMapping bean is useful in mapping portlet requests to appropriate handlers based on the current portlet mode.

In this section, we’ll look at how the Spring JDBC (Java Database Connectivity) module simplifies interaction with the database and use it to implement the data access layer of the Book Catalog portlet. In the context of the Book Catalog portlet, we’ll look at how to configure the data source in a properties file or JNDI, how to access JNDI-bound data sources in Spring’s application context XML, and how to create data access objects (DAOs) that use Spring JDBC classes for executing SQL statements. We’ll wrap up this section by creating a Spring-based BookService service that uses DAOs to access the data source containing book catalog data.

9.3.3. Creating DAOs

You can create DAOs in your application by using a factory for DAOs, or you can use Spring’s classpath scanning along with annotation support to automatically create and register DAOs. As you saw in chapter 8, the classpath-scanning feature saves a lot of configuration overhead, so we’ll use classpath scanning here to create and register services and DAOs in the Book Catalog portlet.

Flex on Java

This is an excerpt from Manning's book Flex on Java.

Now that you have your model objects built you can create a set of DAOs. You’ll need a DAO for issue and comment.

2.4. Build the DAOs

AppFuse provides generic implementations for DAOs that you can leverage if your DAOs do nothing more than the basic create, retrieve, update, delete (CRUD) operations. Because your IssueDao will do only basic operations, there is no need to define a concrete IssueDao. You can instead use the GenericHibernateDao which you’ll see later when you wire the beans in the application context. The CommentDao needs to implement a couple of operations that go beyond the basic CRUD operations so you’ll first create an interface for the CommentDao.