Class ListFavorisController
- All Implemented Interfaces:
javafx.fxml.Initializable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afficherliste
(List<Series> series) Displays a list of series with buttons for liking, disliking, and watching each series.void
initialize
(URL url, ResourceBundle resourceBundle) Initializes a series fav list by loading it from a database using a SQLException-catching mechanism if an error occurs.private void
Retrieves a list of series from a database based on the current session ID, and then loops through the list of favorite series to retrieve the corresponding series object from a separate service implementation, finally displaying the combined list of series in the UI.
-
Field Details
-
LOGGER
-
idSession
private final int idSession- See Also:
-
listViewFav
-
-
Constructor Details
-
ListFavorisController
public ListFavorisController()
-
-
Method Details
-
initialize
Initializes a series fav list by loading it from a database using a SQLException-catching mechanism if an error occurs.- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
- URL of the web page from which the user's favorite series should be loaded.- `URL`: represents a web address or a URL, which provides access to a specific resource or service on the internet.
resourceBundle
- localized data for the application, which is used to load the series favor list.- `URL`: represents the URL of the web page that contains the series favorites list data - `ResourceBundle`: is a collection of culturally-specific data, including messages, labels, and other information.
-
afficherliste
Displays a list of series with buttons for liking, disliking, and watching each series. When a button is clicked, the corresponding action is performed on the series data model.- Parameters:
series
- 2D array of series data that will be displayed in the list view, and it is used to populate the list view with the appropriate series items.- `id`: an integer representing the unique identifier of the series. - `nom`: a string representing the name of the series. - `genre`: a string representing the genre of the series (e.g., "drama", "comedy", etc.). - `description`: a string representing a brief description of the series. - `poster`: a URL or image path representing the poster image for the series. - `nbEpisodes`: an integer representing the number of episodes in the series.
-
loadSeriesFavList
Retrieves a list of series from a database based on the current session ID, and then loops through the list of favorite series to retrieve the corresponding series object from a separate service implementation, finally displaying the combined list of series in the UI.- Throws:
SQLException
-