Package main.repository.user
Class FacultyRepository
java.lang.Object
main.utils.iocontrol.Savable<ModelObject>
- All Implemented Interfaces:
Iterable<Supervisor>
The FacultyRepository class is a repository for storing and managing Supervisor objects in a file
through file I/O operations.
It extends the Repository class, which provides basic CRUD operations for the repository.
-
Nested Class Summary
Nested classes/interfaces inherited from class main.repository.Repository
Repository.RepositoryRule<ModelObject>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructor for creating a new instance of the FacultyRepository class. -
Method Summary
Modifier and TypeMethodDescriptionGets the path of the repository file.static FacultyRepository
Gets a new instance of the FacultyRepository class.void
Sets the list of mappable objects to a list of Supervisor objects.Methods inherited from class main.repository.Repository
add, clear, contains, findByRules, getAll, getByID, getList, isEmpty, iterator, load, remove, save, size, update, updateAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
FILE_PATH
The path of the repository file.- See Also:
-
-
Constructor Details
-
FacultyRepository
public FacultyRepository()Constructor for creating a new instance of the FacultyRepository class.
-
-
Method Details
-
getInstance
Gets a new instance of the FacultyRepository class.- Returns:
- a new instance of the FacultyRepository class
-
getFilePath
Gets the path of the repository file.- Specified by:
getFilePath
in classRepository<Supervisor>
- Returns:
- the path of the repository file
-
setAll
Sets the list of mappable objects to a list of Supervisor objects.- Specified by:
setAll
in classSavable<Supervisor>
- Parameters:
listOfMappableObjects
- the list of mappable objects
-