public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof AddressDetails.PostalServiceElements.SortingCode)) { return false; } if (this == object) { return true; } final AddressDetails.PostalServiceElements.SortingCode that = ((AddressDetails.PostalServiceElements.SortingCode) object); { String lhsType; lhsType = this.getType(); String rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) { return false; } } { String lhsCode; lhsCode = this.getCode(); String rhsCode; rhsCode = that.getCode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "code", lhsCode), LocatorUtils.property(thatLocator, "code", rhsCode), lhsCode, rhsCode)) { return false; } } return true; }
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 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 int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } { String theCode; theCode = this.getCode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode); } return currentHashCode; }
public SortingCode unmarshalSortingCode(AddressDetails.PostalServiceElements.SortingCode src) { SortingCode dest = new SortingCode(); if (src.isSetCode()) dest.setCode(src.getCode()); if (src.isSetType()) dest.setType(src.getType()); return dest; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } { String theCode; theCode = this.getCode(); strategy.appendField(locator, this, "code", buffer, theCode); } return buffer; }