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
Fetches entities and manages entity connection between front-end and back-end.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EntitiesController
protected javafx.beans.property.ListProperty<E>
-
Constructor Summary
ConstructorsConstructorDescriptionAEntityController
(@NotNull AForm<E> entityForm, @NotNull EntitiesController entitiesController) Instantiates newAEntityController
of certain entity. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears all fetched entities.void
deleteEntity
(int entityID) Deletes entity by its idprotected abstract void
if any additional data should be fetched this should be implemented.protected abstract String
Gets all fetched entities.protected abstract String
Base fetch address to get all entities.javafx.scene.layout.Pane
EntityClass
.getFetchedEntity
(int entityID) javafx.scene.layout.Pane
getShowFormPane
(E entity) void
postEntity
(@NotNull Object entity) Posts entity.void
putAdditionalDeleteEntity
(@NotNull Object entity, int index) Removes additional content of an entity.void
putAdditionalEntity
(@NotNull Object entity, int index) Puts for additional content query of entity.void
Puts entity by entity as object.
-
Field Details
-
fetchedEntities
-
entityForm
-
entitiesController
-
-
Constructor Details
-
AEntityController
public AEntityController(@NotNull @NotNull AForm<E> entityForm, @NotNull @NotNull EntitiesController entitiesController) Instantiates newAEntityController
of certain entity.
-
-
Method Details
-
getBaseAddress
Base fetch address to get all entities.- Returns:
- fetch address to get all entities.
-
getAdditionalAddress
-
getEntityClass
EntityClass
.- Returns:
- entity
Class
-
fetchAdditionalData
if any additional data should be fetched this should be implemented.- Throws:
FetchException
-
postEntity
Posts entity.- Parameters:
entity
- entity as object
-
deleteEntity
public void deleteEntity(int entityID) Deletes entity by its id- Parameters:
entityID
- id
-
putAdditionalEntity
Puts for additional content query of entity.- Parameters:
entity
- entity.index
- index
-
putEntity
Puts entity by entity as object.- Parameters:
entity
- entity as object
-
putAdditionalDeleteEntity
Removes additional content of an entity.- Parameters:
entity
- entityindex
- index
-
clearFetchedEntities
public void clearFetchedEntities()Clears all fetched entities. -
getAllFetchedEntities
Gets all fetched entities.- Returns:
- all fetched entities
- Throws:
FetchException
- if any exception happens
-
getFetchedEntity
- Throws:
FetchException
-
getCreateFormPane
public javafx.scene.layout.Pane getCreateFormPane() -
getShowFormPane
-