Class ThingDTOMapper

  • Direct Known Subclasses:
    EnrichedThingDTOMapper

    @NonNullByDefault
    public class ThingDTOMapper
    extends Object
    The ThingDTOMapper is an utility class to map things into data transfer objects (DTO).
    Author:
    Stefan Bußweiler - Initial contribution, Kai Kreuzer - Added DTO to Thing mapping
    • Constructor Detail

      • ThingDTOMapper

        public ThingDTOMapper()
    • Method Detail

      • map

        public static ThingDTO map​(Thing thing)
        Maps thing into thing data transfer object (DTO).
        Parameters:
        thing - the thing
        Returns:
        the thing DTO object
      • map

        public static Thing map​(ThingDTO thingDTO,
                                boolean isBridge)
        Maps thing DTO into thing
        Parameters:
        thingDTO - the thingDTO
        isBridge - flag if the thing DTO identifies a bridge
        Returns:
        the corresponding thing