Started creating the booking interface for the owners.
[RRRRHHHH_Code] / ruralHouses / src / domain / RuralHouse.java
index 02ab6f9..4f73bb9 100644 (file)
@@ -82,6 +82,8 @@ public class RuralHouse implements Serializable {
                return off;
        }
 
+
+
        @Override
        public boolean equals(Object obj) {
                if (this == obj)
@@ -91,7 +93,10 @@ public class RuralHouse implements Serializable {
                if (getClass() != obj.getClass())
                        return false;
                RuralHouse other = (RuralHouse) obj;
-               if (houseName != other.houseName)
+               if (houseName == null) {
+                       if (other.houseName != null)
+                               return false;
+               } else if (!houseName.equals(other.houseName))
                        return false;
                return true;
        }
@@ -171,8 +176,5 @@ public class RuralHouse implements Serializable {
 
        }
 
-       public boolean equals(RuralHouse oRh) {
-               return this.getHouseName().equals(oRh.getHouseName());
-       }
 
 }