@Mapping(from = ServerCpu.class, to = Cpu.class) public static Cpu map(ServerCpu entity, Cpu template) { Cpu model = template != null ? template : new Cpu(); model.setName(entity.getCpuName()); model.setLevel(entity.getLevel()); model.setArchitecture(map(entity.getArchitecture(), null)); return model; }
Cpu to = new Cpu(); if (from.isSetArchitecture()) { to.setArchitecture(Architecture.fromValue(from.getArchitecture()));
model.getCpu().setArchitecture(CPUMapper.map(entity.getClusterArch(), null));
cpu.setType(entity.getCpuName()); cpu.setArchitecture(CPUMapper.map(entity.getArchitecture(), null));
model.getCpu().setArchitecture(CPUMapper.map(entity.getClusterArch(), null));