Class CitizenEditProfileOriginator

java.lang.Object
com.prog3.ipt.Model.CitizenClasses.CitizenEditProfileOriginator

public class CitizenEditProfileOriginator extends Object
CitizenEditProfileOriginator is a class, created to implement Originator object included into Memento Method design pattern.
  • Field Details

  • Constructor Details

    • CitizenEditProfileOriginator

      public CitizenEditProfileOriginator()
  • Method Details

    • setCurrentCitizen

      public void setCurrentCitizen(Citizen currentCitizen)
    • getCurrentCitizen

      public Citizen getCurrentCitizen()
    • save

      public void save()
      Add reference to a Citizen object into CitizenEditProfileMemento object to save last status about a Citizen
    • restore

      public boolean restore()
      Return boolean value true meaning last status about a Citizen is restored or false meaning last status about Citizen isn't restored because it wasn't saved
      Returns:
      boolean value true or false