@Override protected List<CpuProfile> getCollection() { return collection.list().getCpuProfiles(); } }
@Override protected List<CpuProfile> getCollection() { return collection.list().getCpuProfiles(); }
protected CpuProfiles mapCollection(List<org.ovirt.engine.core.common.businessentities.profiles.CpuProfile> entities) { CpuProfiles collection = new CpuProfiles(); Map<Guid, Qos> qosMap = new HashMap<>(); for (org.ovirt.engine.core.common.businessentities.profiles.CpuProfile entity : entities) { CpuProfile profile = populate(map(entity), entity); collection.getCpuProfiles().add(profile); if (entity.getQosId() != null) { qosMap.put(entity.getQosId(), profile.getQos()); } } handleQosDataCenterLinks(qosMap); for (CpuProfile cpuProfile : collection.getCpuProfiles()) { addLinks(cpuProfile); } return collection; }
@Override public V3CpuProfiles adapt(CpuProfiles from) { V3CpuProfiles to = new V3CpuProfiles(); if (from.isSetActions()) { to.setActions(adaptOut(from.getActions())); } if (from.isSetActive()) { to.setActive(from.getActive()); } if (from.isSetSize()) { to.setSize(from.getSize()); } if (from.isSetTotal()) { to.setTotal(from.getTotal()); } to.getCpuProfiles().addAll(adaptOut(from.getCpuProfiles())); return to; } }
@Override public CpuProfiles adapt(V3CpuProfiles from) { CpuProfiles to = new CpuProfiles(); if (from.isSetActions()) { to.setActions(adaptIn(from.getActions())); } if (from.isSetActive()) { to.setActive(from.getActive()); } if (from.isSetSize()) { to.setSize(from.getSize()); } if (from.isSetTotal()) { to.setTotal(from.getTotal()); } to.getCpuProfiles().addAll(adaptIn(from.getCpuProfiles())); return to; } }