org.jvnet.hyperjaxb3.ejb.schemas.customizations.SingleProperty Maven / Gradle / Ivy
//
// This file was generated by the Eclipse Implementation of JAXB, v4.0.5
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
//
package org.jvnet.hyperjaxb3.ejb.schemas.customizations;
import javax.xml.namespace.QName;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.Equals;
import org.jvnet.jaxb.lang.EqualsStrategy;
import org.jvnet.jaxb.lang.HashCode;
import org.jvnet.jaxb.lang.HashCodeStrategy;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb.lang.JAXBMergeStrategy;
import org.jvnet.jaxb.lang.MergeFrom;
import org.jvnet.jaxb.lang.MergeStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;
/**
* Java class for single-property complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "single-property", propOrder = {
"basic",
"oneToOne",
"manyToOne",
"embedded"
})
public class SingleProperty implements Cloneable, CopyTo, Equals, HashCode, MergeFrom
{
protected Basic basic;
@XmlElement(name = "one-to-one")
protected OneToOne oneToOne;
@XmlElement(name = "many-to-one")
protected ManyToOne manyToOne;
protected Embedded embedded;
@XmlAttribute(name = "type", required = true)
protected QName type;
/**
* Gets the value of the basic property.
*
* @return
* possible object is
* {@link Basic }
*
*/
public Basic getBasic() {
return basic;
}
/**
* Sets the value of the basic property.
*
* @param value
* allowed object is
* {@link Basic }
*
*/
public void setBasic(Basic value) {
this.basic = value;
}
/**
* Gets the value of the oneToOne property.
*
* @return
* possible object is
* {@link OneToOne }
*
*/
public OneToOne getOneToOne() {
return oneToOne;
}
/**
* Sets the value of the oneToOne property.
*
* @param value
* allowed object is
* {@link OneToOne }
*
*/
public void setOneToOne(OneToOne value) {
this.oneToOne = value;
}
/**
* Gets the value of the manyToOne property.
*
* @return
* possible object is
* {@link ManyToOne }
*
*/
public ManyToOne getManyToOne() {
return manyToOne;
}
/**
* Sets the value of the manyToOne property.
*
* @param value
* allowed object is
* {@link ManyToOne }
*
*/
public void setManyToOne(ManyToOne value) {
this.manyToOne = value;
}
/**
* Gets the value of the embedded property.
*
* @return
* possible object is
* {@link Embedded }
*
*/
public Embedded getEmbedded() {
return embedded;
}
/**
* Sets the value of the embedded property.
*
* @param value
* allowed object is
* {@link Embedded }
*
*/
public void setEmbedded(Embedded value) {
this.embedded = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link QName }
*
*/
public QName getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link QName }
*
*/
public void setType(QName value) {
this.type = value;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final SingleProperty that = ((SingleProperty) object);
{
Basic lhsBasic;
lhsBasic = this.getBasic();
Basic rhsBasic;
rhsBasic = that.getBasic();
if (!strategy.equals(LocatorUtils.property(thisLocator, "basic", lhsBasic), LocatorUtils.property(thatLocator, "basic", rhsBasic), lhsBasic, rhsBasic, (this.basic!= null), (that.basic!= null))) {
return false;
}
}
{
OneToOne lhsOneToOne;
lhsOneToOne = this.getOneToOne();
OneToOne rhsOneToOne;
rhsOneToOne = that.getOneToOne();
if (!strategy.equals(LocatorUtils.property(thisLocator, "oneToOne", lhsOneToOne), LocatorUtils.property(thatLocator, "oneToOne", rhsOneToOne), lhsOneToOne, rhsOneToOne, (this.oneToOne!= null), (that.oneToOne!= null))) {
return false;
}
}
{
ManyToOne lhsManyToOne;
lhsManyToOne = this.getManyToOne();
ManyToOne rhsManyToOne;
rhsManyToOne = that.getManyToOne();
if (!strategy.equals(LocatorUtils.property(thisLocator, "manyToOne", lhsManyToOne), LocatorUtils.property(thatLocator, "manyToOne", rhsManyToOne), lhsManyToOne, rhsManyToOne, (this.manyToOne!= null), (that.manyToOne!= null))) {
return false;
}
}
{
Embedded lhsEmbedded;
lhsEmbedded = this.getEmbedded();
Embedded rhsEmbedded;
rhsEmbedded = that.getEmbedded();
if (!strategy.equals(LocatorUtils.property(thisLocator, "embedded", lhsEmbedded), LocatorUtils.property(thatLocator, "embedded", rhsEmbedded), lhsEmbedded, rhsEmbedded, (this.embedded!= null), (that.embedded!= null))) {
return false;
}
}
{
QName lhsType;
lhsType = this.getType();
QName rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
Basic theBasic;
theBasic = this.getBasic();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "basic", theBasic), currentHashCode, theBasic, (this.basic!= null));
}
{
OneToOne theOneToOne;
theOneToOne = this.getOneToOne();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "oneToOne", theOneToOne), currentHashCode, theOneToOne, (this.oneToOne!= null));
}
{
ManyToOne theManyToOne;
theManyToOne = this.getManyToOne();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "manyToOne", theManyToOne), currentHashCode, theManyToOne, (this.manyToOne!= null));
}
{
Embedded theEmbedded;
theEmbedded = this.getEmbedded();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "embedded", theEmbedded), currentHashCode, theEmbedded, (this.embedded!= null));
}
{
QName theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
@Override
public Object clone() {
return copyTo(createNewInstance());
}
@Override
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.getInstance();
return copyTo(null, target, strategy);
}
@Override
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof SingleProperty) {
final SingleProperty copy = ((SingleProperty) draftCopy);
{
Boolean basicShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.basic!= null));
if (basicShouldBeCopiedAndSet == Boolean.TRUE) {
Basic sourceBasic;
sourceBasic = this.getBasic();
Basic copyBasic = ((Basic) strategy.copy(LocatorUtils.property(locator, "basic", sourceBasic), sourceBasic, (this.basic!= null)));
copy.setBasic(copyBasic);
} else {
if (basicShouldBeCopiedAndSet == Boolean.FALSE) {
copy.basic = null;
}
}
}
{
Boolean oneToOneShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.oneToOne!= null));
if (oneToOneShouldBeCopiedAndSet == Boolean.TRUE) {
OneToOne sourceOneToOne;
sourceOneToOne = this.getOneToOne();
OneToOne copyOneToOne = ((OneToOne) strategy.copy(LocatorUtils.property(locator, "oneToOne", sourceOneToOne), sourceOneToOne, (this.oneToOne!= null)));
copy.setOneToOne(copyOneToOne);
} else {
if (oneToOneShouldBeCopiedAndSet == Boolean.FALSE) {
copy.oneToOne = null;
}
}
}
{
Boolean manyToOneShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.manyToOne!= null));
if (manyToOneShouldBeCopiedAndSet == Boolean.TRUE) {
ManyToOne sourceManyToOne;
sourceManyToOne = this.getManyToOne();
ManyToOne copyManyToOne = ((ManyToOne) strategy.copy(LocatorUtils.property(locator, "manyToOne", sourceManyToOne), sourceManyToOne, (this.manyToOne!= null)));
copy.setManyToOne(copyManyToOne);
} else {
if (manyToOneShouldBeCopiedAndSet == Boolean.FALSE) {
copy.manyToOne = null;
}
}
}
{
Boolean embeddedShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.embedded!= null));
if (embeddedShouldBeCopiedAndSet == Boolean.TRUE) {
Embedded sourceEmbedded;
sourceEmbedded = this.getEmbedded();
Embedded copyEmbedded = ((Embedded) strategy.copy(LocatorUtils.property(locator, "embedded", sourceEmbedded), sourceEmbedded, (this.embedded!= null)));
copy.setEmbedded(copyEmbedded);
} else {
if (embeddedShouldBeCopiedAndSet == Boolean.FALSE) {
copy.embedded = null;
}
}
}
{
Boolean typeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.type!= null));
if (typeShouldBeCopiedAndSet == Boolean.TRUE) {
QName sourceType;
sourceType = this.getType();
QName copyType = ((QName) strategy.copy(LocatorUtils.property(locator, "type", sourceType), sourceType, (this.type!= null)));
copy.setType(copyType);
} else {
if (typeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.type = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new SingleProperty();
}
@Override
public void mergeFrom(Object left, Object right) {
final MergeStrategy strategy = JAXBMergeStrategy.getInstance();
mergeFrom(null, null, left, right, strategy);
}
@Override
public void mergeFrom(ObjectLocator leftLocator, ObjectLocator rightLocator, Object left, Object right, MergeStrategy strategy) {
if (right instanceof SingleProperty) {
final SingleProperty target = this;
final SingleProperty leftObject = ((SingleProperty) left);
final SingleProperty rightObject = ((SingleProperty) right);
{
Boolean basicShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.basic!= null), (rightObject.basic!= null));
if (basicShouldBeMergedAndSet == Boolean.TRUE) {
Basic lhsBasic;
lhsBasic = leftObject.getBasic();
Basic rhsBasic;
rhsBasic = rightObject.getBasic();
Basic mergedBasic = ((Basic) strategy.merge(LocatorUtils.property(leftLocator, "basic", lhsBasic), LocatorUtils.property(rightLocator, "basic", rhsBasic), lhsBasic, rhsBasic, (leftObject.basic!= null), (rightObject.basic!= null)));
target.setBasic(mergedBasic);
} else {
if (basicShouldBeMergedAndSet == Boolean.FALSE) {
target.basic = null;
}
}
}
{
Boolean oneToOneShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.oneToOne!= null), (rightObject.oneToOne!= null));
if (oneToOneShouldBeMergedAndSet == Boolean.TRUE) {
OneToOne lhsOneToOne;
lhsOneToOne = leftObject.getOneToOne();
OneToOne rhsOneToOne;
rhsOneToOne = rightObject.getOneToOne();
OneToOne mergedOneToOne = ((OneToOne) strategy.merge(LocatorUtils.property(leftLocator, "oneToOne", lhsOneToOne), LocatorUtils.property(rightLocator, "oneToOne", rhsOneToOne), lhsOneToOne, rhsOneToOne, (leftObject.oneToOne!= null), (rightObject.oneToOne!= null)));
target.setOneToOne(mergedOneToOne);
} else {
if (oneToOneShouldBeMergedAndSet == Boolean.FALSE) {
target.oneToOne = null;
}
}
}
{
Boolean manyToOneShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.manyToOne!= null), (rightObject.manyToOne!= null));
if (manyToOneShouldBeMergedAndSet == Boolean.TRUE) {
ManyToOne lhsManyToOne;
lhsManyToOne = leftObject.getManyToOne();
ManyToOne rhsManyToOne;
rhsManyToOne = rightObject.getManyToOne();
ManyToOne mergedManyToOne = ((ManyToOne) strategy.merge(LocatorUtils.property(leftLocator, "manyToOne", lhsManyToOne), LocatorUtils.property(rightLocator, "manyToOne", rhsManyToOne), lhsManyToOne, rhsManyToOne, (leftObject.manyToOne!= null), (rightObject.manyToOne!= null)));
target.setManyToOne(mergedManyToOne);
} else {
if (manyToOneShouldBeMergedAndSet == Boolean.FALSE) {
target.manyToOne = null;
}
}
}
{
Boolean embeddedShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.embedded!= null), (rightObject.embedded!= null));
if (embeddedShouldBeMergedAndSet == Boolean.TRUE) {
Embedded lhsEmbedded;
lhsEmbedded = leftObject.getEmbedded();
Embedded rhsEmbedded;
rhsEmbedded = rightObject.getEmbedded();
Embedded mergedEmbedded = ((Embedded) strategy.merge(LocatorUtils.property(leftLocator, "embedded", lhsEmbedded), LocatorUtils.property(rightLocator, "embedded", rhsEmbedded), lhsEmbedded, rhsEmbedded, (leftObject.embedded!= null), (rightObject.embedded!= null)));
target.setEmbedded(mergedEmbedded);
} else {
if (embeddedShouldBeMergedAndSet == Boolean.FALSE) {
target.embedded = null;
}
}
}
{
Boolean typeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.type!= null), (rightObject.type!= null));
if (typeShouldBeMergedAndSet == Boolean.TRUE) {
QName lhsType;
lhsType = leftObject.getType();
QName rhsType;
rhsType = rightObject.getType();
QName mergedType = ((QName) strategy.merge(LocatorUtils.property(leftLocator, "type", lhsType), LocatorUtils.property(rightLocator, "type", rhsType), lhsType, rhsType, (leftObject.type!= null), (rightObject.type!= null)));
target.setType(mergedType);
} else {
if (typeShouldBeMergedAndSet == Boolean.FALSE) {
target.type = null;
}
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy