package fr.rolandl.mymovies.service

import fr.rolandl.mymovies.bo.Film
import fr.rolandl.mymovies.bo.Person

interface IMovieService
{

  suspend fun loadDatabase()

  suspend fun saveDatabase(): Boolean

  suspend fun addFilm(film: Film)

  suspend fun addPerson(person: Person)

  suspend fun getFilmById(id: Int): Film?

  suspend fun getPersonById(id: Int): Person?

  suspend fun getFilmByName(name: String): Film?

  suspend fun getFilmByActorId(id: Int): List<Film>

  suspend fun getFilmByDirectorId(id: Int): List<Film>

  suspend fun getFilmByGenre(genre: Film.Genre): List<Film>

  suspend fun getAllPersons(): List<Person>

  suspend fun getAllGenres(): List<Film.Genre>

}