Package main.repository.project
Class ProjectRepository
java.lang.Object
main.utils.iocontrol.Savable<ModelObject>
The ProjectRepository class is a repository that manages the persistence and retrieval of Project objects
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
ConstructorDescriptionConstructs a new ProjectRepository object and loads the data from the project data file. -
Method Summary
Modifier and TypeMethodDescriptionGets the file path of the project data file.static ProjectRepository
Gets a new ProjectRepository object.void
Sets the list of mappable objects by converting a list of maps to a list of Project 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 file path of the project data file.- See Also:
-
-
Constructor Details
-
ProjectRepository
ProjectRepository()Constructs a new ProjectRepository object and loads the data from the project data file.
-
-
Method Details
-
getInstance
Gets a new ProjectRepository object.- Returns:
- a new ProjectRepository object
-
getFilePath
Gets the file path of the project data file.- Specified by:
getFilePath
in classRepository<Project>
- Returns:
- the file path of the project data file
-
setAll
Sets the list of mappable objects by converting a list of maps to a list of Project objects.
-