use of org.ovirt.engine.api.model.UnmanagedNetwork in project ovirt-engine by oVirt.
the class UnmanagedNetworkMapper method map.
@Mapping(from = org.ovirt.engine.core.common.businessentities.UnmanagedNetwork.class, to = UnmanagedNetwork.class)
public static UnmanagedNetwork map(org.ovirt.engine.core.common.businessentities.UnmanagedNetwork entity, UnmanagedNetwork template) {
if (entity == null) {
return template;
}
UnmanagedNetwork model = template == null ? new UnmanagedNetwork() : template;
model.setId(HexUtils.string2hex(entity.getId()));
if (entity.getNicId() != null) {
HostNic hostNic = new HostNic();
hostNic.setId(entity.getNicId().toString());
model.setHostNic(hostNic);
}
model.setName(entity.getNetworkName());
return model;
}
Aggregations