Subversion Repositories SmartDukaan

Rev

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

Rev 28465 Rev 30123
Line 1... Line 1...
1
package com.spice.profitmandi.dao.model;
1
package com.spice.profitmandi.dao.model;
2
 
2
 
3
import java.time.LocalDateTime;
-
 
4
import java.util.Set;
-
 
5
 
-
 
6
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
3
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
7
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
4
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
8
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
5
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
9
 
6
 
-
 
7
import java.time.LocalDateTime;
-
 
8
import java.util.Set;
-
 
9
 
10
public class CreateSchemeRequest {
10
public class CreateSchemeRequest {
11
 
11
 
12
	public LocalDateTime getStartDate() {
12
	public LocalDateTime getStartDate() {
13
		return startDate;
13
		return startDate;
14
	}
14
	}
Line 27... Line 27...
27
 
27
 
28
	private String name;
28
	private String name;
29
	private String description;
29
	private String description;
30
	private SchemeType type;
30
	private SchemeType type;
31
	private AmountType amountType;
31
	private AmountType amountType;
32
	private PartnerType  partnerType;
32
	private PartnerType partnerType;
33
	private boolean cashback;
33
	private boolean cashback;
-
 
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
 
34
	@Override
45
	@Override
35
	public int hashCode() {
46
	public int hashCode() {
36
		final int prime = 31;
47
		final int prime = 31;
37
		int result = 1;
48
		int result = 1;
38
		result = prime * result + Float.floatToIntBits(amount);
49
		result = prime * result + Float.floatToIntBits(amount);
39
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
50
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
40
		result = prime * result + (cashback ? 1231 : 1237);
51
		result = prime * result + (cashback ? 1231 : 1237);
41
		result = prime * result + ((description == null) ? 0 : description.hashCode());
52
		result = prime * result + ((description == null) ? 0 : description.hashCode());
42
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
53
		result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
43
		result = prime * result + ((itemIds == null) ? 0 : itemIds.hashCode());
54
		result = prime * result + ((catalogIds == null) ? 0 : catalogIds.hashCode());
44
		result = prime * result + ((name == null) ? 0 : name.hashCode());
55
		result = prime * result + ((name == null) ? 0 : name.hashCode());
45
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
56
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
46
		result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
57
		result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
47
		result = prime * result + ((type == null) ? 0 : type.hashCode());
58
		result = prime * result + ((type == null) ? 0 : type.hashCode());
48
		return result;
59
		return result;
49
	}
60
	}
50
	
-
 
51
	
-
 
52
 
61
 
53
	public boolean isCashback() {
62
	public PartnerType getPartnerType() {
54
		return cashback;
63
		return partnerType;
55
	}
64
	}
56
 
65
 
57
	public void setCashback(boolean cashback) {
66
	public void setPartnerType(PartnerType partnerType) {
58
		this.cashback = cashback;
67
		this.partnerType = partnerType;
59
	}
68
	}
60
 
69
 
-
 
70
	private float amount;
-
 
71
	private LocalDateTime startDate;
-
 
72
	private LocalDateTime endDate;
-
 
73
 
61
	@Override
74
	@Override
62
	public boolean equals(Object obj) {
75
	public boolean equals(Object obj) {
63
		if (this == obj)
76
		if (this == obj)
64
			return true;
77
			return true;
65
		if (obj == null)
78
		if (obj == null)
Line 81... Line 94...
81
		if (endDate == null) {
94
		if (endDate == null) {
82
			if (other.endDate != null)
95
			if (other.endDate != null)
83
				return false;
96
				return false;
84
		} else if (!endDate.equals(other.endDate))
97
		} else if (!endDate.equals(other.endDate))
85
			return false;
98
			return false;
86
		if (itemIds == null) {
99
		if (catalogIds == null) {
87
			if (other.itemIds != null)
100
			if (other.catalogIds != null)
88
				return false;
101
				return false;
89
		} else if (!itemIds.equals(other.itemIds))
102
		} else if (!catalogIds.equals(other.catalogIds))
90
			return false;
103
			return false;
91
		if (name == null) {
104
		if (name == null) {
92
			if (other.name != null)
105
			if (other.name != null)
93
				return false;
106
				return false;
94
		} else if (!name.equals(other.name))
107
		} else if (!name.equals(other.name))
Line 103... Line 116...
103
		if (type != other.type)
116
		if (type != other.type)
104
			return false;
117
			return false;
105
		return true;
118
		return true;
106
	}
119
	}
107
 
120
 
108
	public PartnerType getPartnerType() {
-
 
109
		return partnerType;
-
 
110
	}
-
 
111
 
-
 
112
	public void setPartnerType(PartnerType partnerType) {
-
 
113
		this.partnerType = partnerType;
-
 
114
	}
-
 
115
 
-
 
116
	private float amount;
-
 
117
	private LocalDateTime startDate;
-
 
118
	private LocalDateTime endDate;
-
 
119
	private Set<Integer> itemIds;
-
 
120
 
-
 
121
	public String getName() {
121
	public String getName() {
122
		return name;
122
		return name;
123
	}
123
	}
124
 
124
 
125
	public SchemeType getType() {
125
	public SchemeType getType() {
Line 140... Line 140...
140
 
140
 
141
	@Override
141
	@Override
142
	public String toString() {
142
	public String toString() {
143
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
143
		return "CreateSchemeRequest [name=" + name + ", description=" + description + ", type=" + type + ", amountType="
144
				+ amountType + ", partnerType=" + partnerType + ", cashBack=" + cashback + ", amount=" + amount
144
				+ amountType + ", partnerType=" + partnerType + ", cashBack=" + cashback + ", amount=" + amount
145
				+ ", startDate=" + startDate + ", endDate=" + endDate + ", itemIds=" + itemIds + "]";
145
				+ ", startDate=" + startDate + ", endDate=" + endDate + ", catalogIds=" + catalogIds + "]";
146
	}
146
	}
147
 
147
 
148
	public void setName(String name) {
148
	public void setName(String name) {
149
		this.name = name;
149
		this.name = name;
150
	}
150
	}
Line 163... Line 163...
163
 
163
 
164
	public void setAmount(float amount) {
164
	public void setAmount(float amount) {
165
		this.amount = amount;
165
		this.amount = amount;
166
	}
166
	}
167
 
167
 
168
	public Set<Integer> getItemIds() {
168
	public Set<Integer> getCatalogIds() {
169
		return itemIds;
169
		return catalogIds;
170
	}
170
	}
171
 
171
 
172
	public void setItemIds(Set<Integer> itemIds) {
172
	public void setCatalogIds(Set<Integer> catalogIds) {
173
		this.itemIds = itemIds;
173
		this.catalogIds = catalogIds;
174
	}
174
	}
175
}
175
}