Subversion Repositories SmartDukaan

Rev

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

Rev 30123 Rev 30454
Line 3... Line 3...
3
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
3
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
4
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
4
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
5
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
5
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
6
 
6
 
7
import java.time.LocalDateTime;
7
import java.time.LocalDateTime;
-
 
8
import java.util.Objects;
8
import java.util.Set;
9
import java.util.Set;
9
 
10
 
10
public class CreateSchemeRequest {
11
public class CreateSchemeRequest {
11
 
12
 
12
	public LocalDateTime getStartDate() {
13
	public LocalDateTime getStartDate() {
Line 29... Line 30...
29
	private String description;
30
	private String description;
30
	private SchemeType type;
31
	private SchemeType type;
31
	private AmountType amountType;
32
	private AmountType amountType;
32
	private PartnerType partnerType;
33
	private PartnerType partnerType;
33
	private boolean cashback;
34
	private boolean cashback;
-
 
35
	private boolean basePluseGstCalc;
34
	private Set<Integer> catalogIds;
36
	private Set<Integer> catalogIds;
-
 
37
	private boolean gstReversal;
35
 
38
 
36
 
39
 
37
	public boolean isCashback() {
40
	public boolean isCashback() {
38
		return cashback;
41
		return cashback;
39
	}
42
	}
40
 
43
 
41
	public void setCashback(boolean cashback) {
44
	public void setCashback(boolean cashback) {
42
		this.cashback = cashback;
45
		this.cashback = cashback;
43
	}
46
	}
44
 
47
 
45
	@Override
-
 
46
	public int hashCode() {
-
 
47
		final int prime = 31;
-
 
48
		int result = 1;
-
 
49
		result = prime * result + Float.floatToIntBits(amount);
-
 
50
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
-
 
51
		result = prime * result + (cashback ? 1231 : 1237);
-
 
52
		result = prime * result + ((description == null) ? 0 : description.hashCode());
-
 
53
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
-
 
54
		result = prime * result + ((catalogIds == null) ? 0 : catalogIds.hashCode());
-
 
55
		result = prime * result + ((name == null) ? 0 : name.hashCode());
-
 
56
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
-
 
57
		result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
-
 
58
		result = prime * result + ((type == null) ? 0 : type.hashCode());
-
 
59
		return result;
-
 
60
	}
-
 
61
 
-
 
62
	public PartnerType getPartnerType() {
48
	public PartnerType getPartnerType() {
63
		return partnerType;
49
		return partnerType;
64
	}
50
	}
65
 
51
 
66
	public void setPartnerType(PartnerType partnerType) {
52
	public void setPartnerType(PartnerType partnerType) {
Line 69... Line 55...
69
 
55
 
70
	private float amount;
56
	private float amount;
71
	private LocalDateTime startDate;
57
	private LocalDateTime startDate;
72
	private LocalDateTime endDate;
58
	private LocalDateTime endDate;
73
 
59
 
74
	@Override
-
 
75
	public boolean equals(Object obj) {
-
 
76
		if (this == obj)
-
 
77
			return true;
-
 
78
		if (obj == null)
-
 
79
			return false;
-
 
80
		if (getClass() != obj.getClass())
-
 
81
			return false;
-
 
82
		CreateSchemeRequest other = (CreateSchemeRequest) obj;
-
 
83
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
-
 
84
			return false;
-
 
85
		if (amountType != other.amountType)
-
 
86
			return false;
-
 
87
		if (cashback != other.cashback)
-
 
88
			return false;
-
 
89
		if (description == null) {
-
 
90
			if (other.description != null)
-
 
91
				return false;
-
 
92
		} else if (!description.equals(other.description))
-
 
93
			return false;
-
 
94
		if (endDate == null) {
-
 
95
			if (other.endDate != null)
-
 
96
				return false;
-
 
97
		} else if (!endDate.equals(other.endDate))
-
 
98
			return false;
-
 
99
		if (catalogIds == null) {
-
 
100
			if (other.catalogIds != null)
-
 
101
				return false;
-
 
102
		} else if (!catalogIds.equals(other.catalogIds))
-
 
103
			return false;
-
 
104
		if (name == null) {
-
 
105
			if (other.name != null)
-
 
106
				return false;
-
 
107
		} else if (!name.equals(other.name))
-
 
108
			return false;
-
 
109
		if (partnerType != other.partnerType)
-
 
110
			return false;
-
 
111
		if (startDate == null) {
-
 
112
			if (other.startDate != null)
-
 
113
				return false;
-
 
114
		} else if (!startDate.equals(other.startDate))
-
 
115
			return false;
-
 
116
		if (type != other.type)
-
 
117
			return false;
-
 
118
		return true;
-
 
119
	}
-
 
120
 
-
 
121
	public String getName() {
60
	public String getName() {
122
		return name;
61
		return name;
123
	}
62
	}
124
 
63
 
125
	public SchemeType getType() {
64
	public SchemeType getType() {
Line 136... Line 75...
136
 
75
 
137
	public void setAmountType(AmountType amountType) {
76
	public void setAmountType(AmountType amountType) {
138
		this.amountType = amountType;
77
		this.amountType = amountType;
139
	}
78
	}
140
 
79
 
141
	@Override
-
 
142
	public String toString() {
-
 
143
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
-
 
144
				+ amountType + ", partnerType=" + partnerType + ", cashBack=" + cashback + ", amount=" + amount
-
 
145
				+ ", startDate=" + startDate + ", endDate=" + endDate + ", catalogIds=" + catalogIds + "]";
-
 
146
	}
-
 
147
 
-
 
148
	public void setName(String name) {
80
	public void setName(String name) {
149
		this.name = name;
81
		this.name = name;
150
	}
82
	}
151
 
83
 
152
	public String getDescription() {
84
	public String getDescription() {
Line 170... Line 102...
170
	}
102
	}
171
 
103
 
172
	public void setCatalogIds(Set<Integer> catalogIds) {
104
	public void setCatalogIds(Set<Integer> catalogIds) {
173
		this.catalogIds = catalogIds;
105
		this.catalogIds = catalogIds;
174
	}
106
	}
-
 
107
 
-
 
108
	public boolean isBasePluseGstCalc() {
-
 
109
		return basePluseGstCalc;
-
 
110
	}
-
 
111
 
-
 
112
	public void setBasePluseGstCalc(boolean basePluseGstCalc) {
-
 
113
		this.basePluseGstCalc = basePluseGstCalc;
-
 
114
	}
-
 
115
 
-
 
116
	@Override
-
 
117
	public String toString() {
-
 
118
		return "CreateSchemeRequest{" +
-
 
119
				"name='" + name + '\'' +
-
 
120
				", description='" + description + '\'' +
-
 
121
				", type=" + type +
-
 
122
				", amountType=" + amountType +
-
 
123
				", partnerType=" + partnerType +
-
 
124
				", cashback=" + cashback +
-
 
125
				", basePluseGstCalc=" + basePluseGstCalc +
-
 
126
				", catalogIds=" + catalogIds +
-
 
127
				", gstReversal=" + gstReversal +
-
 
128
				", amount=" + amount +
-
 
129
				", startDate=" + startDate +
-
 
130
				", endDate=" + endDate +
-
 
131
				'}';
-
 
132
	}
-
 
133
 
-
 
134
	@Override
-
 
135
	public boolean equals(Object o) {
-
 
136
		if (this == o) return true;
-
 
137
		if (o == null || getClass() != o.getClass()) return false;
-
 
138
		CreateSchemeRequest that = (CreateSchemeRequest) o;
-
 
139
		return cashback == that.cashback && basePluseGstCalc == that.basePluseGstCalc && gstReversal == that.gstReversal && Float.compare(that.amount, amount) == 0 && Objects.equals(name, that.name) && Objects.equals(description, that.description) && type == that.type && amountType == that.amountType && partnerType == that.partnerType && Objects.equals(catalogIds, that.catalogIds) && Objects.equals(startDate, that.startDate) && Objects.equals(endDate, that.endDate);
-
 
140
	}
-
 
141
 
-
 
142
	@Override
-
 
143
	public int hashCode() {
-
 
144
		return Objects.hash(name, description, type, amountType, partnerType, cashback, basePluseGstCalc, catalogIds, gstReversal, amount, startDate, endDate);
-
 
145
	}
175
}
146
}