Interface ProfilePictureRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<ProfilePicture,Long>,org.springframework.data.jpa.repository.JpaRepository<ProfilePicture,Long>,org.springframework.data.repository.PagingAndSortingRepository<ProfilePicture,Long>,org.springframework.data.repository.query.QueryByExampleExecutor<ProfilePicture>,org.springframework.data.repository.Repository<ProfilePicture,Long>
public interface ProfilePictureRepository extends org.springframework.data.jpa.repository.JpaRepository<ProfilePicture,Long>
The ProfilePictureRepository contains methods used to query the database for items in theProfilePicturetable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<ProfilePicture>findFirstByIdAndUser(long id, Profile user)Retrieves a user's profile picture.-
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
-
-
-
-
Method Detail
-
findFirstByIdAndUser
Optional<ProfilePicture> findFirstByIdAndUser(long id, Profile user)
Retrieves a user's profile picture.- Parameters:
id- The ID of theProfilePicture.user- The userProfile.- Returns:
- An
Optionalcontaining the matchingProfilePicture, if any.
-
-