• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

URLybird  RSS feed

 
Ranch Hand
Posts: 159
  • 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
 
Ranch Hand
Posts: 1033
  • 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.
 
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!