Interface ProfileRepository

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

    public interface ProfileRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Profile,​Long>
    The ProfileRepository interface gives an optional Profile by username and an optional Profile by OAuth.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Optional<Profile> findFirstByOauth​(String oauth)
      The findFirstByOauth query finds a Profile by OAuth.
      Optional<Profile> findFirstByUsername​(String name)
      The findFirstByUsername query finds a Profile by name.
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findOne
    • Method Detail

      • findFirstByUsername

        Optional<Profile> findFirstByUsername​(String name)
        The findFirstByUsername query finds a Profile by name.
        Parameters:
        name - The username of the profile.
        Returns:
        A Profile with the selected name.
      • findFirstByOauth

        Optional<Profile> findFirstByOauth​(String oauth)
        The findFirstByOauth query finds a Profile by OAuth.
        Parameters:
        oauth - The authorization key for a profile.
        Returns:
        A Profile with the selected OAuth key.