use of org.ovirt.engine.api.model.InstanceTypes in project ovirt-engine by oVirt.
the class BackendInstanceTypesResource method mapCollection.
protected InstanceTypes mapCollection(List<org.ovirt.engine.core.common.businessentities.InstanceType> entities) {
InstanceTypes collection = new InstanceTypes();
for (org.ovirt.engine.core.common.businessentities.InstanceType entity : entities) {
InstanceType instanceType = map(entity);
DisplayHelper.adjustDisplayData(this, instanceType);
collection.getInstanceTypes().add(addLinks(populate(instanceType, entity)));
}
return collection;
}
use of org.ovirt.engine.api.model.InstanceTypes in project ovirt-engine by oVirt.
the class V3InstanceTypesInAdapter method adapt.
@Override
public InstanceTypes adapt(V3InstanceTypes from) {
InstanceTypes to = new InstanceTypes();
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.getInstanceTypes().addAll(adaptIn(from.getInstanceTypes()));
return to;
}
Aggregations