| 10689 |
manish.sha |
1 |
package in.shop2020.warehouse.domain;
|
|
|
2 |
|
|
|
3 |
import java.util.Date;
|
|
|
4 |
|
|
|
5 |
public class AmazonTransferredSkuDetail{
|
|
|
6 |
private long itemId;
|
|
|
7 |
private long purchaseId;
|
|
|
8 |
private Date purchaseDate;
|
|
|
9 |
private long quantity;
|
|
|
10 |
private double unitPrice;
|
|
|
11 |
private String brand;
|
|
|
12 |
private String modelName;
|
|
|
13 |
private String modelNumber;
|
|
|
14 |
private String category;
|
|
|
15 |
private String color;
|
|
|
16 |
|
|
|
17 |
public static AmazonTransferredSkuDetail create(in.shop2020.warehouse.AmazonTransferredSkuDetail thriftAmazonSkuDetail) {
|
|
|
18 |
AmazonTransferredSkuDetail amazonSkuDetail = new AmazonTransferredSkuDetail();
|
|
|
19 |
amazonSkuDetail.itemId = thriftAmazonSkuDetail.getItemId();
|
|
|
20 |
amazonSkuDetail.purchaseId = thriftAmazonSkuDetail.getPurchaseId();
|
|
|
21 |
amazonSkuDetail.purchaseDate = new Date(thriftAmazonSkuDetail.getPurchaseDate());
|
|
|
22 |
amazonSkuDetail.quantity = thriftAmazonSkuDetail.getQuantity();
|
|
|
23 |
amazonSkuDetail.unitPrice = thriftAmazonSkuDetail.getUnitPrice();
|
|
|
24 |
amazonSkuDetail.brand = thriftAmazonSkuDetail.getBrand();
|
|
|
25 |
if(thriftAmazonSkuDetail.isSetModelName()){
|
|
|
26 |
amazonSkuDetail.modelName = thriftAmazonSkuDetail.getModelName();
|
|
|
27 |
}
|
|
|
28 |
if(thriftAmazonSkuDetail.isSetModelNumber()){
|
|
|
29 |
amazonSkuDetail.modelNumber = thriftAmazonSkuDetail.getModelNumber();
|
|
|
30 |
}
|
|
|
31 |
amazonSkuDetail.category = thriftAmazonSkuDetail.getCategory();
|
|
|
32 |
amazonSkuDetail.color = thriftAmazonSkuDetail.getColor();
|
|
|
33 |
return amazonSkuDetail;
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
public in.shop2020.warehouse.AmazonTransferredSkuDetail convert() {
|
|
|
38 |
in.shop2020.warehouse.AmazonTransferredSkuDetail thriftAmazonSkuDetail = new in.shop2020.warehouse.AmazonTransferredSkuDetail();
|
|
|
39 |
thriftAmazonSkuDetail.setItemId(itemId);
|
|
|
40 |
thriftAmazonSkuDetail.setPurchaseId(purchaseId);
|
|
|
41 |
if(purchaseDate!=null){
|
|
|
42 |
thriftAmazonSkuDetail.setPurchaseDate(purchaseDate.getTime());
|
|
|
43 |
}
|
|
|
44 |
thriftAmazonSkuDetail.setQuantity(quantity);
|
|
|
45 |
thriftAmazonSkuDetail.setUnitPrice(unitPrice);
|
|
|
46 |
thriftAmazonSkuDetail.setBrand(brand);
|
|
|
47 |
if(modelName!=null){
|
|
|
48 |
thriftAmazonSkuDetail.setModelName(modelName);
|
|
|
49 |
}
|
|
|
50 |
if(modelNumber!=null){
|
|
|
51 |
thriftAmazonSkuDetail.setModelNumber(modelNumber);
|
|
|
52 |
}
|
|
|
53 |
thriftAmazonSkuDetail.setCategory(category);
|
|
|
54 |
thriftAmazonSkuDetail.setColor(color);
|
|
|
55 |
return thriftAmazonSkuDetail;
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
public long getItemId() {
|
|
|
59 |
return itemId;
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
public void setItemId(long itemId) {
|
|
|
63 |
this.itemId = itemId;
|
|
|
64 |
}
|
|
|
65 |
|
|
|
66 |
public long getPurchaseId() {
|
|
|
67 |
return purchaseId;
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
public void setPurchaseId(long purchaseId) {
|
|
|
71 |
this.purchaseId = purchaseId;
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
public Date getPurchaseDate() {
|
|
|
75 |
return purchaseDate;
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
public void setPurchaseDate(Date purchaseDate) {
|
|
|
79 |
this.purchaseDate = purchaseDate;
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
public long getQuantity() {
|
|
|
83 |
return quantity;
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
public void setQuantity(long quantity) {
|
|
|
87 |
this.quantity = quantity;
|
|
|
88 |
}
|
|
|
89 |
|
|
|
90 |
public double getUnitPrice() {
|
|
|
91 |
return unitPrice;
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
public void setUnitPrice(double unitPrice) {
|
|
|
95 |
this.unitPrice = unitPrice;
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
public String getBrand() {
|
|
|
99 |
return brand;
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
public void setBrand(String brand) {
|
|
|
104 |
this.brand = brand;
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
public String getModelName() {
|
|
|
109 |
return modelName;
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
public void setModelName(String modelName) {
|
|
|
114 |
this.modelName = modelName;
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
public String getModelNumber() {
|
|
|
119 |
return modelNumber;
|
|
|
120 |
}
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
public void setModelNumber(String modelNumber) {
|
|
|
124 |
this.modelNumber = modelNumber;
|
|
|
125 |
}
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
public String getCategory() {
|
|
|
129 |
return category;
|
|
|
130 |
}
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
public void setCategory(String category) {
|
|
|
134 |
this.category = category;
|
|
|
135 |
}
|
|
|
136 |
|
|
|
137 |
|
|
|
138 |
public String getColor() {
|
|
|
139 |
return color;
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
|
|
|
143 |
public void setColor(String color) {
|
|
|
144 |
this.color = color;
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
}
|