• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

about the UPC(universal product code) of the room in URLyBird

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

when you write the value object Room,the representation of the hotel room, how do you identify the universal product code of it in your URLyBird project?

Thank you!
Ronggen
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Liu,

Is there a UPC in your assignment?
If not: do you really need to make on up yourself?

Tip: don't make the assigment bigger than it is.

Herman
 
Ronggen Liu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Herman,

Thanks, i just want to make the record is unique use UPC. it's not mentioned in my instruction.

-Ronggen
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ronggen,

How will you cope if a hotel has more than one room of the same type available on the same date?

I had a similar idea to you when I first looked at the DB interface, but I realised that even though the interface throws a DuplicateKeyException, the implementation doesn't have to.
If the data doesn't have to be unique, then it makes things easier (no checking code .

Simon
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic