Originally posted by Fred Barnes:
Here is my plan of attack! Please comment and advise...
public interface DataInterface
Includes all the public methods of Data, plus criteriaFind method.
All methods throws IOExceptions.
getRecord, find, add, modify, delete also throws DatabaseExceptions.
public class Data
Data is changed to implement DataInterface
citeriaFind is implemented while lock and unlock remain empty.
Datainfo, FieldInfo and DatabaseException remain unchanged.
public interface RemoteDataInterface
Extends DataInterface and implements Remote.
public class RemoteData
Extends UnicastRemoteObject implements RemoteDataInterface and Unreferenced.
Has a static reference to Data and LockManager.
Implement lock and unlock methods.
public interface ConnectionFactory
Has a getConnection method that returns a DataInterface. For local connection it will return Data and remote an instance of RemoteData.
public class ConnectionFactoryImpl
Extends UnicastRemoteObject and implements ConnectionFactory.
public class LockManager
Uses a HashMap to store locked records.
public class DataModel extends AbstractTableModel
Implemented as a facade.
Contains the book, search and getConnection methods.
public class DataController
The controller class in my client side MVC.
Here I will implement all needed listeners.
public class DataView
Class containing all my GUI components.