| 27878 |
amit.gupta |
1 |
package com.spice.profitmandi.dao.model;
|
|
|
2 |
|
|
|
3 |
import java.util.List;
|
|
|
4 |
|
|
|
5 |
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
|
|
|
6 |
import com.spice.profitmandi.service.offers.ItemCriteria;
|
|
|
7 |
import com.spice.profitmandi.service.offers.PayoutSlab;
|
|
|
8 |
|
|
|
9 |
public class ItemCriteriaPayout {
|
|
|
10 |
private AmountType amountType;
|
|
|
11 |
private ItemCriteria itemCriteria;
|
|
|
12 |
private List<PayoutSlab> payoutSlabs;
|
|
|
13 |
private String itemCriteriaString;
|
| 29785 |
amit.gupta |
14 |
private long achievedValue;
|
|
|
15 |
private long shortValue;
|
|
|
16 |
private PayoutSlab currentSlab;
|
|
|
17 |
private PayoutSlab nextSlab;
|
| 27878 |
amit.gupta |
18 |
|
| 29785 |
amit.gupta |
19 |
public long getShortValue() {
|
|
|
20 |
return shortValue;
|
|
|
21 |
}
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
public void setShortValue(long shortValue) {
|
|
|
25 |
this.shortValue = shortValue;
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
public PayoutSlab getCurrentSlab() {
|
|
|
30 |
return currentSlab;
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
public void setCurrentSlab(PayoutSlab currentSlab) {
|
|
|
35 |
this.currentSlab = currentSlab;
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
public PayoutSlab getNextSlab() {
|
|
|
40 |
return nextSlab;
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
public void setNextSlab(PayoutSlab nextSlab) {
|
|
|
45 |
this.nextSlab = nextSlab;
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
public ItemCriteria getItemCriteria() {
|
| 27878 |
amit.gupta |
50 |
return itemCriteria;
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
public AmountType getAmountType() {
|
|
|
55 |
return amountType;
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
public void setAmountType(AmountType amountType) {
|
|
|
61 |
this.amountType = amountType;
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
| 29785 |
amit.gupta |
66 |
public long getAchievedValue() {
|
|
|
67 |
return achievedValue;
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
public void setAchievedValue(long achievedValue) {
|
|
|
72 |
this.achievedValue = achievedValue;
|
|
|
73 |
}
|
|
|
74 |
|
|
|
75 |
|
| 27878 |
amit.gupta |
76 |
public String getItemCriteriaString() {
|
|
|
77 |
return itemCriteriaString;
|
|
|
78 |
}
|
|
|
79 |
|
|
|
80 |
public void setItemCriteriaString(String itemCriteriaString) {
|
|
|
81 |
this.itemCriteriaString = itemCriteriaString;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
@Override
|
|
|
85 |
public int hashCode() {
|
|
|
86 |
final int prime = 31;
|
|
|
87 |
int result = 1;
|
|
|
88 |
result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
|
| 29785 |
amit.gupta |
89 |
result = prime * result + ((currentSlab == null) ? 0 : currentSlab.hashCode());
|
| 27878 |
amit.gupta |
90 |
result = prime * result + ((itemCriteria == null) ? 0 : itemCriteria.hashCode());
|
|
|
91 |
result = prime * result + ((itemCriteriaString == null) ? 0 : itemCriteriaString.hashCode());
|
|
|
92 |
return result;
|
|
|
93 |
}
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
@Override
|
|
|
98 |
public boolean equals(Object obj) {
|
|
|
99 |
if (this == obj)
|
|
|
100 |
return true;
|
|
|
101 |
if (obj == null)
|
|
|
102 |
return false;
|
|
|
103 |
if (getClass() != obj.getClass())
|
|
|
104 |
return false;
|
|
|
105 |
ItemCriteriaPayout other = (ItemCriteriaPayout) obj;
|
|
|
106 |
if (amountType != other.amountType)
|
|
|
107 |
return false;
|
| 29785 |
amit.gupta |
108 |
if (currentSlab == null) {
|
|
|
109 |
if (other.currentSlab != null)
|
|
|
110 |
return false;
|
|
|
111 |
} else if (!currentSlab.equals(other.currentSlab))
|
|
|
112 |
return false;
|
| 27878 |
amit.gupta |
113 |
if (itemCriteria == null) {
|
|
|
114 |
if (other.itemCriteria != null)
|
|
|
115 |
return false;
|
|
|
116 |
} else if (!itemCriteria.equals(other.itemCriteria))
|
|
|
117 |
return false;
|
|
|
118 |
if (itemCriteriaString == null) {
|
|
|
119 |
if (other.itemCriteriaString != null)
|
|
|
120 |
return false;
|
|
|
121 |
} else if (!itemCriteriaString.equals(other.itemCriteriaString))
|
|
|
122 |
return false;
|
|
|
123 |
return true;
|
|
|
124 |
}
|
|
|
125 |
|
|
|
126 |
public void setItemCriteria(ItemCriteria itemCriteria) {
|
|
|
127 |
this.itemCriteria = itemCriteria;
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
public List<PayoutSlab> getPayoutSlabs() {
|
|
|
131 |
return payoutSlabs;
|
|
|
132 |
}
|
|
|
133 |
|
|
|
134 |
public void setPayoutSlabs(List<PayoutSlab> payoutSlabs) {
|
|
|
135 |
this.payoutSlabs = payoutSlabs;
|
|
|
136 |
}
|
|
|
137 |
|
|
|
138 |
|
|
|
139 |
|
|
|
140 |
@Override
|
|
|
141 |
public String toString() {
|
|
|
142 |
return "ItemCriteriaPayout [amountType=" + amountType + ", itemCriteria=" + itemCriteria + ", payoutSlabs="
|
| 29785 |
amit.gupta |
143 |
+ payoutSlabs + ", itemCriteriaString=" + itemCriteriaString + ", achievedValue=" + achievedValue
|
|
|
144 |
+ ", shortValue=" + shortValue + ", currentSlab=" + currentSlab + ", nextSlab=" + nextSlab + "]";
|
| 27878 |
amit.gupta |
145 |
}
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
|
|
|
150 |
}
|