Merge branch 'master' of https://xp-dev.com/git/RRRRHHHH_Code
[RRRRHHHH_Code] / ruralHouses / src / businessLogic / HouseManager.java
index 68cf64e..0233811 100644 (file)
@@ -1,16 +1,24 @@
 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 {
-       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) {
@@ -46,30 +54,11 @@ public class HouseManager implements HouseManagerInterface {
 
 
 
-       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);
+               return this.dbMngr.getRuralHouses( ow, name ,town, nBed, nKit, nBath, nPark, nLiv);
        }
 
-       @Override
-       public Vector<RuralHouse> getAllRuralHouses() throws RemoteException,
-                       Exception {
-               return dbMngr.getAllRuralHouses();
-       }
-
-
-
-       // 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.
 
 }