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

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

 
Ronggen Liu
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Herman Schelti
Ranch Hand
Posts: 387
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Simon Hogg
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic