1 7 package org.jfox.petstore.entity; 8 9 import java.io.Serializable ; 10 import javax.persistence.Entity; 11 import javax.persistence.Column; 12 13 import org.jfox.entity.annotation.MappingColumn; 14 import org.jfox.entity.annotation.ParameterMap; 15 import org.jfox.petstore.dao.ProductDAOImpl; 16 17 20 @Entity 21 public class Item implements Serializable { 22 23 @Column(name="itemid") 24 String itemId; 25 26 @Column(name="qty") 27 int quantity; 28 29 @MappingColumn(namedQuery = ProductDAOImpl.GET_PRODUCT, 30 params = {@ParameterMap(name="id",value = "$this.getProductId()")}) 31 Product product; 32 33 @Column(name="productid") 34 String productId; 35 36 @Column(name="supplier") 37 int supplierId; 38 39 @Column(name="listprice") 40 double listPrice; 41 42 @Column(name="unitcost") 43 double unitCost; 44 45 @Column(name="status") 46 String status; 47 48 @Column(name = "attr1") 49 String attribute1; 50 51 @Column(name = "attr2") 52 String attribute2; 53 54 @Column(name = "attr3") 55 String attribute3; 56 57 @Column(name = "attr4") 58 String attribute4; 59 60 @Column(name = "attr5") 61 String attribute5; 62 63 public String getItemId() { 64 return itemId; 65 } 66 67 public void setItemId(String itemId) { 68 this.itemId = itemId; 69 } 70 71 public int getQuantity() { 72 return quantity; 73 } 74 75 public void setQuantity(int quantity) { 76 this.quantity = quantity; 77 } 78 79 public Product getProduct() { 80 return product; 81 } 82 83 public void setProduct(Product product) { 84 this.product = product; 85 } 86 87 public String getProductId() { 88 return productId; 89 } 90 91 public void setProductId(String productId) { 92 this.productId = productId; 93 } 94 95 public int getSupplierId() { 96 return supplierId; 97 } 98 99 public void setSupplierId(int supplierId) { 100 this.supplierId = supplierId; 101 } 102 103 public double getListPrice() { 104 return listPrice; 105 } 106 107 public void setListPrice(double listPrice) { 108 this.listPrice = listPrice; 109 } 110 111 public double getUnitCost() { 112 return unitCost; 113 } 114 115 public void setUnitCost(double unitCost) { 116 this.unitCost = unitCost; 117 } 118 119 public String getStatus() { 120 return status; 121 } 122 123 public void setStatus(String status) { 124 this.status = status; 125 } 126 127 public String getAttribute1() { 128 return attribute1; 129 } 130 131 public void setAttribute1(String attribute1) { 132 this.attribute1 = attribute1; 133 } 134 135 public String getAttribute2() { 136 return attribute2; 137 } 138 139 public void setAttribute2(String attribute2) { 140 this.attribute2 = attribute2; 141 } 142 143 public String getAttribute3() { 144 return attribute3; 145 } 146 147 public void setAttribute3(String attribute3) { 148 this.attribute3 = attribute3; 149 } 150 151 public String getAttribute4() { 152 return attribute4; 153 } 154 155 public void setAttribute4(String attribute4) { 156 this.attribute4 = attribute4; 157 } 158 159 public String getAttribute5() { 160 return attribute5; 161 } 162 163 public void setAttribute5(String attribute5) { 164 this.attribute5 = attribute5; 165 } 166 } 167 | Popular Tags |