Subversion Repositories SmartDukaan

Rev

Rev 23338 | Go to most recent revision | Details | Last modification | View Log | RSS feed

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