Subversion Repositories SmartDukaan

Rev

Rev 25880 | Rev 34163 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25880 Rev 26665
Line 1... Line 1...
1
package com.spice.profitmandi.service.inventory;
1
package com.spice.profitmandi.service.inventory;
2
 
2
 
-
 
3
import java.util.Arrays;
-
 
4
 
3
public class AvailabilityInfo
5
public class AvailabilityInfo
4
{
6
{
5
    private BulkPricing[] bulkPricing;
7
    private BulkPricing[] bulkPricing;
6
    private double sellingPrice;
8
    private double sellingPrice;
7
    private String color;
9
    private String color;
Line 12... Line 14...
12
    private int maxQuantity;
14
    private int maxQuantity;
13
    private int cash_back_type;
15
    private int cash_back_type;
14
    private int quantityStep;
16
    private int quantityStep;
15
    private int availability;
17
    private int availability;
16
    private int minBuyQuantity;
18
    private int minBuyQuantity;
-
 
19
    private double mrp;
17
    
20
    
-
 
21
	@Override
-
 
22
	public String toString() {
-
 
23
		return "AvailabilityInfo [bulkPricing=" + Arrays.toString(bulkPricing) + ", sellingPrice=" + sellingPrice
-
 
24
				+ ", color=" + color + ", item_id=" + item_id + ", sellingPriceType=" + sellingPriceType
-
 
25
				+ ", netPriceAfterCashBack=" + netPriceAfterCashBack + ", cash_back=" + cash_back + ", maxQuantity="
-
 
26
				+ maxQuantity + ", cash_back_type=" + cash_back_type + ", quantityStep=" + quantityStep
-
 
27
				+ ", availability=" + availability + ", minBuyQuantity=" + minBuyQuantity + ", mrp=" + mrp + "]";
-
 
28
	}
18
	public BulkPricing[] getBulkPricing() {
29
	public BulkPricing[] getBulkPricing() {
19
		return bulkPricing;
30
		return bulkPricing;
20
	}
31
	}
-
 
32
	public double getMrp() {
-
 
33
		return mrp;
-
 
34
	}
-
 
35
	public void setMrp(double mrp) {
-
 
36
		this.mrp = mrp;
-
 
37
	}
21
	public void setBulkPricing(BulkPricing[] bulkPricing) {
38
	public void setBulkPricing(BulkPricing[] bulkPricing) {
22
		this.bulkPricing = bulkPricing;
39
		this.bulkPricing = bulkPricing;
23
	}
40
	}
24
	public double getSellingPrice() {
41
	public double getSellingPrice() {
25
		return sellingPrice;
42
		return sellingPrice;
Line 85... Line 102...
85
		return minBuyQuantity;
102
		return minBuyQuantity;
86
	}
103
	}
87
	public void setMinBuyQuantity(int minBuyQuantity) {
104
	public void setMinBuyQuantity(int minBuyQuantity) {
88
		this.minBuyQuantity = minBuyQuantity;
105
		this.minBuyQuantity = minBuyQuantity;
89
	}
106
	}
-
 
107
	@Override
-
 
108
	public int hashCode() {
-
 
109
		final int prime = 31;
-
 
110
		int result = 1;
-
 
111
		result = prime * result + availability;
-
 
112
		result = prime * result + Arrays.hashCode(bulkPricing);
-
 
113
		long temp;
-
 
114
		temp = Double.doubleToLongBits(cash_back);
-
 
115
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
116
		result = prime * result + cash_back_type;
-
 
117
		result = prime * result + ((color == null) ? 0 : color.hashCode());
-
 
118
		result = prime * result + (int) (item_id ^ (item_id >>> 32));
-
 
119
		result = prime * result + maxQuantity;
-
 
120
		result = prime * result + minBuyQuantity;
-
 
121
		temp = Double.doubleToLongBits(mrp);
-
 
122
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
123
		temp = Double.doubleToLongBits(netPriceAfterCashBack);
-
 
124
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
125
		result = prime * result + quantityStep;
-
 
126
		temp = Double.doubleToLongBits(sellingPrice);
-
 
127
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
128
		result = prime * result + ((sellingPriceType == null) ? 0 : sellingPriceType.hashCode());
-
 
129
		return result;
-
 
130
	}
-
 
131
	@Override
-
 
132
	public boolean equals(Object obj) {
-
 
133
		if (this == obj)
-
 
134
			return true;
-
 
135
		if (obj == null)
-
 
136
			return false;
-
 
137
		if (getClass() != obj.getClass())
-
 
138
			return false;
-
 
139
		AvailabilityInfo other = (AvailabilityInfo) obj;
-
 
140
		if (availability != other.availability)
-
 
141
			return false;
-
 
142
		if (!Arrays.equals(bulkPricing, other.bulkPricing))
-
 
143
			return false;
-
 
144
		if (Double.doubleToLongBits(cash_back) != Double.doubleToLongBits(other.cash_back))
-
 
145
			return false;
-
 
146
		if (cash_back_type != other.cash_back_type)
-
 
147
			return false;
-
 
148
		if (color == null) {
-
 
149
			if (other.color != null)
-
 
150
				return false;
-
 
151
		} else if (!color.equals(other.color))
-
 
152
			return false;
-
 
153
		if (item_id != other.item_id)
-
 
154
			return false;
-
 
155
		if (maxQuantity != other.maxQuantity)
-
 
156
			return false;
-
 
157
		if (minBuyQuantity != other.minBuyQuantity)
-
 
158
			return false;
-
 
159
		if (Double.doubleToLongBits(mrp) != Double.doubleToLongBits(other.mrp))
-
 
160
			return false;
-
 
161
		if (Double.doubleToLongBits(netPriceAfterCashBack) != Double.doubleToLongBits(other.netPriceAfterCashBack))
-
 
162
			return false;
-
 
163
		if (quantityStep != other.quantityStep)
-
 
164
			return false;
-
 
165
		if (Double.doubleToLongBits(sellingPrice) != Double.doubleToLongBits(other.sellingPrice))
-
 
166
			return false;
-
 
167
		if (sellingPriceType == null) {
-
 
168
			if (other.sellingPriceType != null)
-
 
169
				return false;
-
 
170
		} else if (!sellingPriceType.equals(other.sellingPriceType))
-
 
171
			return false;
-
 
172
		return true;
-
 
173
	}
-
 
174
	
-
 
175
	
90
 
176
 
91
    
177
    
92
}
178
}
93
179