public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof AddressDetails.PostalServiceElements.SortingCode) { final AddressDetails.PostalServiceElements.SortingCode copy = ((AddressDetails.PostalServiceElements.SortingCode) draftCopy); if (this.type!= null) { String sourceType; sourceType = this.getType(); String copyType = ((String) strategy.copy(LocatorUtils.property(locator, "type", sourceType), sourceType)); copy.setType(copyType); } else { copy.type = null; } if (this.code!= null) { String sourceCode; sourceCode = this.getCode(); String copyCode = ((String) strategy.copy(LocatorUtils.property(locator, "code", sourceCode), sourceCode)); copy.setCode(copyCode); } else { copy.code = null; } } return draftCopy; }
public void mergeFrom(ObjectLocator leftLocator, ObjectLocator rightLocator, Object left, Object right, MergeStrategy strategy) { if (right instanceof AddressDetails.PostalServiceElements.SortingCode) { final AddressDetails.PostalServiceElements.SortingCode target = this; final AddressDetails.PostalServiceElements.SortingCode leftObject = ((AddressDetails.PostalServiceElements.SortingCode) left); final AddressDetails.PostalServiceElements.SortingCode rightObject = ((AddressDetails.PostalServiceElements.SortingCode) right); { String lhsType; lhsType = leftObject.getType(); String rhsType; rhsType = rightObject.getType(); target.setType(((String) strategy.merge(LocatorUtils.property(leftLocator, "type", lhsType), LocatorUtils.property(rightLocator, "type", rhsType), lhsType, rhsType))); } { String lhsCode; lhsCode = leftObject.getCode(); String rhsCode; rhsCode = rightObject.getCode(); target.setCode(((String) strategy.merge(LocatorUtils.property(leftLocator, "code", lhsCode), LocatorUtils.property(rightLocator, "code", rhsCode), lhsCode, rhsCode))); } } }
public AddressDetails.PostalServiceElements.SortingCode marshalSortingCode(SortingCode src) { AddressDetails.PostalServiceElements.SortingCode dest = xal.createAddressDetailsPostalServiceElementsSortingCode(); if (src.isSetCode()) dest.setCode(src.getCode()); if (src.isSetType()) dest.setType(src.getType()); return dest; }