Interface UserRepository

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

    public interface UserRepository
    extends org.springframework.data.jpa.repository.JpaRepository<User,​java.lang.Long>

    UserRepository holds data for User. Aside from the CRUD methods provided by the extension of JpaRepository, findFirstByOauth and getAllOrderByUsername provide for certain queries of the database.

    Since:
    1.0
    Version:
    1.0
    Author:
    Robert Dominguez, Roderick Frechette, Laura Steiner
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<User> findFirstByOauth​(java.lang.String oauth)
      Gets a single user based on the oauth key.
      java.util.List<User> getAllByOrderByUsernameAsc()
      Gets all users in the system, ordered by username alphabetically.
      • 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

      • findFirstByOauth

        java.util.Optional<User> findFirstByOauth​(java.lang.String oauth)
        Gets a single user based on the oauth key.
        Parameters:
        oauth - String
        Returns:
        Optional<User>
      • getAllByOrderByUsernameAsc

        java.util.List<User> getAllByOrderByUsernameAsc()
        Gets all users in the system, ordered by username alphabetically.
        Returns:
        List<User>