Subversion Repositories SmartDukaan

Rev

Rev 27505 | Rev 27529 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
27505 tejbeer 1
package com.spice.profitmandi.dao.model;
2
 
27508 amit.gupta 3
import java.util.Objects;
4
 
27505 tejbeer 5
public class WarehouseWiseStockModel {
6
	private int warehouseId;
7
	private String warehouseName;
27508 amit.gupta 8
	private long stockQty;
9
	private long stockValue;
27505 tejbeer 10
 
27508 amit.gupta 11
	public WarehouseWiseStockModel(int warehouseId, long stockQty, long stockValue) {
27505 tejbeer 12
		super();
13
		this.warehouseId = warehouseId;
14
		this.stockQty = stockQty;
15
		this.stockValue = stockValue;
16
	}
17
 
18
	@Override
19
	public String toString() {
20
		return "WarehouseWiseStockModel [warehouseId=" + warehouseId + ", warehouseName=" + warehouseName
21
				+ ", stockQty=" + stockQty + ", stockValue=" + stockValue + "]";
22
	}
23
 
24
	public int getWarehouseId() {
25
		return warehouseId;
26
	}
27
 
28
	public void setWarehouseId(int warehouseId) {
29
		this.warehouseId = warehouseId;
30
	}
31
 
32
	public String getWarehouseName() {
33
		return warehouseName;
34
	}
35
 
36
	public void setWarehouseName(String warehouseName) {
37
		this.warehouseName = warehouseName;
38
	}
39
 
27508 amit.gupta 40
	public long getStockQty() {
27505 tejbeer 41
		return stockQty;
42
	}
43
 
27508 amit.gupta 44
	public void setStockQty(long stockQty) {
27505 tejbeer 45
		this.stockQty = stockQty;
46
	}
47
 
27508 amit.gupta 48
	public long getStockValue() {
27505 tejbeer 49
		return stockValue;
50
	}
51
 
27508 amit.gupta 52
	public void setStockValue(long stockValue) {
27505 tejbeer 53
		this.stockValue = stockValue;
54
	}
55
 
56
	@Override
57
	public int hashCode() {
27508 amit.gupta 58
		return Objects.hash(warehouseId, warehouseName, stockQty, stockValue);
27505 tejbeer 59
	}
60
 
61
	@Override
62
	public boolean equals(Object obj) {
63
		if (this == obj)
64
			return true;
65
		if (obj == null)
66
			return false;
67
		if (getClass() != obj.getClass())
68
			return false;
69
		WarehouseWiseStockModel other = (WarehouseWiseStockModel) obj;
70
		if (stockQty != other.stockQty)
71
			return false;
72
		if (Double.doubleToLongBits(stockValue) != Double.doubleToLongBits(other.stockValue))
73
			return false;
74
		if (warehouseId != other.warehouseId)
75
			return false;
76
		if (warehouseName == null) {
77
			if (other.warehouseName != null)
78
				return false;
79
		} else if (!warehouseName.equals(other.warehouseName))
80
			return false;
81
		return true;
82
	}
83
 
84
 
85
 
86
 
87
}