@Mapping(from = org.ovirt.engine.core.common.businessentities.Snapshot.class, to = Snapshot.class) public static Snapshot map(org.ovirt.engine.core.common.businessentities.Snapshot entity, Snapshot template) { Snapshot model = template != null ? template : new Snapshot(); model.setId(entity.getId().toString()); if (entity.getDescription() != null) { model.setDescription(entity.getDescription()); } if (entity.getCreationDate() != null) { model.setDate(DateMapper.map(entity.getCreationDate(), null)); } if (entity.getStatus() != null) { model.setSnapshotStatus(map(entity.getStatus(), null)); } if (entity.getType() != null) { model.setSnapshotType(map(entity.getType(), null)); } model.setPersistMemorystate(entity.containsMemory()); return model; }
to.setPersistMemorystate(from.isPersistMemorystate());