Package com.espacogeek.geek.services
Interface MediaService
- All Known Implementing Classes:
MediaServiceImpl
public interface MediaService
Interface for the MediaService, which provides methods for managing MediaModel objects.
-
Method Summary
Modifier and TypeMethodDescriptionfindAnimeByIdOrName(Integer id, String name, org.springframework.data.domain.Pageable pageable) findByIdEager(Integer id) Find any media by ID (PK) provided with eager loading.findByReferenceAndTypeReference(ExternalReferenceModel reference, TypeReferenceModel typeReferenceModel) findGameByIdOrName(Integer id, String name, org.springframework.data.domain.Pageable pageable) findMovieByIdOrName(Integer id, String name, org.springframework.data.domain.Pageable pageable) findSerieByIdOrName(Integer id, String name, org.springframework.data.domain.Pageable pageable) findVisualNovelByIdOrName(Integer id, String name, org.springframework.data.domain.Pageable pageable) Returns a random artwork URL if available.save(MediaModel media) saveAll(List<MediaModel> medias)
-
Method Details
-
findSerieByIdOrName
-
findGameByIdOrName
-
save
-
saveAll
-
findByReferenceAndTypeReference
Optional<MediaModel> findByReferenceAndTypeReference(ExternalReferenceModel reference, TypeReferenceModel typeReferenceModel) -
findByIdEager
Find any media by ID (PK) provided with eager loading.- Parameters:
idMedia- the ID (PK) of the media.- Returns:
- return a Optional Media.
-
randomArtwork
Returns a random artwork URL if available.- Returns:
- An Optional containing a random artwork URL, or an empty Optional if no artwork is found.
-
findAnimeByIdOrName
-
findMovieByIdOrName
-
findVisualNovelByIdOrName
-