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.domain; //from w ww . j a v a 2 s . c o m import com.example.jens.myapplication.sam.JoetzApplication; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** * Created by Sam on 26/10/2014. */ @JsonIgnoreProperties(ignoreUnknown = true) public class User { @JsonProperty("Id") private long id; @JsonProperty("Information") private Person person; @JsonProperty("Role") private UserRole userRole = UserRole.USER; @JsonProperty("Password") private String password; @JsonProperty("SubscribedToNewsletter") private boolean subscribedToNewsletter; @JsonProperty("BookmarkedCamps") private List<Long> bookmarkedCamps; @JsonProperty("Persons") private List<Person> persons; @JsonProperty("Bookings") private List<Booking> bookings; @JsonProperty("InvitedActivities") private List<Long> invitedActivities; @JsonProperty("AcceptedActivities") private List<Long> acceptedActivities; @JsonProperty("DeclinedActivities") private List<Long> declinedActivities; public User(){ } public boolean hasBookmarkedCamp(long id){ return bookmarkedCamps.contains(id); } public void toggleBookmarkedCamp(long id){ if(bookmarkedCamps.contains(id)){ bookmarkedCamps.remove(id); }else{ bookmarkedCamps.add(id); } } public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } public UserRole getUserRole() { return userRole; } private void setUserRole(UserRole userRole) { this.userRole = userRole; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public boolean isSubscribedToNewsletter() { return subscribedToNewsletter; } public void setSubscribedToNewsletter(boolean subscribedToNewsletter) { this.subscribedToNewsletter = subscribedToNewsletter; } public List<Long> getBookmarkedCamps() { return bookmarkedCamps; } private void setBookmarkedCamps(List<Long> bookmarkedCamps) { this.bookmarkedCamps = bookmarkedCamps; } public List<Person> getPersons() { return persons; } public void setPersons(List<Person> persons) { this.persons = persons; } public List<Booking> getBookings() { return bookings; } public void setBookings(List<Booking> bookings) { this.bookings = bookings; } public List<Long> getInvitedActivities() { return invitedActivities; } public void setInvitedActivities(List<Long> invitedActivities) { this.invitedActivities = invitedActivities; } public List<Long> getAcceptedActivities() { return acceptedActivities; } public void setAcceptedActivities(List<Long> acceptedActivities) { this.acceptedActivities = acceptedActivities; } public List<Long> getDeclinedActivities() { return declinedActivities; } public void setDeclinedActivities(List<Long> declinedActivities) { this.declinedActivities = declinedActivities; } public long getId() { return id; } private void setId(long id) { this.id = id; } }