File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLybird

 
Beny Na
Ranch Hand
Posts: 159
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

is it ok to encapsulate a record into an object named room, that consist of
hotel name, location, etc..
what is the good class name to encapsulate a record?

thanks
 
peter wooster
Ranch Hand
Posts: 1033
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Beny Na:
hi all,

is it ok to encapsulate a record into an object named room, that consist of
hotel name, location, etc..
what is the good class name to encapsulate a record?

thanks


I do that in my GUI code, such an object is using the Transfer Object pattern, also known as the Data Transfer Object, DTO, or Value Object pattern.

I don't use it over RMI since the instructions indicate that the DBAccess interface should be used, it passes an array of Strings. In a real system I'd use the Data Access Object pattern as well.

I just call the class Room.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic