Search in sources :

Example 1 with V3Version

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

the class V3VersionInAdapter method adapt.

@Override
public Version adapt(V3Version from) {
    Version to = new Version();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    to.setMajor(from.getMajor());
    to.setMinor(from.getMinor());
    to.setRevision(from.getRevision());
    to.setBuild(from.getBuild());
    to.setFullVersion(from.getFullVersion());
    return to;
}
Also used : V3Version(org.ovirt.engine.api.v3.types.V3Version) Version(org.ovirt.engine.api.model.Version)

Example 2 with V3Version

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

the class V3ProductInfoOutAdapter method adapt.

@Override
public V3ProductInfo adapt(ProductInfo from) {
    V3ProductInfo to = new V3ProductInfo();
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetVendor()) {
        to.setVendor(from.getVendor());
    }
    Version fromVersion = from.getVersion();
    if (fromVersion != null) {
        V3Version toVersion = new V3Version();
        toVersion.setMajor(fromVersion.getMajor());
        toVersion.setMinor(fromVersion.getMinor());
        toVersion.setBuild(fromVersion.getBuild());
        toVersion.setRevision(fromVersion.getRevision());
        toVersion.setFullVersion(fromVersion.getFullVersion());
        to.setVersion(toVersion);
        to.setFullVersion(fromVersion.getFullVersion());
    }
    return to;
}
Also used : V3ProductInfo(org.ovirt.engine.api.v3.types.V3ProductInfo) V3Version(org.ovirt.engine.api.v3.types.V3Version) Version(org.ovirt.engine.api.model.Version) V3Version(org.ovirt.engine.api.v3.types.V3Version)

Aggregations

Version (org.ovirt.engine.api.model.Version)2 V3Version (org.ovirt.engine.api.v3.types.V3Version)2 V3ProductInfo (org.ovirt.engine.api.v3.types.V3ProductInfo)1