A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
Separate DAO Classes
Joined: Apr 14, 2009
Sep 15, 2010 02:58:37
Hello all Members,
In my application, Can i Write all query related stuff in Separate DAO class ?
Can I make Separate DAO class for each table in Database ?
Can I write one separate method for a each query that i fired in my program?
Can you tell me In this way, professional development occur?
Please guide me in this & give your expert suggestions.
Thanks in advance.
Joined: Jan 24, 2006
Sep 15, 2010 09:38:37
I would write the DAO as a seperate class(es) . I useally design the DAO classes around the object classes I need in my application not so much the tables. A DAO class can instanciate or persist an instance of an object in my application.
I agree. Here's the link:
subject: Separate DAO Classes
JUnit Test Cases with Hibernate
Building Effective Service layer using Spring+Hibernate
Single JDBC class for multiple Java Applications
synchronization of the connection object
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015