Class IndividualEquipment
java.lang.Object
de.gustavblass.fsu.fmi.roombooking.model.room.equipment.RoomEquipment
de.gustavblass.fsu.fmi.roombooking.model.room.equipment.IndividualEquipment
One piece of
RoomEquipment facilities useful only to one occupant each, not to the whole Room.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Range(from=1L,to=2147483647L) intThe total, absolute quantity of theRoomEquipment.typeof equipment in theRoom.private @Nullable EquipmentCountCategoryprivate @Nullable RoomTheRoomthat thisRoom.equipmentis part of. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull Optional<EquipmentCountCategory> getRoom()@NonNull IndividualEquipmentTypegetType()
-
Field Details
-
count
private @Range(from=1L,to=2147483647L) int countThe total, absolute quantity of theRoomEquipment.typeof equipment in theRoom.- Implementation Note:
- This column must be nullable since
CommonEquipmentuses the same database table but does not have a count attribute.
-
countCategory
- Implementation Note:
- This column must be nullable since
CommonEquipmentuses the same database table but does not have a countCategory attribute.
-
room
TheRoomthat thisRoom.equipmentis part of.
-
-
Constructor Details
-
IndividualEquipment
public IndividualEquipment()
-
-
Method Details
-
getType
- Returns:
- The
RoomEquipment.type. - Implementation Note:
- The typecast is okay because the
RoomEquipment.typewill always be aCommonEquipmentTypedue to the constraints. The field cannot be present in this class, because otherwise the field would be needed either inIndividualEquipmentTypeor inRoomEquipment; this would lead to a “duplicate column” error.
-
getCountCategory
- Returns:
- The
countCategory.
-
getRoom
-