public DeviceTypeWithUsersAndDevicesVO(DeviceTypeVO vo) { setId(vo.getId()); setName(vo.getName()); setDescription(vo.getDescription()); setEntityVersion(vo.getEntityVersion()); }
@Override public DeviceTypeVO merge(DeviceTypeVO existing) { DeviceType deviceType = find(DeviceType.class, existing.getId()); deviceType.setName(existing.getName()); deviceType.setDescription(existing.getDescription()); deviceType.setEntityVersion(existing.getEntityVersion()); super.merge(deviceType); return existing; }
public static DeviceType convert(DeviceTypeVO vo) { if (vo != null) { DeviceType deviceType = new DeviceType(); deviceType.setId(vo.getId()); deviceType.setName(vo.getName()); deviceType.setDescription(vo.getDescription()); deviceType.setEntityVersion(vo.getEntityVersion()); return deviceType; } return null; } }