This looks very wrong. How do you propose to handle flight booking?Originally posted by Chandru Ganesan:
I remove lock()/unlock() from Data class.
DataClient interface does NOT define lock()/unlock() methods.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Oh boy. This looks all wrong.Originally posted by Chandru Ganesan:
Defined following 2 methods in Data class
a. criteriaFind(...)
b. reserveSeats(...)
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
So where does it get its client ID identification from? Without such identification, you probably don't implement the API as documented in the javadoc.Originally posted by Chandru Ganesan:
Yes
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Yes, but how does it end up at the server without you writing horrible code that is effectively likeAs I understand your design -- and my understanding may well be wrong -- you can't simply call lock(record, clientId) because Data doesn't implement it. You also can't simply call lock(record) because that wouldn't tell the server anything about the client ID. So that leaves you with awkward conditional code that polymorphism was designed to rid us of. Right or wrong?Originally posted by Chandru Ganesan:
The client id, record number, comes from the DataAdpater.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Take another look at Data. Data has nothing to do with the Fly By Night project. It is a perfectly generic, reusable database class. So should your server be. Any answer that starts with "But the client..." is wrong. If it were right, why did you implement lock(-1), why didn't you junk that useless delete() method, why didn't you delete that completely superfluous extra constructor in Data?Originally posted by Chandru Ganesan:
I see your point. But I dont see this happening in the application.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Consider Paul's rocket mass heater. |