DB server side improved some problems when showing bookings remain
[RRRRHHHH_Code] / ruralHousesDB / src / domain / Account.java
1 package domain;
2
3 import java.io.Serializable;
4 import java.util.Arrays;
5
6 public class Account implements Serializable {
7
8         /**
9          * 
10          */
11         private static final long serialVersionUID = 1L;
12
13         private byte[] username;
14         private byte[] password;
15         private byte[] salt;
16
17         private Owner owner;
18         private boolean admin = false;
19
20         public Account(byte[] usr) {
21
22         }
23
24         public Account(Owner own) {
25         }
26
27         public Account(String usr, String pass, boolean isAdmin) {
28
29         }
30
31         public Account(String usr, String pass, Owner ow) {
32
33         }
34
35         public byte[] getUsername() {
36                 return username;
37         }
38
39         public byte[] getPassword() {
40                 return password;
41         }
42
43         public Owner getOwner() {
44                 return owner;
45         }
46
47         public boolean getAdmin() {
48                 return admin;
49         }
50
51         public void setAdmin(boolean admin) {
52                 this.admin = admin;
53         }
54
55         public byte[] getSalt() {
56                 return salt;
57         }
58
59         public void setSalt(byte[] salt) {
60                 this.salt = salt;
61         }
62
63         @Override
64         public boolean equals(Object obj) {
65                 if (this == obj)
66                         return true;
67                 if (obj == null)
68                         return false;
69                 if (getClass() != obj.getClass())
70                         return false;
71                 Account other = (Account) obj;
72                 if (!Arrays.equals(username, other.username))
73                         return false;
74                 return true;
75         }
76
77 }