1 7 package org.jfox.petstore.entity; 8 9 import java.io.Serializable ; 10 import javax.persistence.Column; 11 import javax.persistence.Entity; 12 13 16 @Entity 17 public class Account implements Serializable , Cloneable { 18 19 @Column(name="userid") String username; 21 22 @Column(name = "password") String password; 24 25 @Column(name="email") 26 String email; 27 28 @Column(name="firstname") 29 String firstName; 30 31 @Column(name="lastname") 32 String lastName; 33 34 @Column(name="status") 35 String status; 36 37 @Column(name="addr1") 38 String address1; 39 40 @Column(name="addr2") 41 String address2; 42 43 @Column(name="city") 44 String city; 45 46 @Column(name="state") 47 String state; 48 49 @Column(name="zip") 50 String zip; 51 52 @Column(name="country") 53 String country; 54 55 @Column(name="phone") 56 String phone; 57 58 @Column(name="favcategory") 59 String favouriteCategoryId; 60 61 @Column(name="langpref") 62 String languagePreference; 63 64 @Column(name="mylistopt") 65 int listOption; 66 67 @Column(name="banneropt") 68 int bannerOption; 69 70 @Column(name="bannername") 71 String bannerName; 72 73 74 public String getUsername() { 75 return username; 76 } 77 78 public void setUsername(String username) { 79 this.username = username; 80 } 81 82 public String getPassword() { 83 return password; 84 } 85 86 public void setPassword(String password) { 87 this.password = password; 88 } 89 90 public String getEmail() { 91 return email; 92 } 93 94 public void setEmail(String email) { 95 this.email = email; 96 } 97 98 public String getFirstName() { 99 return firstName; 100 } 101 102 public void setFirstName(String firstName) { 103 this.firstName = firstName; 104 } 105 106 public String getLastName() { 107 return lastName; 108 } 109 110 public void setLastName(String lastName) { 111 this.lastName = lastName; 112 } 113 114 public String getStatus() { 115 return status; 116 } 117 118 public void setStatus(String status) { 119 this.status = status; 120 } 121 122 public String getAddress1() { 123 return address1; 124 } 125 126 public void setAddress1(String address1) { 127 this.address1 = address1; 128 } 129 130 public String getAddress2() { 131 return address2; 132 } 133 134 public void setAddress2(String address2) { 135 this.address2 = address2; 136 } 137 138 public String getCity() { 139 return city; 140 } 141 142 public void setCity(String city) { 143 this.city = city; 144 } 145 146 public String getState() { 147 return state; 148 } 149 150 public void setState(String state) { 151 this.state = state; 152 } 153 154 public String getZip() { 155 return zip; 156 } 157 158 public void setZip(String zip) { 159 this.zip = zip; 160 } 161 162 public String getCountry() { 163 return country; 164 } 165 166 public void setCountry(String country) { 167 this.country = country; 168 } 169 170 public String getPhone() { 171 return phone; 172 } 173 174 public void setPhone(String phone) { 175 this.phone = phone; 176 } 177 178 public String getFavouriteCategoryId() { 179 return favouriteCategoryId; 180 } 181 182 public void setFavouriteCategoryId(String favouriteCategoryId) { 183 this.favouriteCategoryId = favouriteCategoryId; 184 } 185 186 public String getLanguagePreference() { 187 return languagePreference; 188 } 189 190 public void setLanguagePreference(String languagePreference) { 191 this.languagePreference = languagePreference; 192 } 193 194 public int getListOption() { 195 return listOption; 196 } 197 198 public void setListOption(int listOption) { 199 this.listOption = listOption; 200 } 201 202 public int getBannerOption() { 203 return bannerOption; 204 } 205 206 public void setBannerOption(int bannerOption) { 207 this.bannerOption = bannerOption; 208 } 209 210 public String getBannerName() { 211 return bannerName; 212 } 213 214 public void setBannerName(String bannerName) { 215 this.bannerName = bannerName; 216 } 217 218 protected Object clone() throws CloneNotSupportedException { 219 return super.clone(); 220 } 221 222 public static class AccountHelper { 223 public static boolean isListOption(Account account) { 224 return account.getListOption() == 1 ? true : false; 225 } 226 227 public static boolean isBannerOption(Account account) { 228 return account.getBannerOption() == 1 ? true : false; 229 } 230 } 231 232 } 233 | Popular Tags |