Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
25503 amit.gupta 1
package com.spice.profitmandi.dao.model;
22858 ashik.ali 2
 
25503 amit.gupta 3
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
4
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
5
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
6
 
30123 amit.gupta 7
import java.time.LocalDateTime;
8
import java.util.Set;
9
 
22858 ashik.ali 10
public class CreateSchemeRequest {
25503 amit.gupta 11
 
23886 amit.gupta 12
	public LocalDateTime getStartDate() {
13
		return startDate;
14
	}
25503 amit.gupta 15
 
23886 amit.gupta 16
	public void setStartDate(LocalDateTime startDate) {
17
		this.startDate = startDate;
18
	}
25503 amit.gupta 19
 
23886 amit.gupta 20
	public LocalDateTime getEndDate() {
21
		return endDate;
22
	}
25503 amit.gupta 23
 
23886 amit.gupta 24
	public void setEndDate(LocalDateTime endDate) {
25
		this.endDate = endDate;
26
	}
27
 
22858 ashik.ali 28
	private String name;
29
	private String description;
25503 amit.gupta 30
	private SchemeType type;
31
	private AmountType amountType;
30123 amit.gupta 32
	private PartnerType partnerType;
28465 amit.gupta 33
	private boolean cashback;
30123 amit.gupta 34
	private Set<Integer> catalogIds;
35
 
36
 
37
	public boolean isCashback() {
38
		return cashback;
39
	}
40
 
41
	public void setCashback(boolean cashback) {
42
		this.cashback = cashback;
43
	}
44
 
25503 amit.gupta 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());
28465 amit.gupta 51
		result = prime * result + (cashback ? 1231 : 1237);
25503 amit.gupta 52
		result = prime * result + ((description == null) ? 0 : description.hashCode());
53
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
30123 amit.gupta 54
		result = prime * result + ((catalogIds == null) ? 0 : catalogIds.hashCode());
25503 amit.gupta 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
 
30123 amit.gupta 62
	public PartnerType getPartnerType() {
63
		return partnerType;
26679 amit.gupta 64
	}
65
 
30123 amit.gupta 66
	public void setPartnerType(PartnerType partnerType) {
67
		this.partnerType = partnerType;
26679 amit.gupta 68
	}
69
 
30123 amit.gupta 70
	private float amount;
71
	private LocalDateTime startDate;
72
	private LocalDateTime endDate;
73
 
25503 amit.gupta 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;
28465 amit.gupta 87
		if (cashback != other.cashback)
26679 amit.gupta 88
			return false;
25503 amit.gupta 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;
30123 amit.gupta 99
		if (catalogIds == null) {
100
			if (other.catalogIds != null)
25503 amit.gupta 101
				return false;
30123 amit.gupta 102
		} else if (!catalogIds.equals(other.catalogIds))
25503 amit.gupta 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
 
22858 ashik.ali 121
	public String getName() {
122
		return name;
123
	}
25503 amit.gupta 124
 
125
	public SchemeType getType() {
126
		return type;
127
	}
128
 
129
	public void setType(SchemeType type) {
130
		this.type = type;
131
	}
132
 
133
	public AmountType getAmountType() {
134
		return amountType;
135
	}
136
 
137
	public void setAmountType(AmountType amountType) {
138
		this.amountType = amountType;
139
	}
140
 
141
	@Override
142
	public String toString() {
143
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
28465 amit.gupta 144
				+ amountType + ", partnerType=" + partnerType + ", cashBack=" + cashback + ", amount=" + amount
30123 amit.gupta 145
				+ ", startDate=" + startDate + ", endDate=" + endDate + ", catalogIds=" + catalogIds + "]";
25503 amit.gupta 146
	}
147
 
22858 ashik.ali 148
	public void setName(String name) {
149
		this.name = name;
150
	}
25503 amit.gupta 151
 
22858 ashik.ali 152
	public String getDescription() {
153
		return description;
154
	}
25503 amit.gupta 155
 
22858 ashik.ali 156
	public void setDescription(String description) {
157
		this.description = description;
158
	}
25503 amit.gupta 159
 
22858 ashik.ali 160
	public float getAmount() {
161
		return amount;
162
	}
25503 amit.gupta 163
 
22858 ashik.ali 164
	public void setAmount(float amount) {
165
		this.amount = amount;
166
	}
25503 amit.gupta 167
 
30123 amit.gupta 168
	public Set<Integer> getCatalogIds() {
169
		return catalogIds;
22858 ashik.ali 170
	}
25503 amit.gupta 171
 
30123 amit.gupta 172
	public void setCatalogIds(Set<Integer> catalogIds) {
173
		this.catalogIds = catalogIds;
22858 ashik.ali 174
	}
175
}