Interface UserRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<User,​Long>, org.springframework.data.jpa.repository.JpaRepository<User,​Long>, org.springframework.data.repository.PagingAndSortingRepository<User,​Long>, org.springframework.data.repository.query.QueryByExampleExecutor<User>, org.springframework.data.repository.Repository<User,​Long>

    public interface UserRepository
    extends org.springframework.data.jpa.repository.JpaRepository<User,​Long>
    User repository is an interface class that extends JpaRepository and User entity This interface handles searching for users by different parameters including Google Oauth Key 2.0, events, photos, and display names.
    • Method Detail

      • findFirstByOauthKey

        Optional<User> findFirstByOauthKey​(String oauthKey)
        Parameters:
        oauthKey - is a String input parameter from the user's google account.
        Returns:
        Optionally returns a user found by their Oauth 2.0 key from Google.
      • findUsersByEvents

        Optional<User> findUsersByEvents​(Event event)
        Parameters:
        event - is an input parameter of a user's event.
        Returns:
        Optionally returns a user by events.
      • findUserByPhotosContaining

        Optional<User> findUserByPhotosContaining​(Photo photo)
        Parameters:
        photo - is an input parameter of a user's photo.
        Returns:
        Optionally returns a user by a photo containing the user.
      • findUserByDisplayName

        Optional<User> findUserByDisplayName​(String displayName)
        Parameters:
        displayName - is a String input parameter of a user's display name
        Returns:
        Optionally returns a user by their display name.