// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.07.20 at 12:19:30 PM CEST // package at.gv.egovernment.moa.id.commons.db.dao.config.deprecated; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.persistence.Transient; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; 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.locator.ObjectLocator; import org.jvnet.jaxb2_commons.locator.util.LocatorUtils; //import org.jvnet.hyperjaxb3.item.ItemUtils; /** *

Java class for anonymous complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="SurName" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="GivenName" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="Mail" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
 *         <element name="Type">
 *           <simpleType>
 *             <restriction base="{http://www.w3.org/2001/XMLSchema}token">
 *               <enumeration value="technical"/>
 *               <enumeration value="support"/>
 *               <enumeration value="administrative"/>
 *               <enumeration value="billing"/>
 *               <enumeration value="other"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *         <element name="Company" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="Phone" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "surName", "givenName", "mail", "type", "company", "phone" }) @XmlRootElement(name = "Contact") public class Contact implements Serializable, Equals, HashCode { @XmlElement(name = "SurName", required = true) protected String surName; @XmlElement(name = "GivenName", required = true) protected String givenName; @XmlElement(name = "Mail", required = true) protected List mail; @XmlElement(name = "Type", required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String type; @XmlElement(name = "Company", required = true) protected String company; @XmlElement(name = "Phone", required = true) protected List phone; @XmlAttribute(name = "Hjid") protected Long hjid; // protected transient List mailItems; // protected transient List phoneItems; /** * Gets the value of the surName property. * * @return * possible object is * {@link String } * */ public String getSurName() { return surName; } /** * Sets the value of the surName property. * * @param value * allowed object is * {@link String } * */ public void setSurName(String value) { this.surName = value; } /** * Gets the value of the givenName property. * * @return * possible object is * {@link String } * */ public String getGivenName() { return givenName; } /** * Sets the value of the givenName property. * * @param value * allowed object is * {@link String } * */ public void setGivenName(String value) { this.givenName = value; } /** * Gets the value of the mail property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the mail property. * *

* For example, to add a new item, do as follows: *

     *    getMail().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link String } * * */ @Transient public List getMail() { if (mail == null) { mail = new ArrayList(); } return this.mail; } /** * * */ public void setMail(List mail) { this.mail = mail; } /** * Gets the value of the type property. * * @return * possible object is * {@link String } * */ public String getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link String } * */ public void setType(String value) { this.type = value; } /** * Gets the value of the company property. * * @return * possible object is * {@link String } * */ public String getCompany() { return company; } /** * Sets the value of the company property. * * @param value * allowed object is * {@link String } * */ public void setCompany(String value) { this.company = value; } /** * Gets the value of the phone property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the phone property. * *

* For example, to add a new item, do as follows: *

     *    getPhone().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link String } * * */ @Transient public List getPhone() { if (phone == null) { phone = new ArrayList(); } return this.phone; } /** * * */ public void setPhone(List phone) { this.phone = phone; } /** * Gets the value of the hjid property. * * @return * possible object is * {@link Long } * */ public Long getHjid() { return hjid; } /** * Sets the value of the hjid property. * * @param value * allowed object is * {@link Long } * */ public void setHjid(Long value) { this.hjid = value; } // @OneToMany(targetEntity = ContactMailItem.class, cascade = { // CascadeType.ALL // }) // // public List getMailItems() { // if (this.mailItems == null) { // this.mailItems = new ArrayList(); // } // if (ItemUtils.shouldBeWrapped(this.mail)) { // this.mail = ItemUtils.wrap(this.mail, this.mailItems, ContactMailItem.class); // } // return this.mailItems; // } // // public void setMailItems(List value) { // this.mail = null; // this.mailItems = null; // this.mailItems = value; // if (this.mailItems == null) { // this.mailItems = new ArrayList(); // } // if (ItemUtils.shouldBeWrapped(this.mail)) { // this.mail = ItemUtils.wrap(this.mail, this.mailItems, ContactMailItem.class); // } // } // // @OneToMany(targetEntity = ContactPhoneItem.class, cascade = { // CascadeType.ALL // }) // // public List getPhoneItems() { // if (this.phoneItems == null) { // this.phoneItems = new ArrayList(); // } // if (ItemUtils.shouldBeWrapped(this.phone)) { // this.phone = ItemUtils.wrap(this.phone, this.phoneItems, ContactPhoneItem.class); // } // return this.phoneItems; // } // // public void setPhoneItems(List value) { // this.phone = null; // this.phoneItems = null; // this.phoneItems = value; // if (this.phoneItems == null) { // this.phoneItems = new ArrayList(); // } // if (ItemUtils.shouldBeWrapped(this.phone)) { // this.phone = ItemUtils.wrap(this.phone, this.phoneItems, ContactPhoneItem.class); // } // } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Contact)) { return false; } if (this == object) { return true; } final Contact that = ((Contact) object); { String lhsSurName; lhsSurName = this.getSurName(); String rhsSurName; rhsSurName = that.getSurName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "surName", lhsSurName), LocatorUtils.property(thatLocator, "surName", rhsSurName), lhsSurName, rhsSurName)) { return false; } } { String lhsGivenName; lhsGivenName = this.getGivenName(); String rhsGivenName; rhsGivenName = that.getGivenName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "givenName", lhsGivenName), LocatorUtils.property(thatLocator, "givenName", rhsGivenName), lhsGivenName, rhsGivenName)) { return false; } } { List lhsMail; lhsMail = (((this.mail!= null)&&(!this.mail.isEmpty()))?this.getMail():null); List rhsMail; rhsMail = (((that.mail!= null)&&(!that.mail.isEmpty()))?that.getMail():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "mail", lhsMail), LocatorUtils.property(thatLocator, "mail", rhsMail), lhsMail, rhsMail)) { return false; } } { 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 lhsCompany; lhsCompany = this.getCompany(); String rhsCompany; rhsCompany = that.getCompany(); if (!strategy.equals(LocatorUtils.property(thisLocator, "company", lhsCompany), LocatorUtils.property(thatLocator, "company", rhsCompany), lhsCompany, rhsCompany)) { return false; } } { List lhsPhone; lhsPhone = (((this.phone!= null)&&(!this.phone.isEmpty()))?this.getPhone():null); List rhsPhone; rhsPhone = (((that.phone!= null)&&(!that.phone.isEmpty()))?that.getPhone():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "phone", lhsPhone), LocatorUtils.property(thatLocator, "phone", rhsPhone), lhsPhone, rhsPhone)) { 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 theSurName; theSurName = this.getSurName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "surName", theSurName), currentHashCode, theSurName); } { String theGivenName; theGivenName = this.getGivenName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "givenName", theGivenName), currentHashCode, theGivenName); } { List theMail; theMail = (((this.mail!= null)&&(!this.mail.isEmpty()))?this.getMail():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "mail", theMail), currentHashCode, theMail); } { String theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } { String theCompany; theCompany = this.getCompany(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "company", theCompany), currentHashCode, theCompany); } { List thePhone; thePhone = (((this.phone!= null)&&(!this.phone.isEmpty()))?this.getPhone():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "phone", thePhone), currentHashCode, thePhone); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } }