Subversion Repositories SmartDukaan

Rev

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

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