wood burning stoves 2.0*
The moose likes JDBC and the fly likes JDBC ResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC ResultSet " Watch "JDBC ResultSet " New topic
Author

JDBC ResultSet

Chetan Mehta
Ranch Hand

Joined: Aug 04, 2001
Posts: 40
Hi ,
Can some help explaining following Q.
Which J2EE pattern does JDBCResult set implement? (select 1 ans)
a. Iterator
b. Observer
c. Facade
d. Bridge
Can someone tell me answer to the above question and how that pattern is impmented?
Regards,
Chetan Mehta
Vishakha Ahuja
Ranch Hand

Joined: Sep 13, 2000
Posts: 191
I think it should be Iterator.
[This message has been edited by Vishakha Ahuja (edited August 14, 2001).]
Vishakha Ahuja
Ranch Hand

Joined: Sep 13, 2000
Posts: 191
The Iterator allows you to move through a list or collection of data using a standard interface without having to know the details of the internal representation of that data.
According to this definition, iterator suits best as an answer because the ResultSet object lets you iterate through the entire collection using various methods like first(), last(), next().
A Agrawal
Ranch Hand

Joined: Jul 13, 2001
Posts: 41
I support Vishakha. One more similarity between Iterator and ResultSet is memory. They don't have their own memory and they just point/iterate through memory acquired by some other resource.


------------------
Amit Agrawal,
New Delhi, India.


Amit Agrawal,<BR>New Delhi, India.
Chetan Mehta
Ranch Hand

Joined: Aug 04, 2001
Posts: 40
Thanks a lot for help ..
Chetan Mehta
Ranch Hand

Joined: Aug 04, 2001
Posts: 40
Thanks a lot ...
 
jQuery in Action, 2nd edition
 
subject: JDBC ResultSet
 
Similar Threads
Patterns: Abstract Factory Vs Factory Method
When using MVC, to what degree should a model be tailored to a view?
copy only files excluding sub directories
what is strategy pattern
how use * in servlet mapping ?