• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Looking for utility

 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All!

To select data from database we have to follow 4 steps each times:

Now since we are using WebLogic, it has its own Connection management system, so I can skip step 1) and 2).

Now for step 3) and 4) I am looking for a utility where I just have to pass a connection to the method and method will create Statement object and will execute the appropriate query.

i.e.

So whenever I have to select anything from the database, I have to do just

Similar for update/insert/delete.

Are there any utilities that this?

Reg,
Chetan
[ April 26, 2005: Message edited by: Chetan Parekh ]
 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chetan Parekh:
Hello All!

To select data from database we have to follow 4 steps each times:

Now since we are using WebLogic, it has its own Connection management system, so I can skip step 1) and 2).

Now for step 3) and 4) I am looking for a utility where I just have to pass a connection to the method and method will create Statement object and will execute the appropriate query.

i.e.

So whenever I have to select anything from the database, I have to do just

Similar for update/insert/delete.

Are there any utilities that this?

Reg,
Chetan

[ April 26, 2005: Message edited by: Chetan Parekh ]




Hi u want to use Utility class for all ur dbase connections just use DAO (Data Access object Design pattern) just grab some details abtr this dao ...
so can code ...easlily...

Thx and Regards
G R Ganesh Gowtham
grgowtham_cse@yahoo.com
 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If u r still amazed how exactly dao works...

it is nothing but class which has so many static mtd's which purely depends of ur Req and b'logic....
Thx and Regards
G R Ganesh Gowtham
grgowtham_cse@yahoo.com
 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gowtham Ganamukala, please don't use so many abbreviations in your posts. It makes them difficult to read. As for the question, it seems as if you have a firm grasp on what needs to be written and it's quite trivial to write something like that. So, just go ahead and write it. But, if you want a more "beefed up" solution, I'd go with Spring (www.springframework.org). They've got frameworks which provide "template" classes for this sort of thing.
reply
    Bookmark Topic Watch Topic
  • New Topic