Class ProjectRepository

java.lang.Object
main.utils.iocontrol.Savable<ModelObject>
main.repository.Repository<Project>
main.repository.project.ProjectRepository
All Implemented Interfaces:
Iterable<Project>

public class ProjectRepository extends Repository<Project>
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.
  • Field Details

  • Constructor Details

    • ProjectRepository

      ProjectRepository()
      Constructs a new ProjectRepository object and loads the data from the project data file.
  • Method Details

    • getInstance

      public static ProjectRepository getInstance()
      Gets a new ProjectRepository object.
      Returns:
      a new ProjectRepository object
    • getFilePath

      public String getFilePath()
      Gets the file path of the project data file.
      Specified by:
      getFilePath in class Repository<Project>
      Returns:
      the file path of the project data file
    • setAll

      public void setAll(List<Map<String,String>> listOfMappableObjects)
      Sets the list of mappable objects by converting a list of maps to a list of Project objects.
      Specified by:
      setAll in class Savable<Project>
      Parameters:
      listOfMappableObjects - the list of mappable objects