Class AEntityController<E extends ASimpleEntity>

java.lang.Object
cz.zcu.fav.kiv.mjakubas.saf.gui.controller.entity.AEntityController<E>
Type Parameters:
E - serviced entity
Direct Known Subclasses:
AbsenceEntityController, BuildingEntityController, ClassEntityController, EvaluationEntityController, RoomEntityController, ScheduleActionDateEntityController, ScheduleActionEntityController, SchoolDayEntityController, SchoolHourEntityController, StudentEntityController, StudentsSubjectEntityController, SubjectEntityController, SubjectListEntityController, TeacherEntityController

public abstract class AEntityController<E extends ASimpleEntity> extends Object
Fetches entities and manages entity connection between front-end and back-end.
  • Field Details

  • Constructor Details

  • Method Details

    • getBaseAddress

      protected abstract String getBaseAddress()
      Base fetch address to get all entities.
      Returns:
      fetch address to get all entities.
    • getAdditionalAddress

      protected abstract String getAdditionalAddress()
    • getEntityClass

      protected abstract Class<E> getEntityClass()
      Entity Class.
      Returns:
      entity Class
    • fetchAdditionalData

      protected abstract void fetchAdditionalData() throws FetchException
      if any additional data should be fetched this should be implemented.
      Throws:
      FetchException
    • postEntity

      public void postEntity(@NotNull @NotNull Object entity)
      Posts entity.
      Parameters:
      entity - entity as object
    • deleteEntity

      public void deleteEntity(int entityID)
      Deletes entity by its id
      Parameters:
      entityID - id
    • putAdditionalEntity

      public void putAdditionalEntity(@NotNull @NotNull Object entity, int index)
      Puts for additional content query of entity.
      Parameters:
      entity - entity.
      index - index
    • putEntity

      public void putEntity(@NotNull @NotNull Object entity)
      Puts entity by entity as object.
      Parameters:
      entity - entity as object
    • putAdditionalDeleteEntity

      public void putAdditionalDeleteEntity(@NotNull @NotNull Object entity, int index)
      Removes additional content of an entity.
      Parameters:
      entity - entity
      index - index
    • clearFetchedEntities

      public void clearFetchedEntities()
      Clears all fetched entities.
    • getAllFetchedEntities

      public List<E> getAllFetchedEntities() throws FetchException
      Gets all fetched entities.
      Returns:
      all fetched entities
      Throws:
      FetchException - if any exception happens
    • getFetchedEntity

      public E getFetchedEntity(int entityID) throws FetchException
      Throws:
      FetchException
    • getCreateFormPane

      public javafx.scene.layout.Pane getCreateFormPane()
    • getShowFormPane

      public javafx.scene.layout.Pane getShowFormPane(E entity)