Subversion Repositories SmartDukaan

Rev

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

Rev 23886 Rev 25503
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.dao.model;
2
 
2
 
3
import java.time.LocalDateTime;
3
import java.time.LocalDateTime;
4
import java.util.Set;
4
import java.util.Set;
5
 
5
 
-
 
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
 
6
public class CreateSchemeRequest {
10
public class CreateSchemeRequest {
7
	
11
 
8
	public LocalDateTime getStartDate() {
12
	public LocalDateTime getStartDate() {
9
		return startDate;
13
		return startDate;
10
	}
14
	}
-
 
15
 
11
	public void setStartDate(LocalDateTime startDate) {
16
	public void setStartDate(LocalDateTime startDate) {
12
		this.startDate = startDate;
17
		this.startDate = startDate;
13
	}
18
	}
-
 
19
 
14
	public LocalDateTime getEndDate() {
20
	public LocalDateTime getEndDate() {
15
		return endDate;
21
		return endDate;
16
	}
22
	}
-
 
23
 
17
	public void setEndDate(LocalDateTime endDate) {
24
	public void setEndDate(LocalDateTime endDate) {
18
		this.endDate = endDate;
25
		this.endDate = endDate;
19
	}
26
	}
20
 
27
 
21
	private String name;
28
	private String name;
22
	private String description;
29
	private String description;
23
	private String type;
30
	private SchemeType type;
24
	private String amountType;
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
 
25
	private float amount;
102
	private float amount;
26
	private LocalDateTime startDate;
103
	private LocalDateTime startDate;
27
	private LocalDateTime endDate;
104
	private LocalDateTime endDate;
28
	private boolean retailerAll;
-
 
29
	private Set<Integer> retailerIds;
-
 
30
	private Set<Integer> itemIds;
105
	private Set<Integer> itemIds;
31
	
-
 
32
	
106
 
33
	public String getName() {
107
	public String getName() {
34
		return name;
108
		return name;
35
	}
109
	}
-
 
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
 
36
	public void setName(String name) {
134
	public void setName(String name) {
37
		this.name = name;
135
		this.name = name;
38
	}
136
	}
-
 
137
 
39
	public String getDescription() {
138
	public String getDescription() {
40
		return description;
139
		return description;
41
	}
140
	}
-
 
141
 
42
	public void setDescription(String description) {
142
	public void setDescription(String description) {
43
		this.description = description;
143
		this.description = description;
44
	}
144
	}
45
	public String getType() {
-
 
46
		return type;
-
 
47
	}
-
 
48
	public void setType(String type) {
-
 
49
		this.type = type;
-
 
50
	}
145
 
51
	public String getAmountType() {
-
 
52
		return amountType;
-
 
53
	}
-
 
54
	public void setAmountType(String amountType) {
-
 
55
		this.amountType = amountType;
-
 
56
	}
-
 
57
	public float getAmount() {
146
	public float getAmount() {
58
		return amount;
147
		return amount;
59
	}
148
	}
-
 
149
 
60
	public void setAmount(float amount) {
150
	public void setAmount(float amount) {
61
		this.amount = amount;
151
		this.amount = amount;
62
	}
152
	}
63
	
153
 
64
	public boolean isRetailerAll() {
-
 
65
		return retailerAll;
-
 
66
	}
-
 
67
	public void setRetailerAll(boolean retailerAll) {
-
 
68
		this.retailerAll = retailerAll;
-
 
69
	}
-
 
70
	public Set<Integer> getRetailerIds() {
-
 
71
		return retailerIds;
-
 
72
	}
-
 
73
	public void setRetailerIds(Set<Integer> retailerIds) {
-
 
74
		this.retailerIds = retailerIds;
-
 
75
	}
-
 
76
	
-
 
77
	public Set<Integer> getItemIds() {
154
	public Set<Integer> getItemIds() {
78
		return itemIds;
155
		return itemIds;
79
	}
156
	}
80
	
157
 
81
	public void setItemIds(Set<Integer> itemIds) {
158
	public void setItemIds(Set<Integer> itemIds) {
82
		this.itemIds = itemIds;
159
		this.itemIds = itemIds;
83
	}
160
	}
84
	
-
 
85
	@Override
-
 
86
	public String toString() {
-
 
87
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
-
 
88
				+ amountType + ", amount=" + amount + ", startDate=" + startDate + ", endDate=" + endDate
-
 
89
				+ ", retailerAll=" + retailerAll + ", retailerIds=" + retailerIds + ", itemIds=" + itemIds + "]";
-
 
90
	}
-
 
91
}
161
}