package de.ph87.homeautomation.device; public abstract class DeviceDto { public final long id; public final String name; public final String type; public DeviceDto(final Device device) { this.id = device.getId(); this.name = device.getName(); this.type = device.getClass().getSimpleName(); } }