-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStoreDataModel.java
More file actions
68 lines (54 loc) · 1.94 KB
/
StoreDataModel.java
File metadata and controls
68 lines (54 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package com.ikai.unit.dataModels;
public class StoreDataModel {
private static final String LOG_TAG = StoreDataModel.class.getSimpleName();
//This field will store name of the shop
private String storeName;
//This field will store URL of image resource in a String
private String storeThumbnailImage;
//This field will store if customer will favorite the store
private boolean favoriteShop = false;
/**
*
* @param storeName Name of the store
* @param storeThumbnailImage image url of store image thumbnail
* @param favoriteShop option to make a shop favourite
*/
public StoreDataModel(String storeName, String storeThumbnailImage,
boolean favoriteShop) {
this.storeName = storeName;
this.storeThumbnailImage = storeThumbnailImage;
this.favoriteShop = favoriteShop;
}
//overloading constructor for default values
public StoreDataModel(String storeName, String storeThumbnailImage) {
this.storeName = storeName;
this.storeThumbnailImage = storeThumbnailImage;
this.favoriteShop = false;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getStoreThumbnailImage() {
return storeThumbnailImage;
}
public void setStoreThumbnailImage(String storeThumbnailImage) {
this.storeThumbnailImage = storeThumbnailImage;
}
public boolean isFavoriteShop() {
return favoriteShop;
}
public void setFavoriteShop(boolean favoriteShop) {
this.favoriteShop = favoriteShop;
}
@Override
public String toString() {
return "StoreDataModel{" +
"storeName='" + storeName + '\'' +
", storeThumbnailImage='" + storeThumbnailImage + '\'' +
", favoriteShop=" + favoriteShop +
'}';
}
}