Class 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 Detail

      • User

        public User()
    • 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:
      • getEvents

        @NonNull
        public List<Event> getEvents()
        This gets us a list of Events that the current user is part of/ included in.
        Returns: