• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC ResultSet  RSS feed

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it should be Iterator.
[This message has been edited by Vishakha Ahuja (edited August 14, 2001).]
 
Vishakha Ahuja
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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().
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chetan Mehta
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for help ..
 
Chetan Mehta
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot ...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!