diff --git a/.idea/misc.xml b/.idea/misc.xml index 5d19981..fbb6828 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/UserInfo.java b/app/src/main/java/org/communiquons/android/comunic/client/data/UserInfo.java new file mode 100644 index 0000000..696586a --- /dev/null +++ b/app/src/main/java/org/communiquons/android/comunic/client/data/UserInfo.java @@ -0,0 +1,100 @@ +package org.communiquons.android.comunic.client.data; + +/** + * This class contains the informations about a single user + * + * @author Pierre HUBERT + * Created by pierre on 11/2/17. + */ + +public class UserInfo { + + /** + * Informations about the user + */ + private int id; + private String firstName; + private String lastName; + private String imageURL; + + /** + * Set the ID of the user + * + * @param id The ID to set + */ + public void setId(int id) { + this.id = id; + } + + /** + * Get the ID of the user + * + * @return The ID of the user + */ + public int getId() { + return id; + } + + /*** + * Set the first name of the user + * + * @param firstName The new first name of the user + */ + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * Get the first name of the user + * + * @return The first name of the user + */ + public String getFirstName() { + return firstName; + } + + /** + * Set the last name of the user + * + * @param lastName The last name of the user + */ + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * Get the last name of the user + * + * @return The last name of the user + */ + public String getLastName() { + return lastName; + } + + /** + * Get the full name of the user + * + * @return The full name of the user + */ + public String getFullName(){ + return firstName + " " + lastName; + } + + /** + * Set the image URL of the account of the user + * + * @param imageURL The URL of the image + */ + public void setImageURL(String imageURL) { + this.imageURL = imageURL; + } + + /** + * Get the image URL of the account of the user + * + * @return The image URL of the account of the user + */ + public String getImageURL() { + return imageURL; + } +}