package org.cagrid.dorian.model.idp; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; 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.JAXBEqualsStrategy; import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy; import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; 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; /** * <p>Java class for Application complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="Application"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="userId" type="{http://www.w3.org/2001/XMLSchema}string"/> * <element name="email" type="{http://www.w3.org/2001/XMLSchema}string"/> * <element name="password" type="{http://www.w3.org/2001/XMLSchema}string"/> * <element name="firstName" type="{http://www.w3.org/2001/XMLSchema}string"/> * <element name="lastName" type="{http://www.w3.org/2001/XMLSchema}string"/> * <element name="organization" type="{http://www.w3.org/2001/XMLSchema}string"/> * <element name="address" type="{http://www.w3.org/2001/XMLSchema}string"/> * <element name="address2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="city" type="{http://www.w3.org/2001/XMLSchema}string"/> * <element name="state" type="{http://cagrid.nci.nih.gov/1/dorian-idp}stateCode" minOccurs="0"/> * <element name="zipcode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="country" type="{http://cagrid.nci.nih.gov/1/dorian-idp}countryCode"/> * <element name="phoneNumber" type="{http://www.w3.org/2001/XMLSchema}string"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Application", propOrder = { "userId", "email", "password", "firstName", "lastName", "organization", "address", "address2", "city", "state", "zipcode", "country", "phoneNumber" }) public class Application implements Serializable, Equals, HashCode, ToString { @XmlElement(required = true) protected String userId; @XmlElement(required = true) protected String email; @XmlElement(required = true) protected String password; @XmlElement(required = true) protected String firstName; @XmlElement(required = true) protected String lastName; @XmlElement(required = true) protected String organization; @XmlElement(required = true) protected String address; protected String address2; @XmlElement(required = true) protected String city; protected StateCode state; protected String zipcode; @XmlElement(required = true) protected CountryCode country; @XmlElement(required = true) protected String phoneNumber; /** * Gets the value of the userId property. * * @return * possible object is * {@link String } * */ public String getUserId() { return userId; } /** * Sets the value of the userId property. * * @param value * allowed object is * {@link String } * */ public void setUserId(String value) { this.userId = value; } /** * Gets the value of the email property. * * @return * possible object is * {@link String } * */ public String getEmail() { return email; } /** * Sets the value of the email property. * * @param value * allowed object is * {@link String } * */ public void setEmail(String value) { this.email = value; } /** * Gets the value of the password property. * * @return * possible object is * {@link String } * */ public String getPassword() { return password; } /** * Sets the value of the password property. * * @param value * allowed object is * {@link String } * */ public void setPassword(String value) { this.password = value; } /** * Gets the value of the firstName property. * * @return * possible object is * {@link String } * */ public String getFirstName() { return firstName; } /** * Sets the value of the firstName property. * * @param value * allowed object is * {@link String } * */ public void setFirstName(String value) { this.firstName = value; } /** * Gets the value of the lastName property. * * @return * possible object is * {@link String } * */ public String getLastName() { return lastName; } /** * Sets the value of the lastName property. * * @param value * allowed object is * {@link String } * */ public void setLastName(String value) { this.lastName = value; } /** * Gets the value of the organization property. * * @return * possible object is * {@link String } * */ public String getOrganization() { return organization; } /** * Sets the value of the organization property. * * @param value * allowed object is * {@link String } * */ public void setOrganization(String value) { this.organization = 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 address2 property. * * @return * possible object is * {@link String } * */ public String getAddress2() { return address2; } /** * Sets the value of the address2 property. * * @param value * allowed object is * {@link String } * */ public void setAddress2(String value) { this.address2 = 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 state property. * * @return * possible object is * {@link StateCode } * */ public StateCode getState() { return state; } /** * Sets the value of the state property. * * @param value * allowed object is * {@link StateCode } * */ public void setState(StateCode value) { this.state = value; } /** * Gets the value of the zipcode property. * * @return * possible object is * {@link String } * */ public String getZipcode() { return zipcode; } /** * Sets the value of the zipcode property. * * @param value * allowed object is * {@link String } * */ public void setZipcode(String value) { this.zipcode = value; } /** * Gets the value of the country property. * * @return * possible object is * {@link CountryCode } * */ public CountryCode getCountry() { return country; } /** * Sets the value of the country property. * * @param value * allowed object is * {@link CountryCode } * */ public void setCountry(CountryCode value) { this.country = value; } /** * Gets the value of the phoneNumber property. * * @return * possible object is * {@link String } * */ public String getPhoneNumber() { return phoneNumber; } /** * Sets the value of the phoneNumber property. * * @param value * allowed object is * {@link String } * */ public void setPhoneNumber(String value) { this.phoneNumber = 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 theUserId; theUserId = this.getUserId(); strategy.appendField(locator, this, "userId", buffer, theUserId); } { String theEmail; theEmail = this.getEmail(); strategy.appendField(locator, this, "email", buffer, theEmail); } { String thePassword; thePassword = this.getPassword(); strategy.appendField(locator, this, "password", buffer, thePassword); } { String theFirstName; theFirstName = this.getFirstName(); strategy.appendField(locator, this, "firstName", buffer, theFirstName); } { String theLastName; theLastName = this.getLastName(); strategy.appendField(locator, this, "lastName", buffer, theLastName); } { String theOrganization; theOrganization = this.getOrganization(); strategy.appendField(locator, this, "organization", buffer, theOrganization); } { String theAddress; theAddress = this.getAddress(); strategy.appendField(locator, this, "address", buffer, theAddress); } { String theAddress2; theAddress2 = this.getAddress2(); strategy.appendField(locator, this, "address2", buffer, theAddress2); } { String theCity; theCity = this.getCity(); strategy.appendField(locator, this, "city", buffer, theCity); } { StateCode theState; theState = this.getState(); strategy.appendField(locator, this, "state", buffer, theState); } { String theZipcode; theZipcode = this.getZipcode(); strategy.appendField(locator, this, "zipcode", buffer, theZipcode); } { CountryCode theCountry; theCountry = this.getCountry(); strategy.appendField(locator, this, "country", buffer, theCountry); } { String thePhoneNumber; thePhoneNumber = this.getPhoneNumber(); strategy.appendField(locator, this, "phoneNumber", buffer, thePhoneNumber); } return buffer; } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theUserId; theUserId = this.getUserId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "userId", theUserId), currentHashCode, theUserId); } { String theEmail; theEmail = this.getEmail(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "email", theEmail), currentHashCode, theEmail); } { String thePassword; thePassword = this.getPassword(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "password", thePassword), currentHashCode, thePassword); } { String theFirstName; theFirstName = this.getFirstName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "firstName", theFirstName), currentHashCode, theFirstName); } { String theLastName; theLastName = this.getLastName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "lastName", theLastName), currentHashCode, theLastName); } { String theOrganization; theOrganization = this.getOrganization(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "organization", theOrganization), currentHashCode, theOrganization); } { String theAddress; theAddress = this.getAddress(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "address", theAddress), currentHashCode, theAddress); } { String theAddress2; theAddress2 = this.getAddress2(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "address2", theAddress2), currentHashCode, theAddress2); } { String theCity; theCity = this.getCity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "city", theCity), currentHashCode, theCity); } { StateCode theState; theState = this.getState(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "state", theState), currentHashCode, theState); } { String theZipcode; theZipcode = this.getZipcode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "zipcode", theZipcode), currentHashCode, theZipcode); } { CountryCode theCountry; theCountry = this.getCountry(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "country", theCountry), currentHashCode, theCountry); } { String thePhoneNumber; thePhoneNumber = this.getPhoneNumber(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "phoneNumber", thePhoneNumber), currentHashCode, thePhoneNumber); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Application)) { return false; } if (this == object) { return true; } final Application that = ((Application) object); { String lhsUserId; lhsUserId = this.getUserId(); String rhsUserId; rhsUserId = that.getUserId(); if (!strategy.equals(LocatorUtils.property(thisLocator, "userId", lhsUserId), LocatorUtils.property(thatLocator, "userId", rhsUserId), lhsUserId, rhsUserId)) { return false; } } { String lhsEmail; lhsEmail = this.getEmail(); String rhsEmail; rhsEmail = that.getEmail(); if (!strategy.equals(LocatorUtils.property(thisLocator, "email", lhsEmail), LocatorUtils.property(thatLocator, "email", rhsEmail), lhsEmail, rhsEmail)) { return false; } } { String lhsPassword; lhsPassword = this.getPassword(); String rhsPassword; rhsPassword = that.getPassword(); if (!strategy.equals(LocatorUtils.property(thisLocator, "password", lhsPassword), LocatorUtils.property(thatLocator, "password", rhsPassword), lhsPassword, rhsPassword)) { return false; } } { String lhsFirstName; lhsFirstName = this.getFirstName(); String rhsFirstName; rhsFirstName = that.getFirstName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "firstName", lhsFirstName), LocatorUtils.property(thatLocator, "firstName", rhsFirstName), lhsFirstName, rhsFirstName)) { return false; } } { String lhsLastName; lhsLastName = this.getLastName(); String rhsLastName; rhsLastName = that.getLastName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "lastName", lhsLastName), LocatorUtils.property(thatLocator, "lastName", rhsLastName), lhsLastName, rhsLastName)) { return false; } } { String lhsOrganization; lhsOrganization = this.getOrganization(); String rhsOrganization; rhsOrganization = that.getOrganization(); if (!strategy.equals(LocatorUtils.property(thisLocator, "organization", lhsOrganization), LocatorUtils.property(thatLocator, "organization", rhsOrganization), lhsOrganization, rhsOrganization)) { 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 lhsAddress2; lhsAddress2 = this.getAddress2(); String rhsAddress2; rhsAddress2 = that.getAddress2(); if (!strategy.equals(LocatorUtils.property(thisLocator, "address2", lhsAddress2), LocatorUtils.property(thatLocator, "address2", rhsAddress2), lhsAddress2, rhsAddress2)) { 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; } } { StateCode lhsState; lhsState = this.getState(); StateCode rhsState; rhsState = that.getState(); if (!strategy.equals(LocatorUtils.property(thisLocator, "state", lhsState), LocatorUtils.property(thatLocator, "state", rhsState), lhsState, rhsState)) { return false; } } { String lhsZipcode; lhsZipcode = this.getZipcode(); String rhsZipcode; rhsZipcode = that.getZipcode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "zipcode", lhsZipcode), LocatorUtils.property(thatLocator, "zipcode", rhsZipcode), lhsZipcode, rhsZipcode)) { return false; } } { CountryCode lhsCountry; lhsCountry = this.getCountry(); CountryCode rhsCountry; rhsCountry = that.getCountry(); if (!strategy.equals(LocatorUtils.property(thisLocator, "country", lhsCountry), LocatorUtils.property(thatLocator, "country", rhsCountry), lhsCountry, rhsCountry)) { return false; } } { String lhsPhoneNumber; lhsPhoneNumber = this.getPhoneNumber(); String rhsPhoneNumber; rhsPhoneNumber = that.getPhoneNumber(); if (!strategy.equals(LocatorUtils.property(thisLocator, "phoneNumber", lhsPhoneNumber), LocatorUtils.property(thatLocator, "phoneNumber", rhsPhoneNumber), lhsPhoneNumber, rhsPhoneNumber)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } }