Started with the separated DB with the given code
[RRRRHHHH_Code] / ruralHousesDB / src / domain / Account.java
diff --git a/ruralHousesDB/src/domain/Account.java b/ruralHousesDB/src/domain/Account.java
new file mode 100644 (file)
index 0000000..f401391
--- /dev/null
@@ -0,0 +1,84 @@
+package domain;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+
+public class Account implements Serializable {
+
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
+       
+
+       private byte[] username;
+       private byte[] password;
+       private byte[] salt;
+
+
+       private Owner owner;
+       private boolean admin = false;
+
+       public Account(byte[] usr){
+       
+               
+       }
+       public Account(String usr, String pass, boolean isAdmin) {
+               
+
+       }
+
+       public Account(String usr, String pass, Owner ow) {
+               
+
+       }
+
+
+       
+
+       public byte[] getUsername() {
+               return username;
+       }
+
+       public byte[] getPassword() {
+               return password;
+       }
+
+       public Owner getOwner() {
+               return owner;
+       }
+
+       public boolean getAdmin() {
+               return admin;
+       }
+
+       
+       public void setAdmin(boolean admin) {
+               this.admin = admin;
+       }
+
+       public byte[] getSalt() {
+               return salt;
+       }
+
+       public void setSalt(byte[] salt) {
+               this.salt = salt;
+       }
+       
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               Account other = (Account) obj;
+               if (!Arrays.equals(username, other.username))
+                       return false;
+               return true;
+       }
+
+}