Subversion Repositories SmartDukaan

Rev

Rev 25778 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25778 Rev 34798
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
3
import java.time.LocalDateTime;
3
import java.time.LocalDateTime;
-
 
4
import java.util.Objects;
4
 
5
 
5
public class SerialNumberDetail {
6
public class SerialNumberDetail {
6
	private String serialNumber;
7
	private String serialNumber;
7
	private String insurance;
8
	private String insurance;
8
	private float amount;
9
	private float amount;
9
	private String ram;
10
	private String ram;
10
	private String memory;
11
	private String memory;
-
 
12
	private String correlationId;
11
	private LocalDateTime mfgDate;
13
	private LocalDateTime mfgDate;
12
	
14
	
13
	public String getRam() {
15
	public String getRam() {
14
		return ram;
16
		return ram;
15
	}
17
	}
Line 39... Line 41...
39
		return amount;
41
		return amount;
40
	}
42
	}
41
	public void setAmount(float amount) {
43
	public void setAmount(float amount) {
42
		this.amount = amount;
44
		this.amount = amount;
43
	}
45
	}
44
	
46
 
45
	@Override
47
	@Override
46
	public int hashCode() {
48
	public boolean equals(Object o) {
47
		final int prime = 31;
-
 
48
		int result = 1;
49
		if (this == o) return true;
49
		result = prime * result + Float.floatToIntBits(amount);
-
 
50
		result = prime * result + ((insurance == null) ? 0 : insurance.hashCode());
-
 
51
		result = prime * result + ((memory == null) ? 0 : memory.hashCode());
-
 
52
		result = prime * result + ((mfgDate == null) ? 0 : mfgDate.hashCode());
-
 
53
		result = prime * result + ((ram == null) ? 0 : ram.hashCode());
50
		if (o == null || getClass() != o.getClass()) return false;
54
		result = prime * result + ((serialNumber == null) ? 0 : serialNumber.hashCode());
51
		SerialNumberDetail that = (SerialNumberDetail) o;
55
		return result;
52
		return Float.compare(amount, that.amount) == 0 && Objects.equals(serialNumber, that.serialNumber) && Objects.equals(insurance, that.insurance) && Objects.equals(ram, that.ram) && Objects.equals(memory, that.memory) && Objects.equals(correlationId, that.correlationId) && Objects.equals(mfgDate, that.mfgDate);
56
	}
53
	}
-
 
54
 
57
	@Override
55
	@Override
58
	public boolean equals(Object obj) {
56
	public int hashCode() {
59
		if (this == obj)
-
 
60
			return true;
-
 
61
		if (obj == null)
-
 
62
			return false;
-
 
63
		if (getClass() != obj.getClass())
-
 
64
			return false;
-
 
65
		SerialNumberDetail other = (SerialNumberDetail) obj;
-
 
66
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
57
		return Objects.hash(serialNumber, insurance, amount, ram, memory, correlationId, mfgDate);
67
			return false;
-
 
68
		if (insurance == null) {
-
 
69
			if (other.insurance != null)
-
 
70
				return false;
-
 
71
		} else if (!insurance.equals(other.insurance))
-
 
72
			return false;
-
 
73
		if (memory == null) {
-
 
74
			if (other.memory != null)
-
 
75
				return false;
-
 
76
		} else if (!memory.equals(other.memory))
-
 
77
			return false;
-
 
78
		if (mfgDate == null) {
-
 
79
			if (other.mfgDate != null)
-
 
80
				return false;
-
 
81
		} else if (!mfgDate.equals(other.mfgDate))
-
 
82
			return false;
58
	}
83
		if (ram == null) {
-
 
84
			if (other.ram != null)
-
 
85
				return false;
-
 
86
		} else if (!ram.equals(other.ram))
-
 
87
			return false;
59
 
88
		if (serialNumber == null) {
60
	public String getCorrelationId() {
89
			if (other.serialNumber != null)
-
 
90
				return false;
-
 
91
		} else if (!serialNumber.equals(other.serialNumber))
-
 
92
			return false;
-
 
93
		return true;
61
		return correlationId;
94
	}
62
	}
-
 
63
 
-
 
64
	public void setCorrelationId(String correlationId) {
-
 
65
		this.correlationId = correlationId;
-
 
66
	}
-
 
67
 
95
	public String getInsurance() {
68
	public String getInsurance() {
96
		return insurance;
69
		return insurance;
97
	}
70
	}
98
	public void setInsurance(String insurance) {
71
	public void setInsurance(String insurance) {
99
		this.insurance = insurance;
72
		this.insurance = insurance;
100
	}
73
	}
-
 
74
 
101
	@Override
75
	@Override
102
	public String toString() {
76
	public String toString() {
-
 
77
		return "SerialNumberDetail{" +
103
		return "SerialNumberDetail [serialNumber=" + serialNumber + ", insurance=" + insurance + ", amount=" + amount
78
				"serialNumber='" + serialNumber + '\'' +
-
 
79
				", insurance='" + insurance + '\'' +
-
 
80
				", amount=" + amount +
-
 
81
				", ram='" + ram + '\'' +
104
				+ ", ram=" + ram + ", memory=" + memory + ", mfgDate=" + mfgDate + "]";
82
				", memory='" + memory + '\'' +
-
 
83
				", correlationId='" + correlationId + '\'' +
-
 
84
				", mfgDate=" + mfgDate +
-
 
85
				'}';
105
	}
86
	}
106
	
-
 
107
	
-
 
108
}
87
}