Package core
Interface IStudentDataService
- All Known Implementing Classes:
StudentDataService
public interface IStudentDataService
Serwis danych studentów.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(StudentData studentData) Dodaje dane studenta.void
clear()
Kasuje załadowane dane studentów.void
Usuwa dane studenta o podanym numerze albumu.boolean
Sprawdza, czy istnieją dane studenta o podanym numerze albumu.Pobiera dane studenta na podstawie numeru albumu.getAll()
void
Ładuje dane studentów.void
save
(IStudentDataPersistentStorageService storageService) Zapisuje dane studentów.int
size()
void
update
(StudentData studentData) Aktualizuje dane studenta o danym numerze albumu.boolean
validate
(StudentData studentData) Waliduje dane studenta.
-
Method Details
-
getAll
- Returns:
- Zwraca kopię listy studentów.
- Throws:
Exception
- Wyjątek w przypadku błędu komunikacji z listą studentów.
-
update
Aktualizuje dane studenta o danym numerze albumu.- Parameters:
studentData
- Dane studenta.- Throws:
Exception
- Wyjątek w przypadku błędu połączenia z listą studentów.
-
delete
Usuwa dane studenta o podanym numerze albumu.- Parameters:
album
- Numer albumu.- Throws:
Exception
- Wyjątek w przypadku błędu połączenia z listą studentów.
-
add
Dodaje dane studenta.- Parameters:
studentData
- Dane studenta.- Throws:
ValidationException
- Wyjątek w przypadku nieprawidłowych danych studenta.
-
save
Zapisuje dane studentów.- Parameters:
storageService
- Moduł przechowujący dane studenta- Throws:
Exception
- Wyjątek w przypadku błędu zapisu w zewnętrznym serwisie.
-
load
Ładuje dane studentów.- Parameters:
reader
- Obiekt przechowywania danych, z którego są czytane dane studentów.- Throws:
Exception
- Wyjątek w przypadku błędu ładowania z zewnętrznego serwisu.
-
get
Pobiera dane studenta na podstawie numeru albumu.- Parameters:
album
- Numer albumu studenta.- Returns:
- Dane studenta.
- Throws:
Exception
- Wyjątek wyrzucany w przypadku braku numeru studenta lub błędu wyszukiwania danych.
-
size
- Returns:
- Liczba obiektów StudentData w bazie danych.
- Throws:
Exception
- Wyjątek w przypadku błędu połączenia z listą studentów.
-
clear
Kasuje załadowane dane studentów.- Throws:
Exception
- Wyjątek w przypadku błędu komunikacji z listą studentów.
-
exists
Sprawdza, czy istnieją dane studenta o podanym numerze albumu.- Parameters:
album
- Numer albumu.- Returns:
- Prawda, jeśli istnieją dane studenta o podanym numerze albumu, fałsz w przeciwnym wypadku.
- Throws:
Exception
- Wyjątek w przypadku błędu połączenia z listą studentów.
-
validate
Waliduje dane studenta.- Parameters:
studentData
- Dane studenta.- Returns:
- Prawda, jeśli dane studenta są poprawne, fałsz w przeciwnym wypadku.
-