Subversion Repositories SmartDukaan

Rev

Rev 23338 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23017 ashik.ali 1
package com.spice.profitmandi.common.model;
2
 
23338 ashik.ali 3
import java.util.HashMap;
23017 ashik.ali 4
import java.util.HashSet;
23338 ashik.ali 5
import java.util.Map;
23017 ashik.ali 6
import java.util.Set;
7
 
8
public class SchemeModel {
9
	private int schemeId;
10
	private String name;
11
	private String description;
12
	private String schemeType;
13
	private String amountType;
14
	private float amount;
15
	private String startDateTime;
16
	private String endDateTime;
17
	private String createTimestamp;
18
	private String activeTimestamp;
19
	private String expireTimestamp;
20
	private int createdBy;
21
	private Set<Integer> retailerIds;
30122 amit.gupta 22
	private Map<Integer, String> catalogStringMap = new HashMap<>();
23017 ashik.ali 23
	public int getSchemeId() {
24
		return schemeId;
25
	}
26
	public void setSchemeId(int schemeId) {
27
		this.schemeId = schemeId;
28
	}
29
	public String getName() {
30
		return name;
31
	}
32
	public void setName(String name) {
33
		this.name = name;
34
	}
35
	public String getDescription() {
36
		return description;
37
	}
38
	public void setDescription(String description) {
39
		this.description = description;
40
	}
41
	public String getSchemeType() {
42
		return schemeType;
43
	}
44
	public void setSchemeType(String schemeType) {
45
		this.schemeType = schemeType;
46
	}
47
	public String getAmountType() {
48
		return amountType;
49
	}
50
	public void setAmountType(String amountType) {
51
		this.amountType = amountType;
52
	}
53
	public float getAmount() {
54
		return amount;
55
	}
56
	public void setAmount(float amount) {
57
		this.amount = amount;
58
	}
59
	public String getStartDateTime() {
60
		return startDateTime;
61
	}
62
	public void setStartDateTime(String startDateTime) {
63
		this.startDateTime = startDateTime;
64
	}
65
	public String getEndDateTime() {
66
		return endDateTime;
67
	}
68
	public void setEndDateTime(String endDateTime) {
69
		this.endDateTime = endDateTime;
70
	}
71
	public String getCreateTimestamp() {
72
		return createTimestamp;
73
	}
74
	public void setCreateTimestamp(String createTimestamp) {
75
		this.createTimestamp = createTimestamp;
76
	}
77
	public String getActiveTimestamp() {
78
		return activeTimestamp;
79
	}
80
	public void setActiveTimestamp(String activeTimestamp) {
81
		this.activeTimestamp = activeTimestamp;
82
	}
83
	public String getExpireTimestamp() {
84
		return expireTimestamp;
85
	}
86
	public void setExpireTimestamp(String expireTimestamp) {
87
		this.expireTimestamp = expireTimestamp;
88
	}
89
	public int getCreatedBy() {
90
		return createdBy;
91
	}
92
	public void setCreatedBy(int createdBy) {
93
		this.createdBy = createdBy;
94
	}
95
	public Set<Integer> getRetailerIds() {
96
		return retailerIds;
97
	}
98
	public void setRetailerIds(Set<Integer> retailerIds) {
99
		this.retailerIds = retailerIds;
100
	}
30122 amit.gupta 101
 
102
	public String getRetailerIdsString() {
23017 ashik.ali 103
		Set<String> stringRetailerIds = new HashSet<>();
30122 amit.gupta 104
		if (!retailerIds.isEmpty()) {
105
			for (int retailerId : retailerIds) {
23017 ashik.ali 106
				stringRetailerIds.add(String.valueOf(retailerId));
107
			}
108
		}
109
		return String.join("\n", stringRetailerIds);
110
	}
30122 amit.gupta 111
 
112
	public Map<Integer, String> getCatalogStringMap() {
113
		return catalogStringMap;
23017 ashik.ali 114
	}
30122 amit.gupta 115
 
116
	public void setCatalogStringMap(Map<Integer, String> integerStringMap) {
117
		this.catalogStringMap = integerStringMap;
23017 ashik.ali 118
	}
119
 
23338 ashik.ali 120
	/*public String getItemIdsString(){
23017 ashik.ali 121
		Set<String> stringItemIds = new HashSet<>();
122
		if(!itemIds.isEmpty()){
123
			for(int itemId : itemIds){
124
				stringItemIds.add(String.valueOf(itemId));
125
			}
126
		}
127
		return String.join("\n", stringItemIds);
23338 ashik.ali 128
	}*/
23017 ashik.ali 129
 
130
	@Override
131
	public String toString() {
132
		return "SchemeModel [schemeId=" + schemeId + ", name=" + name + ", description=" + description + ", schemeType="
133
				+ schemeType + ", amountType=" + amountType + ", amount=" + amount + ", startDateTime=" + startDateTime
134
				+ ", endDateTime=" + endDateTime + ", createTimestamp=" + createTimestamp + ", activeTimestamp="
135
				+ activeTimestamp + ", expireTimestamp=" + expireTimestamp + ", createdBy=" + createdBy
30122 amit.gupta 136
				+ ", retailerIds=" + retailerIds + ", catalogStringMap=" + catalogStringMap + "]";
23017 ashik.ali 137
	}
138
 
139
}