4 import java.util.Vector;
6 import dataAccess.DB4oManager;
10 import domain.RuralHouse;
12 public class HouseManager implements HouseManagerInterface {
15 public HouseManager() {
17 dbMngr = DB4oManager.getInstance();
18 } catch (Exception e) {
19 // TODO Auto-generated catch block
25 public boolean registerNewHouse(int houseNumber, Owner owner, String town,
26 int nRooms, int nKitchens, int nBaths, int nLivings, int nParkings) {
27 // TODO Auto-generated method stub
28 if (nKitchens < 1 || nLivings < 3 || nBaths < 2)
31 this.dbMngr.storeRuralHouses(new RuralHouse(houseNumber, owner,
32 town, nRooms, nKitchens, nBaths, nLivings, nParkings));
33 } catch (Exception e) {
34 // TODO Auto-generated catch block
42 public boolean registerNewHouse(int houseNumber, Owner owner,
43 String description, String town, int nRooms, int nKitchens,
44 int nBaths, int nLivings, int nParkings) {
45 // TODO Auto-generated method stub
46 if (nKitchens < 1 || nLivings < 3 || nBaths < 2)
49 this.dbMngr.storeRuralHouses(new RuralHouse(houseNumber, owner,
50 description, town, nRooms, nKitchens, nBaths, nLivings,
52 } catch (Exception e) {
53 // TODO Auto-generated catch block
60 public void modifyHouse(int houseNumber, Owner owner, String description,
61 String town, int nRooms, int nKitchens, int nBaths, int nLivings,
63 // TODO Auto-generated method stub
67 //Maybe returning the offer is not necessary. Depends on GUI implementation.
69 public Offer setOffers(RuralHouse ruralHouse, Date firstDay, Date lastDay,
71 // TODO Auto-generated method stub
73 return this.dbMngr.createOffer(ruralHouse, firstDay, lastDay, price);
74 } catch (Exception e) {
75 // TODO Auto-generated catch block