Subversion Repositories SmartDukaan

Rev

Rev 25503 | Rev 28465 | 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
 
23886 amit.gupta 3
import java.time.LocalDateTime;
22858 ashik.ali 4
import java.util.Set;
5
 
25503 amit.gupta 6
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
7
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
8
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
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;
32
	private PartnerType  partnerType;
26679 amit.gupta 33
	private boolean cashBack;
25503 amit.gupta 34
	@Override
35
	public int hashCode() {
36
		final int prime = 31;
37
		int result = 1;
38
		result = prime * result + Float.floatToIntBits(amount);
39
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
26679 amit.gupta 40
		result = prime * result + (cashBack ? 1231 : 1237);
25503 amit.gupta 41
		result = prime * result + ((description == null) ? 0 : description.hashCode());
42
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
43
		result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
44
		result = prime * result + ((name == null) ? 0 : name.hashCode());
45
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
46
		result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
47
		result = prime * result + ((type == null) ? 0 : type.hashCode());
48
		return result;
49
	}
26679 amit.gupta 50
 
51
 
25503 amit.gupta 52
 
26679 amit.gupta 53
	public boolean isCashBack() {
54
		return cashBack;
55
	}
56
 
57
	public void setCashBack(boolean cashBack) {
58
		this.cashBack = cashBack;
59
	}
60
 
25503 amit.gupta 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
		CreateSchemeRequest other = (CreateSchemeRequest) obj;
70
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
71
			return false;
72
		if (amountType != other.amountType)
73
			return false;
26679 amit.gupta 74
		if (cashBack != other.cashBack)
75
			return false;
25503 amit.gupta 76
		if (description == null) {
77
			if (other.description != null)
78
				return false;
79
		} else if (!description.equals(other.description))
80
			return false;
81
		if (endDate == null) {
82
			if (other.endDate != null)
83
				return false;
84
		} else if (!endDate.equals(other.endDate))
85
			return false;
86
		if (itemIds == null) {
87
			if (other.itemIds != null)
88
				return false;
89
		} else if (!itemIds.equals(other.itemIds))
90
			return false;
91
		if (name == null) {
92
			if (other.name != null)
93
				return false;
94
		} else if (!name.equals(other.name))
95
			return false;
96
		if (partnerType != other.partnerType)
97
			return false;
98
		if (startDate == null) {
99
			if (other.startDate != null)
100
				return false;
101
		} else if (!startDate.equals(other.startDate))
102
			return false;
103
		if (type != other.type)
104
			return false;
105
		return true;
106
	}
107
 
108
	public PartnerType getPartnerType() {
109
		return partnerType;
110
	}
111
 
112
	public void setPartnerType(PartnerType partnerType) {
113
		this.partnerType = partnerType;
114
	}
115
 
22858 ashik.ali 116
	private float amount;
23886 amit.gupta 117
	private LocalDateTime startDate;
118
	private LocalDateTime endDate;
22858 ashik.ali 119
	private Set<Integer> itemIds;
25503 amit.gupta 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="
26679 amit.gupta 144
				+ amountType + ", partnerType=" + partnerType + ", cashBack=" + cashBack + ", amount=" + amount
145
				+ ", startDate=" + startDate + ", endDate=" + endDate + ", itemIds=" + itemIds + "]";
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
 
22858 ashik.ali 168
	public Set<Integer> getItemIds() {
169
		return itemIds;
170
	}
25503 amit.gupta 171
 
22858 ashik.ali 172
	public void setItemIds(Set<Integer> itemIds) {
173
		this.itemIds = itemIds;
174
	}
175
}