Hi Andrew,
Thanks for your comments.
Sun's requirements is
Record locking must be implemented using the methods public void lock(int) and public void unlock(int). These methods are required to allow concurrent use of the database when booking flights from multiple clients...
Here is my justification : these two methods are required when there are multiple clients. In the case of local mode there will be only one client and hence there is no need for locking. Data class will be used in the local mode. Only in the network mode there will be multiple clients accessing the database concurrently. So I feel RemoteData is the right place to implement these two methods.
I hope I understand the requirements correctly and my justification is reasonable. Please correct me if am wrong.
Normally in an MVC design, it is the model which models the data (and hence has all the accessor / modifier methods).
I wanted to implement a generic data server. Also business logic ( searchFlight, bookFlight and other methods) is application specific. So I implemented them in the client. These methods inturn call criteriaFind, read, lock, modify and unlock methods.(that are implemented in the model). Correct me if I am on trhe wrong track.
thanks,
Meena