Subversion Repositories SmartDukaan

Rev

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

Rev 23017 Rev 23338
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
-
 
3
import java.util.HashMap;
3
import java.util.HashSet;
4
import java.util.HashSet;
-
 
5
import java.util.Map;
4
import java.util.Set;
6
import java.util.Set;
5
 
7
 
6
public class SchemeModel {
8
public class SchemeModel {
7
	private int schemeId;
9
	private int schemeId;
8
	private String name;
10
	private String name;
Line 15... Line 17...
15
	private String createTimestamp;
17
	private String createTimestamp;
16
	private String activeTimestamp;
18
	private String activeTimestamp;
17
	private String expireTimestamp;
19
	private String expireTimestamp;
18
	private int createdBy;
20
	private int createdBy;
19
	private Set<Integer> retailerIds;
21
	private Set<Integer> retailerIds;
20
	private Set<Integer> itemIds;
22
	private Map<Integer, String> itemStringMap = new HashMap<>();
21
	public int getSchemeId() {
23
	public int getSchemeId() {
22
		return schemeId;
24
		return schemeId;
23
	}
25
	}
24
	public void setSchemeId(int schemeId) {
26
	public void setSchemeId(int schemeId) {
25
		this.schemeId = schemeId;
27
		this.schemeId = schemeId;
Line 103... Line 105...
103
				stringRetailerIds.add(String.valueOf(retailerId));
105
				stringRetailerIds.add(String.valueOf(retailerId));
104
			}
106
			}
105
		}
107
		}
106
		return String.join("\n", stringRetailerIds);
108
		return String.join("\n", stringRetailerIds);
107
	}
109
	}
-
 
110
	
108
	public Set<Integer> getItemIds() {
111
	public Map<Integer, String> getItemStringMap() {
109
		return itemIds;
112
		return itemStringMap;
110
	}
113
	}
-
 
114
	
111
	public void setItemIds(Set<Integer> itemIds) {
115
	public void setItemStringMap(Map<Integer, String> itemStringMap) {
112
		this.itemIds = itemIds;
116
		this.itemStringMap = itemStringMap;
113
	}
117
	}
114
	
118
	
115
	public String getItemIdsString(){
119
	/*public String getItemIdsString(){
116
		Set<String> stringItemIds = new HashSet<>();
120
		Set<String> stringItemIds = new HashSet<>();
117
		if(!itemIds.isEmpty()){
121
		if(!itemIds.isEmpty()){
118
			for(int itemId : itemIds){
122
			for(int itemId : itemIds){
119
				stringItemIds.add(String.valueOf(itemId));
123
				stringItemIds.add(String.valueOf(itemId));
120
			}
124
			}
121
		}
125
		}
122
		return String.join("\n", stringItemIds);
126
		return String.join("\n", stringItemIds);
123
	}
127
	}*/
124
	
128
	
125
	@Override
129
	@Override
126
	public String toString() {
130
	public String toString() {
127
		return "SchemeModel [schemeId=" + schemeId + ", name=" + name + ", description=" + description + ", schemeType="
131
		return "SchemeModel [schemeId=" + schemeId + ", name=" + name + ", description=" + description + ", schemeType="
128
				+ schemeType + ", amountType=" + amountType + ", amount=" + amount + ", startDateTime=" + startDateTime
132
				+ schemeType + ", amountType=" + amountType + ", amount=" + amount + ", startDateTime=" + startDateTime
129
				+ ", endDateTime=" + endDateTime + ", createTimestamp=" + createTimestamp + ", activeTimestamp="
133
				+ ", endDateTime=" + endDateTime + ", createTimestamp=" + createTimestamp + ", activeTimestamp="
130
				+ activeTimestamp + ", expireTimestamp=" + expireTimestamp + ", createdBy=" + createdBy
134
				+ activeTimestamp + ", expireTimestamp=" + expireTimestamp + ", createdBy=" + createdBy
131
				+ ", retailerIds=" + retailerIds + ", itemIds=" + itemIds + "]";
135
				+ ", retailerIds=" + retailerIds + ", itemStringMap=" + itemStringMap + "]";
132
	}
136
	}
133
	
137
	
134
}
138
}