WMS_1_1_0.ContactAddress Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.10.31 at 02:43:57 PM CET
//
package WMS_1_1_0;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy;
import org.jvnet.jaxb2_commons.lang.CopyTo;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBMergeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.MergeFrom;
import org.jvnet.jaxb2_commons.lang.MergeStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"addressType",
"address",
"city",
"stateOrProvince",
"postCode",
"country"
})
@XmlRootElement(name = "ContactAddress")
public class ContactAddress
implements Cloneable, CopyTo, Equals, HashCode, MergeFrom, ToString
{
@XmlElement(name = "AddressType", required = true)
protected String addressType;
@XmlElement(name = "Address", required = true)
protected String address;
@XmlElement(name = "City", required = true)
protected String city;
@XmlElement(name = "StateOrProvince", required = true)
protected String stateOrProvince;
@XmlElement(name = "PostCode", required = true)
protected String postCode;
@XmlElement(name = "Country", required = true)
protected String country;
/**
* Gets the value of the addressType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAddressType() {
return addressType;
}
/**
* Sets the value of the addressType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAddressType(String value) {
this.addressType = value;
}
/**
* Gets the value of the address property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAddress() {
return address;
}
/**
* Sets the value of the address property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAddress(String value) {
this.address = value;
}
/**
* Gets the value of the city property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCity() {
return city;
}
/**
* Sets the value of the city property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCity(String value) {
this.city = value;
}
/**
* Gets the value of the stateOrProvince property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStateOrProvince() {
return stateOrProvince;
}
/**
* Sets the value of the stateOrProvince property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStateOrProvince(String value) {
this.stateOrProvince = value;
}
/**
* Gets the value of the postCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPostCode() {
return postCode;
}
/**
* Sets the value of the postCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPostCode(String value) {
this.postCode = value;
}
/**
* Gets the value of the country property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCountry() {
return country;
}
/**
* Sets the value of the country property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCountry(String value) {
this.country = value;
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
String theAddressType;
theAddressType = this.getAddressType();
strategy.appendField(locator, this, "addressType", buffer, theAddressType);
}
{
String theAddress;
theAddress = this.getAddress();
strategy.appendField(locator, this, "address", buffer, theAddress);
}
{
String theCity;
theCity = this.getCity();
strategy.appendField(locator, this, "city", buffer, theCity);
}
{
String theStateOrProvince;
theStateOrProvince = this.getStateOrProvince();
strategy.appendField(locator, this, "stateOrProvince", buffer, theStateOrProvince);
}
{
String thePostCode;
thePostCode = this.getPostCode();
strategy.appendField(locator, this, "postCode", buffer, thePostCode);
}
{
String theCountry;
theCountry = this.getCountry();
strategy.appendField(locator, this, "country", buffer, theCountry);
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof ContactAddress)) {
return false;
}
if (this == object) {
return true;
}
final ContactAddress that = ((ContactAddress) object);
{
String lhsAddressType;
lhsAddressType = this.getAddressType();
String rhsAddressType;
rhsAddressType = that.getAddressType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "addressType", lhsAddressType), LocatorUtils.property(thatLocator, "addressType", rhsAddressType), lhsAddressType, rhsAddressType)) {
return false;
}
}
{
String lhsAddress;
lhsAddress = this.getAddress();
String rhsAddress;
rhsAddress = that.getAddress();
if (!strategy.equals(LocatorUtils.property(thisLocator, "address", lhsAddress), LocatorUtils.property(thatLocator, "address", rhsAddress), lhsAddress, rhsAddress)) {
return false;
}
}
{
String lhsCity;
lhsCity = this.getCity();
String rhsCity;
rhsCity = that.getCity();
if (!strategy.equals(LocatorUtils.property(thisLocator, "city", lhsCity), LocatorUtils.property(thatLocator, "city", rhsCity), lhsCity, rhsCity)) {
return false;
}
}
{
String lhsStateOrProvince;
lhsStateOrProvince = this.getStateOrProvince();
String rhsStateOrProvince;
rhsStateOrProvince = that.getStateOrProvince();
if (!strategy.equals(LocatorUtils.property(thisLocator, "stateOrProvince", lhsStateOrProvince), LocatorUtils.property(thatLocator, "stateOrProvince", rhsStateOrProvince), lhsStateOrProvince, rhsStateOrProvince)) {
return false;
}
}
{
String lhsPostCode;
lhsPostCode = this.getPostCode();
String rhsPostCode;
rhsPostCode = that.getPostCode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "postCode", lhsPostCode), LocatorUtils.property(thatLocator, "postCode", rhsPostCode), lhsPostCode, rhsPostCode)) {
return false;
}
}
{
String lhsCountry;
lhsCountry = this.getCountry();
String rhsCountry;
rhsCountry = that.getCountry();
if (!strategy.equals(LocatorUtils.property(thisLocator, "country", lhsCountry), LocatorUtils.property(thatLocator, "country", rhsCountry), lhsCountry, rhsCountry)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
String theAddressType;
theAddressType = this.getAddressType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "addressType", theAddressType), currentHashCode, theAddressType);
}
{
String theAddress;
theAddress = this.getAddress();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "address", theAddress), currentHashCode, theAddress);
}
{
String theCity;
theCity = this.getCity();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "city", theCity), currentHashCode, theCity);
}
{
String theStateOrProvince;
theStateOrProvince = this.getStateOrProvince();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "stateOrProvince", theStateOrProvince), currentHashCode, theStateOrProvince);
}
{
String thePostCode;
thePostCode = this.getPostCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "postCode", thePostCode), currentHashCode, thePostCode);
}
{
String theCountry;
theCountry = this.getCountry();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "country", theCountry), currentHashCode, theCountry);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof ContactAddress) {
final ContactAddress copy = ((ContactAddress) draftCopy);
if (this.addressType!= null) {
String sourceAddressType;
sourceAddressType = this.getAddressType();
String copyAddressType = ((String) strategy.copy(LocatorUtils.property(locator, "addressType", sourceAddressType), sourceAddressType));
copy.setAddressType(copyAddressType);
} else {
copy.addressType = null;
}
if (this.address!= null) {
String sourceAddress;
sourceAddress = this.getAddress();
String copyAddress = ((String) strategy.copy(LocatorUtils.property(locator, "address", sourceAddress), sourceAddress));
copy.setAddress(copyAddress);
} else {
copy.address = null;
}
if (this.city!= null) {
String sourceCity;
sourceCity = this.getCity();
String copyCity = ((String) strategy.copy(LocatorUtils.property(locator, "city", sourceCity), sourceCity));
copy.setCity(copyCity);
} else {
copy.city = null;
}
if (this.stateOrProvince!= null) {
String sourceStateOrProvince;
sourceStateOrProvince = this.getStateOrProvince();
String copyStateOrProvince = ((String) strategy.copy(LocatorUtils.property(locator, "stateOrProvince", sourceStateOrProvince), sourceStateOrProvince));
copy.setStateOrProvince(copyStateOrProvince);
} else {
copy.stateOrProvince = null;
}
if (this.postCode!= null) {
String sourcePostCode;
sourcePostCode = this.getPostCode();
String copyPostCode = ((String) strategy.copy(LocatorUtils.property(locator, "postCode", sourcePostCode), sourcePostCode));
copy.setPostCode(copyPostCode);
} else {
copy.postCode = null;
}
if (this.country!= null) {
String sourceCountry;
sourceCountry = this.getCountry();
String copyCountry = ((String) strategy.copy(LocatorUtils.property(locator, "country", sourceCountry), sourceCountry));
copy.setCountry(copyCountry);
} else {
copy.country = null;
}
}
return draftCopy;
}
public Object createNewInstance() {
return new ContactAddress();
}
public void mergeFrom(Object left, Object right) {
final MergeStrategy strategy = JAXBMergeStrategy.INSTANCE;
mergeFrom(null, null, left, right, strategy);
}
public void mergeFrom(ObjectLocator leftLocator, ObjectLocator rightLocator, Object left, Object right, MergeStrategy strategy) {
if (right instanceof ContactAddress) {
final ContactAddress target = this;
final ContactAddress leftObject = ((ContactAddress) left);
final ContactAddress rightObject = ((ContactAddress) right);
{
String lhsAddressType;
lhsAddressType = leftObject.getAddressType();
String rhsAddressType;
rhsAddressType = rightObject.getAddressType();
String mergedAddressType = ((String) strategy.merge(LocatorUtils.property(leftLocator, "addressType", lhsAddressType), LocatorUtils.property(rightLocator, "addressType", rhsAddressType), lhsAddressType, rhsAddressType));
target.setAddressType(mergedAddressType);
}
{
String lhsAddress;
lhsAddress = leftObject.getAddress();
String rhsAddress;
rhsAddress = rightObject.getAddress();
String mergedAddress = ((String) strategy.merge(LocatorUtils.property(leftLocator, "address", lhsAddress), LocatorUtils.property(rightLocator, "address", rhsAddress), lhsAddress, rhsAddress));
target.setAddress(mergedAddress);
}
{
String lhsCity;
lhsCity = leftObject.getCity();
String rhsCity;
rhsCity = rightObject.getCity();
String mergedCity = ((String) strategy.merge(LocatorUtils.property(leftLocator, "city", lhsCity), LocatorUtils.property(rightLocator, "city", rhsCity), lhsCity, rhsCity));
target.setCity(mergedCity);
}
{
String lhsStateOrProvince;
lhsStateOrProvince = leftObject.getStateOrProvince();
String rhsStateOrProvince;
rhsStateOrProvince = rightObject.getStateOrProvince();
String mergedStateOrProvince = ((String) strategy.merge(LocatorUtils.property(leftLocator, "stateOrProvince", lhsStateOrProvince), LocatorUtils.property(rightLocator, "stateOrProvince", rhsStateOrProvince), lhsStateOrProvince, rhsStateOrProvince));
target.setStateOrProvince(mergedStateOrProvince);
}
{
String lhsPostCode;
lhsPostCode = leftObject.getPostCode();
String rhsPostCode;
rhsPostCode = rightObject.getPostCode();
String mergedPostCode = ((String) strategy.merge(LocatorUtils.property(leftLocator, "postCode", lhsPostCode), LocatorUtils.property(rightLocator, "postCode", rhsPostCode), lhsPostCode, rhsPostCode));
target.setPostCode(mergedPostCode);
}
{
String lhsCountry;
lhsCountry = leftObject.getCountry();
String rhsCountry;
rhsCountry = rightObject.getCountry();
String mergedCountry = ((String) strategy.merge(LocatorUtils.property(leftLocator, "country", lhsCountry), LocatorUtils.property(rightLocator, "country", rhsCountry), lhsCountry, rhsCountry));
target.setCountry(mergedCountry);
}
}
}
public ContactAddress withAddressType(String value) {
setAddressType(value);
return this;
}
public ContactAddress withAddress(String value) {
setAddress(value);
return this;
}
public ContactAddress withCity(String value) {
setCity(value);
return this;
}
public ContactAddress withStateOrProvince(String value) {
setStateOrProvince(value);
return this;
}
public ContactAddress withPostCode(String value) {
setPostCode(value);
return this;
}
public ContactAddress withCountry(String value) {
setCountry(value);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy