Class User
- java.lang.Object
-
- edu.cnm.deepdive.picmegallery.model.entity.User
-
@Entity public class User extends Object
User is a @Entity class with the following fields id, created, updated, connected, displayName, and oauthKey. All of the fields in this class are attributes of User and help form the structure of the PicMe Gallery database.
-
-
Constructor Summary
Constructors Constructor Description User()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DategetConnected()Gets the last time a User connected to the PicME serviceDategetCreated()Gets the date a User is created in our application.StringgetDisplayName()Gets the User's display name which is different from the one associated with their Google accountList<Event>getEvents()This gets us a list of Events that the current user is part of/ included in.LonggetId()Gets the User Id.StringgetOauthKey()Gets the User's oauth key they used to sign in and access PicMe Gallery's servicesList<Photo>getPhotos()Returns a list of photos associated with (uploaded by) the current user.DategetUpdated()Gets the time/date a User profile is updated.voidsetConnected(Date connected)Sets or updates the time the User connected last to our servicevoidsetDisplayName(String displayName)Allows the User to set their display name on the PicMe app to something different from their Google accountvoidsetOauthKey(String oauthKey)Sets or allows us to update the User's OauthKey if they modify their Google Account
-
-
-
Method Detail
-
getId
public Long getId()
Gets the User Id.- Returns:
-
getCreated
@NonNull public Date getCreated()
Gets the date a User is created in our application.- Returns:
-
getUpdated
@NonNull public Date getUpdated()
Gets the time/date a User profile is updated.- Returns:
-
getConnected
@NonNull public Date getConnected()
Gets the last time a User connected to the PicME service- Returns:
-
setConnected
public void setConnected(@NonNull Date connected)Sets or updates the time the User connected last to our service- Parameters:
connected-
-
getDisplayName
@NonNull public String getDisplayName()
Gets the User's display name which is different from the one associated with their Google account- Returns:
-
setDisplayName
public void setDisplayName(@NonNull String displayName)Allows the User to set their display name on the PicMe app to something different from their Google account- Parameters:
displayName-
-
getOauthKey
@NonNull public String getOauthKey()
Gets the User's oauth key they used to sign in and access PicMe Gallery's services- Returns:
-
setOauthKey
public void setOauthKey(@NonNull String oauthKey)Sets or allows us to update the User's OauthKey if they modify their Google Account- Parameters:
oauthKey-
-
getPhotos
@NonNull public List<Photo> getPhotos()
Returns a list of photos associated with (uploaded by) the current user.- Returns:
-
-