Class NewRoomDTO

java.lang.Object
de.gustavblass.fsu.fmi.roombooking.dto.NewRoomDTO

public class NewRoomDTO extends Object
A data-transfer object that represents a Room to be newly added to the database.
Implementation Note:

This DTO is a class and not a record, in order to validate that the individualEquipment and commonEquipment JSON collections do not contain duplicates. If Jackson deserialised the JSON arrays into Sets, then the duplicates would be swallowed without an error. Thus, the client would not understand that its request was actually malformed.

So, instead, this is manually checked, and an exception is thrown manually.