no.difi.begrep.sdp.schema_v10.SDPMottaker Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.07.08 at 09:17:24 AM CEST
//
package no.difi.begrep.sdp.schema_v10;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
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;
/**
* Java class for Mottaker complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Mottaker">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <choice>
* <element name="person" type="{http://begrep.difi.no/sdp/schema_v10}Person"/>
* <element name="virksomhet" type="{http://begrep.difi.no/sdp/schema_v10}Virksomhet"/>
* </choice>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Mottaker", propOrder = {
"virksomhet",
"person"
})
public class SDPMottaker implements Equals, HashCode, ToString
{
protected SDPVirksomhet virksomhet;
protected SDPPerson person;
/**
* Default no-arg constructor
*
*/
public SDPMottaker() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public SDPMottaker(final SDPVirksomhet virksomhet, final SDPPerson person) {
this.virksomhet = virksomhet;
this.person = person;
}
/**
* Gets the value of the virksomhet property.
*
* @return
* possible object is
* {@link SDPVirksomhet }
*
*/
public SDPVirksomhet getVirksomhet() {
return virksomhet;
}
/**
* Sets the value of the virksomhet property.
*
* @param value
* allowed object is
* {@link SDPVirksomhet }
*
*/
public void setVirksomhet(SDPVirksomhet value) {
this.virksomhet = value;
}
/**
* Gets the value of the person property.
*
* @return
* possible object is
* {@link SDPPerson }
*
*/
public SDPPerson getPerson() {
return person;
}
/**
* Sets the value of the person property.
*
* @param value
* allowed object is
* {@link SDPPerson }
*
*/
public void setPerson(SDPPerson value) {
this.person = 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) {
{
SDPVirksomhet theVirksomhet;
theVirksomhet = this.getVirksomhet();
strategy.appendField(locator, this, "virksomhet", buffer, theVirksomhet);
}
{
SDPPerson thePerson;
thePerson = this.getPerson();
strategy.appendField(locator, this, "person", buffer, thePerson);
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof SDPMottaker)) {
return false;
}
if (this == object) {
return true;
}
final SDPMottaker that = ((SDPMottaker) object);
{
SDPVirksomhet lhsVirksomhet;
lhsVirksomhet = this.getVirksomhet();
SDPVirksomhet rhsVirksomhet;
rhsVirksomhet = that.getVirksomhet();
if (!strategy.equals(LocatorUtils.property(thisLocator, "virksomhet", lhsVirksomhet), LocatorUtils.property(thatLocator, "virksomhet", rhsVirksomhet), lhsVirksomhet, rhsVirksomhet)) {
return false;
}
}
{
SDPPerson lhsPerson;
lhsPerson = this.getPerson();
SDPPerson rhsPerson;
rhsPerson = that.getPerson();
if (!strategy.equals(LocatorUtils.property(thisLocator, "person", lhsPerson), LocatorUtils.property(thatLocator, "person", rhsPerson), lhsPerson, rhsPerson)) {
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;
{
SDPVirksomhet theVirksomhet;
theVirksomhet = this.getVirksomhet();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "virksomhet", theVirksomhet), currentHashCode, theVirksomhet);
}
{
SDPPerson thePerson;
thePerson = this.getPerson();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "person", thePerson), currentHashCode, thePerson);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public SDPMottaker withVirksomhet(SDPVirksomhet value) {
setVirksomhet(value);
return this;
}
public SDPMottaker withPerson(SDPPerson value) {
setPerson(value);
return this;
}
}