use of org.ovirt.engine.api.model.Package in project ovirt-engine by oVirt.
the class ErratumMapper method map.
@Mapping(from = Erratum.class, to = KatelloErratum.class)
public static KatelloErratum map(Erratum entity, KatelloErratum model) {
model = model == null ? new KatelloErratum() : model;
model.setId(string2hex(entity.getId()));
model.setName(entity.getId());
model.setTitle(entity.getTitle());
model.setSummary(entity.getSummary());
model.setSolution(entity.getSolution());
model.setDescription(entity.getDescription());
if (entity.getIssued() != null) {
model.setIssued(DateMapper.map(entity.getIssued(), null));
}
model.setSeverity(entity.getSeverity() == null ? null : entity.getSeverity().getDescription());
model.setType(entity.getType() == null ? null : entity.getType().getDescription());
if (entity.getPackages() != null && !entity.getPackages().isEmpty()) {
Packages packages = new Packages();
for (String packageName : entity.getPackages()) {
Package p = new Package();
p.setName(packageName);
packages.getPackages().add(p);
}
model.setPackages(packages);
}
return model;
}
Aggregations