Any methods that throw RecordNotFoundException should do so if a specified record does not exist or is marked as deleted in the database file.
* Throws SecurityException if the record is locked with a cookie
* other than lockCookie.
]think i understand why the gui must lock and unklock - it is so it can be certain that before a modify, the record is as expected.
I chose not to lock on the client for the following reasons. I see the cookie as being an aid for the lock\unlock process and does not need to be exposed to the client. I have a Data access object that runs on the server and contains all of the data access logic including lock\unlock.
IMO I feel that this is a better choice consider what will happen if a relational db is chosen other than a data file at some point in the future would you still want to expose a lock cookie. The DAO encapsulates all db access logic therefore the client will not be impacted by a change to a relational db.
Also I only throw an SecurityException if a record is locked by a different cookie, I don't do anything if a cookie is not found I simply return as there does not seem much point as it should throw a SecurityException before getting to this stage if the cookie is locked by another client.
If you've got the B&S, then you don't actually have software requirements for performing a "delete" activity
I have UyB, but I can't see any requirement for delete client side either.
What happens when a client wants to book a room?
They see that the room is unbooked, book it, but they can't because some one has dashed in and beat them to it. how does your update method inform them of that?
if the client controls the lock process they can guarantee they will book the record in the state they read it.
The only way a client can guarantee that the record has not being modified is if they locked it while reading it but this will stop all other clients from using the record while it is simply being displayed and also need a complicated unlocking mechanism.
Paddy spent all of his days in the O'Furniture back yard with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton