Joined: Fri Apr 08, 2011 3:15 pm Posts: 7 Has thanked: 0 time Have thanks: 0 time
sir please explain me what is DAO design pattern and when to use this design pattern in struts or hibernate
msi_333
Question subject: Re: DAO design pattern
Posted: Sat Apr 09, 2011 10:53 am
Joined: Tue Mar 27, 2007 10:55 pm Posts: 2279 Location: Earth Has thanked: 39 time Have thanks: 61 time
The idea is to separate the data access functions and to put them in DAO class , in hibernate , you put named queries in orm.xml and call it by name in your entityManager . DAO general ideaExample.
Code:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package mailtest.dao;