Back to project page Joetz-Android-V2.
The source code is released under:
GNU General Public License
If you think the Android project Joetz-Android-V2 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.jens.myapplication.activities; /*from w w w . ja v a 2s . c o m*/ import com.example.jens.myapplication.domain.Person; import com.example.jens.myapplication.domain.converter.UnixDateTimeConverter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import org.joda.time.DateTime; import java.util.List; /** * Created by Sam on 4/12/2014. */ @JsonIgnoreProperties(ignoreUnknown = true) public class JoetzActivity { @JsonProperty("Id") private long id; @JsonProperty("Title") private String title; @JsonProperty("Location") private String location; @JsonProperty("Summary") private String summary; @JsonProperty("Description") private String description; //Convert unix date (see getUnixStartDate/setUnixStartDate) @JsonIgnore private DateTime startDate; //Convert unix date (see getUnixEndDate/setUnixEndDate) @JsonIgnore private DateTime endDate; @JsonProperty("MaximumParticipants") private int maxParticipants; @JsonProperty("InvitedUsers") private List<Person> invitedUsers; @JsonProperty("AcceptedUsers") private List<Person> acceptedUsers; public JoetzActivity(){ } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public String getSummary() { return summary; } public void setSummary(String summary) { this.summary = summary; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public DateTime getStartDate() { return startDate; } public void setStartDate(DateTime startDate) { this.startDate = startDate; } public DateTime getEndDate() { return endDate; } public void setEndDate(DateTime endDate) { this.endDate = endDate; } @JsonProperty("StartDate") public long getUnixStartDate(){ return UnixDateTimeConverter.getUnix(startDate); } @JsonProperty("StartDate") public void setUnixStartDate(long unix){ startDate = UnixDateTimeConverter.getDate(unix); } @JsonProperty("EndDate") public long getUnixEndDate(){ return UnixDateTimeConverter.getUnix(endDate); } @JsonProperty("EndDate") public void setUnixEndDate(long unix){ endDate = UnixDateTimeConverter.getDate(unix); } public int getMaxParticipants() { return maxParticipants; } public void setMaxParticipants(int maxParticipants) { this.maxParticipants = maxParticipants; } public List<Person> getInvitedUsers() { return invitedUsers; } public void setInvitedUsers(List<Person> invitedUsers) { this.invitedUsers = invitedUsers; } public List<Person> getAcceptedUsers() { return acceptedUsers; } public void setAcceptedUsers(List<Person> acceptedUsers) { this.acceptedUsers = acceptedUsers; } }