package businessLogic;
import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
import java.util.Vector;
+import common.HouseInterface;
+
import dataAccess.DB4oManager;
import domain.Owner;
import domain.RuralHouse;
-public class HouseManager implements HouseManagerInterface {
-
- private DB4oManager dbMngr;
- public HouseManager() {
+public class HouseManager extends UnicastRemoteObject implements HouseInterface {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ DB4oManager dbMngr;
+ public HouseManager() throws RemoteException {
+ super();
try {
dbMngr = DB4oManager.getInstance();
} catch (Exception e) {
- public Vector<RuralHouse> getHouses(String name,String town, int nBed, int nKit,
+ public Vector<RuralHouse> getHouses(Owner ow, String name,String town, int nBed, int nKit,
int nBath, int nPark, int nLiv) {
- return this.dbMngr.getRuralHouses(name ,town, nBed, nKit, nBath, nPark, nLiv);
- }
-
- @Override
- public Vector<RuralHouse> getAllRuralHouses() throws RemoteException,
- Exception {
- return dbMngr.getAllRuralHouses();
+ return this.dbMngr.getRuralHouses( ow, name ,town, nBed, nKit, nBath, nPark, nLiv);
}
-
- // For future implementation
- // @Override
- // public void modifyHouse(int houseName, Owner owner, String description,
- // String town, int nRooms, int nKitchens, int nBaths, int nLivings,
- // int nParkings) {
- // // TODO Auto-generated method stub
- //
- // }
-
- // Maybe returning the offer is not necessary. Depends on GUI
- // implementation.
-
}