@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; } }