Subversion Repositories SmartDukaan

Rev

Rev 23886 | Rev 26679 | 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;
33
	@Override
34
	public int hashCode() {
35
		final int prime = 31;
36
		int result = 1;
37
		result = prime * result + Float.floatToIntBits(amount);
38
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
39
		result = prime * result + ((description == null) ? 0 : description.hashCode());
40
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
41
		result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
42
		result = prime * result + ((name == null) ? 0 : name.hashCode());
43
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
44
		result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
45
		result = prime * result + ((type == null) ? 0 : type.hashCode());
46
		return result;
47
	}
48
 
49
	@Override
50
	public boolean equals(Object obj) {
51
		if (this == obj)
52
			return true;
53
		if (obj == null)
54
			return false;
55
		if (getClass() != obj.getClass())
56
			return false;
57
		CreateSchemeRequest other = (CreateSchemeRequest) obj;
58
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
59
			return false;
60
		if (amountType != other.amountType)
61
			return false;
62
		if (description == null) {
63
			if (other.description != null)
64
				return false;
65
		} else if (!description.equals(other.description))
66
			return false;
67
		if (endDate == null) {
68
			if (other.endDate != null)
69
				return false;
70
		} else if (!endDate.equals(other.endDate))
71
			return false;
72
		if (itemIds == null) {
73
			if (other.itemIds != null)
74
				return false;
75
		} else if (!itemIds.equals(other.itemIds))
76
			return false;
77
		if (name == null) {
78
			if (other.name != null)
79
				return false;
80
		} else if (!name.equals(other.name))
81
			return false;
82
		if (partnerType != other.partnerType)
83
			return false;
84
		if (startDate == null) {
85
			if (other.startDate != null)
86
				return false;
87
		} else if (!startDate.equals(other.startDate))
88
			return false;
89
		if (type != other.type)
90
			return false;
91
		return true;
92
	}
93
 
94
	public PartnerType getPartnerType() {
95
		return partnerType;
96
	}
97
 
98
	public void setPartnerType(PartnerType partnerType) {
99
		this.partnerType = partnerType;
100
	}
101
 
22858 ashik.ali 102
	private float amount;
23886 amit.gupta 103
	private LocalDateTime startDate;
104
	private LocalDateTime endDate;
22858 ashik.ali 105
	private Set<Integer> itemIds;
25503 amit.gupta 106
 
22858 ashik.ali 107
	public String getName() {
108
		return name;
109
	}
25503 amit.gupta 110
 
111
	public SchemeType getType() {
112
		return type;
113
	}
114
 
115
	public void setType(SchemeType type) {
116
		this.type = type;
117
	}
118
 
119
	public AmountType getAmountType() {
120
		return amountType;
121
	}
122
 
123
	public void setAmountType(AmountType amountType) {
124
		this.amountType = amountType;
125
	}
126
 
127
	@Override
128
	public String toString() {
129
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
130
				+ amountType + ", partnerType=" + partnerType + ", amount=" + amount + ", startDate=" + startDate
131
				+ ", endDate=" + endDate + ", itemIds=" + itemIds + "]";
132
	}
133
 
22858 ashik.ali 134
	public void setName(String name) {
135
		this.name = name;
136
	}
25503 amit.gupta 137
 
22858 ashik.ali 138
	public String getDescription() {
139
		return description;
140
	}
25503 amit.gupta 141
 
22858 ashik.ali 142
	public void setDescription(String description) {
143
		this.description = description;
144
	}
25503 amit.gupta 145
 
22858 ashik.ali 146
	public float getAmount() {
147
		return amount;
148
	}
25503 amit.gupta 149
 
22858 ashik.ali 150
	public void setAmount(float amount) {
151
		this.amount = amount;
152
	}
25503 amit.gupta 153
 
22858 ashik.ali 154
	public Set<Integer> getItemIds() {
155
		return itemIds;
156
	}
25503 amit.gupta 157
 
22858 ashik.ali 158
	public void setItemIds(Set<Integer> itemIds) {
159
		this.itemIds = itemIds;
160
	}
161
}