Hi folks, should I check for a valid owner ID when performing create() and update()? Currently, in the book(), I do check if owner ID is a valid one (8-digit number), otherwise I would throw an exception; but not sure if I should do the same with create() and update()
Joined: Sep 18, 2003
In my case I assume that the owner are all correct this because in my specs I have somethig like :
The id value (an 8 digit number) of the customer who has booked this. Note that for this application, you should assume that customers and CSRs know their customer ids. The system you are writing does not interact with these numbers, rather it simply records them. If this field is all blanks, the record is available for sale.
Apropos booking what you do by booking ? I just modify the last field(Customer holding this record) for the booked record. and on release I "blank" this field.
Regards, Mihai [ April 20, 2006: Message edited by: Mihai Radulescu ]
SCJP, SCJD, SCWCD
Joined: Mar 31, 2005
Thanks Mihai. I end up validate the customer ID in create() and update() in my business service code since I believe that those functions should expect that the CSRs may mistakenly enter invalid customer ID.
For booking, I read the record from the file, make sure the owner field is blank and then set the new owner into it, then call dbMainImpl.update(data)