Search in sources :

Example 1 with V3Weights

use of org.ovirt.engine.api.v3.types.V3Weights in project ovirt-engine by oVirt.

the class V3WeightsOutAdapter method adapt.

@Override
public V3Weights adapt(Weights from) {
    V3Weights to = new V3Weights();
    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.getWeights().addAll(adaptOut(from.getWeights()));
    return to;
}
Also used : V3Weights(org.ovirt.engine.api.v3.types.V3Weights)

Example 2 with V3Weights

use of org.ovirt.engine.api.v3.types.V3Weights in project ovirt-engine by oVirt.

the class V3WeightsInAdapter method adapt.

@Override
public Weights adapt(V3Weights from) {
    Weights to = new Weights();
    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.getWeights().addAll(adaptIn(from.getWeights()));
    return to;
}
Also used : V3Weights(org.ovirt.engine.api.v3.types.V3Weights) Weights(org.ovirt.engine.api.model.Weights)

Aggregations

V3Weights (org.ovirt.engine.api.v3.types.V3Weights)2 Weights (org.ovirt.engine.api.model.Weights)1