-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStockXProduct.java
More file actions
143 lines (136 loc) · 4.01 KB
/
Copy pathStockXProduct.java
File metadata and controls
143 lines (136 loc) · 4.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
package GUI.Overlays.ItemCreation;
import java.io.Serializable;
public class StockXProduct implements Serializable {
/**
*
*/
private static final long serialVersionUID = 8366403397493841561L;
String title;
String url;
long retail;
String brand;
String sku;
String color;
String releaseDate;
String LargeImageUrl;
String MediumImageUrl;
String SmallImageUrl;
String Search;
String size;
String groupName;
/**
*
* @param title Title of the item/product
* @param retail The retail price of the item
* @param brand The brand of the item
* @param urlPart The title part of the item used going to the url for buying/selling
*/
public StockXProduct(String title, long retail, String brand, String urlPart, String color, String SKU, String releaseDate) {
this.title = title;
this.url = urlPart;
this.retail = retail;
this.brand = brand;
if(SKU != null && !SKU.trim().equals("")) {
this.sku = SKU;
} else {
this.sku = "None";
}
this.color = color;
try {
String year = releaseDate.split("-")[0];
String month = releaseDate.split("-")[1];
String day = releaseDate.split("-")[2];
this.releaseDate = month + "/" + day + "/" + year;
} catch(Exception e) {
this.releaseDate = "11/19/2000";
}
}
/**
*
* @param title Title of the item/product
* @param retail The retail price of the item
* @param brand The brand of the item
* @param urlPart The title part of the item used going to the url for buying/selling
*/
public StockXProduct(StockXProduct product, String size) {
this.size = size;
this.title = product.getTitle();
this.url = product.getUrl();
this.retail = product.getRetail();
this.brand = product.getBrand();
if(product.getSku() != null && !product.getSku().trim().equals("")) {
this.sku = product.getSku();
} else {
this.sku = "None";
}
this.color = product.getColor();
try {
String year = product.getReleaseDate().split("-")[0];
String month = product.getReleaseDate().split("-")[1];
String day = product.getReleaseDate().split("-")[2];
this.releaseDate = month + "/" + day + "/" + year;
} catch(Exception e) {
this.releaseDate = "11/19/2000";
}
}
public void setSize(String size) {
this.size = size;
}
public String getSize() {
return this.size;
}
public void setSearched(String search) {
this.Search = search;
}
public String getSearched() {
return Search;
}
public String getTitle() {
return title;
}
public String getUrl() {
return url;
}
public long getRetail() {
return retail;
}
public String getBrand() {
return brand;
}
public void setSmallImageUrl(String url) {
this.SmallImageUrl = url;
}
public String getSmallImageUrl() {
return SmallImageUrl;
}
public String getColor() {
return color;
}
public String getSku() {
return sku;
}
public String getReleaseDate() {
return releaseDate;
}
public void setSku(String sku) {
this.sku = sku;
}
public void setTitle(String title) {
this.title = title;
}
public void setColor(String color) {
this.color = color;
}
public void setReleaseDate(String date) {
this.releaseDate = date;
}
public void setRetail(Long retail) {
this.retail = retail;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String name) {
this.groupName = name;
}
}