Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Use of sql.Date  RSS feed

 
Melody Siu
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, is there any benefit for having the sql.Date object exposed to the web tier after object is retrieved from its persistent storage versus using Calendar object through out except in the block of code that needs to deal with sql.Date (i.e. insert/update sql methods).
Thanks,
Mel
 
Wayne L Johnson
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think your analysis is correct: "java.sql.Date" should be used as close to the database tier as possible, and exposed to the outside world as another class instance, such as "java.util.Calendar".
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!