1 7 package org.jfox.petstore.entity; 8 9 import java.io.Serializable ; 10 import java.util.Date ; 11 import java.util.List ; 12 import javax.persistence.Entity; 13 import javax.persistence.Column; 14 15 import org.jfox.entity.annotation.MappingColumn; 16 import org.jfox.entity.annotation.ParameterMap; 17 import org.jfox.petstore.dao.OrderDAOImpl; 18 19 @Entity 20 public class Order implements Serializable { 21 22 @Column(name = "orderid") 23 long orderId; 24 25 @Column(name = "userid") 26 String username; 27 28 @Column(name = "orderdate") 29 Date orderDate; 30 31 @Column(name = "shipaddr1") 32 String shipAddress1; 33 34 @Column(name = "shipaddr2") 35 String shipAddress2; 36 37 @Column(name = "shipcity") 38 String shipCity; 39 40 @Column(name = "shipstate") 41 String shipState; 42 43 @Column(name = "shipzip") 44 String shipZip; 45 46 @Column(name = "shipcountry") 47 String shipCountry; 48 49 @Column(name = "billaddr1") 50 String billAddress1; 51 52 @Column(name = "billaddr2") 53 String billAddress2; 54 55 @Column(name = "billcity") 56 String billCity; 57 58 @Column(name = "billstate") 59 String billState; 60 61 @Column(name = "billzip") 62 String billZip; 63 64 @Column(name = "billcountry") 65 String billCountry; 66 67 @Column(name = "courier") 68 String courier; 69 70 @Column(name = "totalprice") 71 double totalPrice; 72 73 @Column(name = "billtofirstname") 74 String billToFirstName; 75 76 @Column(name = "billtolastname") 77 String billToLastName; 78 79 @Column(name = "shiptofirstname") 80 String shipToFirstName; 81 82 @Column(name = "shiptolastname") 83 String shipToLastName; 84 85 @Column(name = "creditcard") 86 String creditCard; 87 88 @Column(name = "exprdate") 89 String expiryDate; 90 91 @Column(name = "cardtype") 92 String cardType; 93 94 @Column(name = "locale") 95 String locale; 96 97 98 @Column(name = "status") 100 String status; 101 102 @MappingColumn(namedQuery = OrderDAOImpl.GET_LINEITEMS_BY_ORDERID, params = {@ParameterMap(name = "orderid", value = "$this.getOrderId()")}) 104 List <LineItem> lineItems; 105 106 107 public long getOrderId() { 108 return orderId; 109 } 110 111 public void setOrderId(long orderId) { 112 this.orderId = orderId; 113 } 114 115 public String getUsername() { 116 return username; 117 } 118 119 public void setUsername(String username) { 120 this.username = username; 121 } 122 123 public Date getOrderDate() { 124 return orderDate; 125 } 126 127 public void setOrderDate(Date orderDate) { 128 this.orderDate = orderDate; 129 } 130 131 public String getShipAddress1() { 132 return shipAddress1; 133 } 134 135 public void setShipAddress1(String shipAddress1) { 136 this.shipAddress1 = shipAddress1; 137 } 138 139 public String getShipAddress2() { 140 return shipAddress2; 141 } 142 143 public void setShipAddress2(String shipAddress2) { 144 this.shipAddress2 = shipAddress2; 145 } 146 147 public String getShipCity() { 148 return shipCity; 149 } 150 151 public void setShipCity(String shipCity) { 152 this.shipCity = shipCity; 153 } 154 155 public String getShipState() { 156 return shipState; 157 } 158 159 public void setShipState(String shipState) { 160 this.shipState = shipState; 161 } 162 163 public String getShipZip() { 164 return shipZip; 165 } 166 167 public void setShipZip(String shipZip) { 168 this.shipZip = shipZip; 169 } 170 171 public String getShipCountry() { 172 return shipCountry; 173 } 174 175 public void setShipCountry(String shipCountry) { 176 this.shipCountry = shipCountry; 177 } 178 179 public String getBillAddress1() { 180 return billAddress1; 181 } 182 183 public void setBillAddress1(String billAddress1) { 184 this.billAddress1 = billAddress1; 185 } 186 187 public String getBillAddress2() { 188 return billAddress2; 189 } 190 191 public void setBillAddress2(String billAddress2) { 192 this.billAddress2 = billAddress2; 193 } 194 195 public String getBillCity() { 196 return billCity; 197 } 198 199 public void setBillCity(String billCity) { 200 this.billCity = billCity; 201 } 202 203 public String getBillState() { 204 return billState; 205 } 206 207 public void setBillState(String billState) { 208 this.billState = billState; 209 } 210 211 public String getBillZip() { 212 return billZip; 213 } 214 215 public void setBillZip(String billZip) { 216 this.billZip = billZip; 217 } 218 219 public String getBillCountry() { 220 return billCountry; 221 } 222 223 public void setBillCountry(String billCountry) { 224 this.billCountry = billCountry; 225 } 226 227 public String getCourier() { 228 return courier; 229 } 230 231 public void setCourier(String courier) { 232 this.courier = courier; 233 } 234 235 public double getTotalPrice() { 236 return totalPrice; 237 } 238 239 public void setTotalPrice(double totalPrice) { 240 this.totalPrice = totalPrice; 241 } 242 243 public String getBillToFirstName() { 244 return billToFirstName; 245 } 246 247 public void setBillToFirstName(String billToFirstName) { 248 this.billToFirstName = billToFirstName; 249 } 250 251 public String getBillToLastName() { 252 return billToLastName; 253 } 254 255 public void setBillToLastName(String billToLastName) { 256 this.billToLastName = billToLastName; 257 } 258 259 public String getShipToFirstName() { 260 return shipToFirstName; 261 } 262 263 public void setShipToFirstName(String shipToFirstName) { 264 this.shipToFirstName = shipToFirstName; 265 } 266 267 public String getShipToLastName() { 268 return shipToLastName; 269 } 270 271 public void setShipToLastName(String shipToLastName) { 272 this.shipToLastName = shipToLastName; 273 } 274 275 public String getCreditCard() { 276 return creditCard; 277 } 278 279 public void setCreditCard(String creditCard) { 280 this.creditCard = creditCard; 281 } 282 283 public String getExpiryDate() { 284 return expiryDate; 285 } 286 287 public void setExpiryDate(String expiryDate) { 288 this.expiryDate = expiryDate; 289 } 290 291 public String getCardType() { 292 return cardType; 293 } 294 295 public void setCardType(String cardType) { 296 this.cardType = cardType; 297 } 298 299 public String getLocale() { 300 return locale; 301 } 302 303 public void setLocale(String locale) { 304 this.locale = locale; 305 } 306 307 public String getStatus() { 308 return status; 309 } 310 311 public void setStatus(String status) { 312 this.status = status; 313 } 314 315 public List <LineItem> getLineItems() { 316 return lineItems; 317 } 318 319 public void setLineItems(List <LineItem> lineItems) { 320 this.lineItems = lineItems; 321 } 322 } 323 | Popular Tags |