Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One DatabaseAccessObject class for different entitiy classes

Status
Not open for further replies.

manirana007

Programmer
Jul 11, 2006
17
GB
Hello all,

I have 4 classes that call a database access object class to insert,update,delete,search items. The problem is that each of entities send in different paramaters, and call a different package. Right now I have 4 different database access object classes, but I would like to have one for all entities. Any ideas would be appreciated. Thanks.
 
Ideas about what ?

You have noted four completely different actions here :

# 1 : Insert data
# 2 : Update data
# 4 : Delete data
# 3 : Select data

I guess it would be possible to create one procedure to do all four but would you want to ? I would say not ...

Perhaps you should a single class, which has a method for each action ...

Why do you want a single ** object ** to do this ? Whats your rational for this ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I don't understand "call different packages", but the general solution for this if you wnat just one connection class is add parameters to the initialization.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top