forked from Okamoba/OkaEvent_android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Okamoba#7 from TomokoKondo/model
Create Event Model
- Loading branch information
Showing
2 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
app/src/main/java/com/okamoba/okaevent_android/EventModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
package com.okamoba.okaevent_android; | ||
|
||
import android.support.annotation.NonNull; | ||
|
||
import java.util.Date; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* Created by keiichilo on 2018/02/18. | ||
*/ | ||
|
||
public class EventModel { | ||
@NonNull private String name = ""; | ||
@NonNull private String text = ""; | ||
@NonNull private String address = ""; | ||
@NonNull private Date start_datetime = new Date(); | ||
@NonNull private Date end_datetime = new Date(); | ||
@NonNull private String url = ""; | ||
@NonNull private String author = ""; | ||
@NonNull private String document_id = ""; | ||
|
||
@NonNull | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(@NonNull String name) { | ||
this.name = name; | ||
} | ||
|
||
@NonNull | ||
public String getText() { | ||
return text; | ||
} | ||
|
||
public void setText(@NonNull String text) { | ||
this.text = text; | ||
} | ||
|
||
@NonNull | ||
public String getAddress() { | ||
return address; | ||
} | ||
|
||
public void setAddress(@NonNull String address) { | ||
this.address = address; | ||
} | ||
|
||
@NonNull | ||
public Date getStart_datetime() { | ||
return start_datetime; | ||
} | ||
|
||
public void setStart_datetime(@NonNull Date start_datetime) { | ||
this.start_datetime = start_datetime; | ||
} | ||
|
||
@NonNull | ||
public Date getEnd_datetime() { | ||
return end_datetime; | ||
} | ||
|
||
public void setEnd_datetime(@NonNull Date end_datetime) { | ||
this.end_datetime = end_datetime; | ||
} | ||
|
||
@NonNull | ||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public void setUrl(@NonNull String url) { | ||
this.url = url; | ||
} | ||
|
||
@NonNull | ||
public String getAuthor() { | ||
return author; | ||
} | ||
|
||
public void setAuthor(@NonNull String uid) { | ||
this.author = uid; | ||
} | ||
|
||
@NonNull | ||
public String getDocument_id() { | ||
return document_id; | ||
} | ||
|
||
public void setDocument_id(@NonNull String document_id) { | ||
this.document_id = document_id; | ||
} | ||
|
||
public Map<String, Object> getEvent() { | ||
Map<String, Object> event_map = new HashMap<>(); | ||
|
||
event_map.put("name", name); | ||
event_map.put("text", text); | ||
event_map.put("address", address); | ||
event_map.put("start_datetime", start_datetime); | ||
event_map.put("end_datetime", end_datetime); | ||
event_map.put("url", url); | ||
event_map.put("author", author); | ||
|
||
return event_map; | ||
} | ||
} |