All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jakarta.xml.ns.persistence.orm.Embedded Maven / Gradle / Ivy

There is a newer version: 4.0.8
Show newest version
//
// 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 jakarta.xml.ns.persistence.orm;

import java.util.ArrayList;
import java.util.List;
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 jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
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;


/**
 * @Target({METHOD, FIELD}) @Retention(RUNTIME)
 *         public @interface Embedded {}
 * 
 * 

Java class for embedded complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *         
 *       
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "embedded", propOrder = { "attributeOverride", "associationOverride", "convert" }) public class Embedded implements Cloneable, CopyTo, Equals, HashCode, MergeFrom { @XmlElement(name = "attribute-override") protected List attributeOverride; @XmlElement(name = "association-override") protected List associationOverride; protected List convert; @XmlAttribute(name = "name", required = true) protected String name; @XmlAttribute(name = "access") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String access; /** * Gets the value of the attributeOverride 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 attributeOverride property.

* *

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

*
     * getAttributeOverride().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link AttributeOverride } *

* * * @return * The value of the attributeOverride property. */ public List getAttributeOverride() { if (attributeOverride == null) { attributeOverride = new ArrayList<>(); } return this.attributeOverride; } /** * Gets the value of the associationOverride 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 associationOverride property.

* *

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

*
     * getAssociationOverride().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link AssociationOverride } *

* * * @return * The value of the associationOverride property. */ public List getAssociationOverride() { if (associationOverride == null) { associationOverride = new ArrayList<>(); } return this.associationOverride; } /** * Gets the value of the convert 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 convert property.

* *

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

*
     * getConvert().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Convert } *

* * * @return * The value of the convert property. */ public List getConvert() { if (convert == null) { convert = new ArrayList<>(); } return this.convert; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the access property. * * @return * possible object is * {@link String } * */ public String getAccess() { return access; } /** * Sets the value of the access property. * * @param value * allowed object is * {@link String } * */ public void setAccess(String value) { this.access = 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 Embedded that = ((Embedded) object); { List lhsAttributeOverride; lhsAttributeOverride = (((this.attributeOverride!= null)&&(!this.attributeOverride.isEmpty()))?this.getAttributeOverride():null); List rhsAttributeOverride; rhsAttributeOverride = (((that.attributeOverride!= null)&&(!that.attributeOverride.isEmpty()))?that.getAttributeOverride():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "attributeOverride", lhsAttributeOverride), LocatorUtils.property(thatLocator, "attributeOverride", rhsAttributeOverride), lhsAttributeOverride, rhsAttributeOverride, ((this.attributeOverride!= null)&&(!this.attributeOverride.isEmpty())), ((that.attributeOverride!= null)&&(!that.attributeOverride.isEmpty())))) { return false; } } { List lhsAssociationOverride; lhsAssociationOverride = (((this.associationOverride!= null)&&(!this.associationOverride.isEmpty()))?this.getAssociationOverride():null); List rhsAssociationOverride; rhsAssociationOverride = (((that.associationOverride!= null)&&(!that.associationOverride.isEmpty()))?that.getAssociationOverride():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "associationOverride", lhsAssociationOverride), LocatorUtils.property(thatLocator, "associationOverride", rhsAssociationOverride), lhsAssociationOverride, rhsAssociationOverride, ((this.associationOverride!= null)&&(!this.associationOverride.isEmpty())), ((that.associationOverride!= null)&&(!that.associationOverride.isEmpty())))) { return false; } } { List lhsConvert; lhsConvert = (((this.convert!= null)&&(!this.convert.isEmpty()))?this.getConvert():null); List rhsConvert; rhsConvert = (((that.convert!= null)&&(!that.convert.isEmpty()))?that.getConvert():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "convert", lhsConvert), LocatorUtils.property(thatLocator, "convert", rhsConvert), lhsConvert, rhsConvert, ((this.convert!= null)&&(!this.convert.isEmpty())), ((that.convert!= null)&&(!that.convert.isEmpty())))) { return false; } } { String lhsName; lhsName = this.getName(); String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, (this.name!= null), (that.name!= null))) { return false; } } { String lhsAccess; lhsAccess = this.getAccess(); String rhsAccess; rhsAccess = that.getAccess(); if (!strategy.equals(LocatorUtils.property(thisLocator, "access", lhsAccess), LocatorUtils.property(thatLocator, "access", rhsAccess), lhsAccess, rhsAccess, (this.access!= null), (that.access!= 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; { List theAttributeOverride; theAttributeOverride = (((this.attributeOverride!= null)&&(!this.attributeOverride.isEmpty()))?this.getAttributeOverride():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "attributeOverride", theAttributeOverride), currentHashCode, theAttributeOverride, ((this.attributeOverride!= null)&&(!this.attributeOverride.isEmpty()))); } { List theAssociationOverride; theAssociationOverride = (((this.associationOverride!= null)&&(!this.associationOverride.isEmpty()))?this.getAssociationOverride():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "associationOverride", theAssociationOverride), currentHashCode, theAssociationOverride, ((this.associationOverride!= null)&&(!this.associationOverride.isEmpty()))); } { List theConvert; theConvert = (((this.convert!= null)&&(!this.convert.isEmpty()))?this.getConvert():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "convert", theConvert), currentHashCode, theConvert, ((this.convert!= null)&&(!this.convert.isEmpty()))); } { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, (this.name!= null)); } { String theAccess; theAccess = this.getAccess(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "access", theAccess), currentHashCode, theAccess, (this.access!= 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 Embedded) { final Embedded copy = ((Embedded) draftCopy); { Boolean attributeOverrideShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.attributeOverride!= null)&&(!this.attributeOverride.isEmpty()))); if (attributeOverrideShouldBeCopiedAndSet == Boolean.TRUE) { List sourceAttributeOverride; sourceAttributeOverride = (((this.attributeOverride!= null)&&(!this.attributeOverride.isEmpty()))?this.getAttributeOverride():null); @SuppressWarnings("unchecked") List copyAttributeOverride = ((List ) strategy.copy(LocatorUtils.property(locator, "attributeOverride", sourceAttributeOverride), sourceAttributeOverride, ((this.attributeOverride!= null)&&(!this.attributeOverride.isEmpty())))); copy.attributeOverride = null; if (copyAttributeOverride!= null) { List uniqueAttributeOverridel = copy.getAttributeOverride(); uniqueAttributeOverridel.addAll(copyAttributeOverride); } } else { if (attributeOverrideShouldBeCopiedAndSet == Boolean.FALSE) { copy.attributeOverride = null; } } } { Boolean associationOverrideShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.associationOverride!= null)&&(!this.associationOverride.isEmpty()))); if (associationOverrideShouldBeCopiedAndSet == Boolean.TRUE) { List sourceAssociationOverride; sourceAssociationOverride = (((this.associationOverride!= null)&&(!this.associationOverride.isEmpty()))?this.getAssociationOverride():null); @SuppressWarnings("unchecked") List copyAssociationOverride = ((List ) strategy.copy(LocatorUtils.property(locator, "associationOverride", sourceAssociationOverride), sourceAssociationOverride, ((this.associationOverride!= null)&&(!this.associationOverride.isEmpty())))); copy.associationOverride = null; if (copyAssociationOverride!= null) { List uniqueAssociationOverridel = copy.getAssociationOverride(); uniqueAssociationOverridel.addAll(copyAssociationOverride); } } else { if (associationOverrideShouldBeCopiedAndSet == Boolean.FALSE) { copy.associationOverride = null; } } } { Boolean convertShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.convert!= null)&&(!this.convert.isEmpty()))); if (convertShouldBeCopiedAndSet == Boolean.TRUE) { List sourceConvert; sourceConvert = (((this.convert!= null)&&(!this.convert.isEmpty()))?this.getConvert():null); @SuppressWarnings("unchecked") List copyConvert = ((List ) strategy.copy(LocatorUtils.property(locator, "convert", sourceConvert), sourceConvert, ((this.convert!= null)&&(!this.convert.isEmpty())))); copy.convert = null; if (copyConvert!= null) { List uniqueConvertl = copy.getConvert(); uniqueConvertl.addAll(copyConvert); } } else { if (convertShouldBeCopiedAndSet == Boolean.FALSE) { copy.convert = null; } } } { Boolean nameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.name!= null)); if (nameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceName; sourceName = this.getName(); String copyName = ((String) strategy.copy(LocatorUtils.property(locator, "name", sourceName), sourceName, (this.name!= null))); copy.setName(copyName); } else { if (nameShouldBeCopiedAndSet == Boolean.FALSE) { copy.name = null; } } } { Boolean accessShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.access!= null)); if (accessShouldBeCopiedAndSet == Boolean.TRUE) { String sourceAccess; sourceAccess = this.getAccess(); String copyAccess = ((String) strategy.copy(LocatorUtils.property(locator, "access", sourceAccess), sourceAccess, (this.access!= null))); copy.setAccess(copyAccess); } else { if (accessShouldBeCopiedAndSet == Boolean.FALSE) { copy.access = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new Embedded(); } @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 Embedded) { final Embedded target = this; final Embedded leftObject = ((Embedded) left); final Embedded rightObject = ((Embedded) right); { Boolean attributeOverrideShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, ((leftObject.attributeOverride!= null)&&(!leftObject.attributeOverride.isEmpty())), ((rightObject.attributeOverride!= null)&&(!rightObject.attributeOverride.isEmpty()))); if (attributeOverrideShouldBeMergedAndSet == Boolean.TRUE) { List lhsAttributeOverride; lhsAttributeOverride = (((leftObject.attributeOverride!= null)&&(!leftObject.attributeOverride.isEmpty()))?leftObject.getAttributeOverride():null); List rhsAttributeOverride; rhsAttributeOverride = (((rightObject.attributeOverride!= null)&&(!rightObject.attributeOverride.isEmpty()))?rightObject.getAttributeOverride():null); List mergedAttributeOverride = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "attributeOverride", lhsAttributeOverride), LocatorUtils.property(rightLocator, "attributeOverride", rhsAttributeOverride), lhsAttributeOverride, rhsAttributeOverride, ((leftObject.attributeOverride!= null)&&(!leftObject.attributeOverride.isEmpty())), ((rightObject.attributeOverride!= null)&&(!rightObject.attributeOverride.isEmpty())))); target.attributeOverride = null; if (mergedAttributeOverride!= null) { List uniqueAttributeOverridel = target.getAttributeOverride(); uniqueAttributeOverridel.addAll(mergedAttributeOverride); } } else { if (attributeOverrideShouldBeMergedAndSet == Boolean.FALSE) { target.attributeOverride = null; } } } { Boolean associationOverrideShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, ((leftObject.associationOverride!= null)&&(!leftObject.associationOverride.isEmpty())), ((rightObject.associationOverride!= null)&&(!rightObject.associationOverride.isEmpty()))); if (associationOverrideShouldBeMergedAndSet == Boolean.TRUE) { List lhsAssociationOverride; lhsAssociationOverride = (((leftObject.associationOverride!= null)&&(!leftObject.associationOverride.isEmpty()))?leftObject.getAssociationOverride():null); List rhsAssociationOverride; rhsAssociationOverride = (((rightObject.associationOverride!= null)&&(!rightObject.associationOverride.isEmpty()))?rightObject.getAssociationOverride():null); List mergedAssociationOverride = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "associationOverride", lhsAssociationOverride), LocatorUtils.property(rightLocator, "associationOverride", rhsAssociationOverride), lhsAssociationOverride, rhsAssociationOverride, ((leftObject.associationOverride!= null)&&(!leftObject.associationOverride.isEmpty())), ((rightObject.associationOverride!= null)&&(!rightObject.associationOverride.isEmpty())))); target.associationOverride = null; if (mergedAssociationOverride!= null) { List uniqueAssociationOverridel = target.getAssociationOverride(); uniqueAssociationOverridel.addAll(mergedAssociationOverride); } } else { if (associationOverrideShouldBeMergedAndSet == Boolean.FALSE) { target.associationOverride = null; } } } { Boolean convertShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, ((leftObject.convert!= null)&&(!leftObject.convert.isEmpty())), ((rightObject.convert!= null)&&(!rightObject.convert.isEmpty()))); if (convertShouldBeMergedAndSet == Boolean.TRUE) { List lhsConvert; lhsConvert = (((leftObject.convert!= null)&&(!leftObject.convert.isEmpty()))?leftObject.getConvert():null); List rhsConvert; rhsConvert = (((rightObject.convert!= null)&&(!rightObject.convert.isEmpty()))?rightObject.getConvert():null); List mergedConvert = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "convert", lhsConvert), LocatorUtils.property(rightLocator, "convert", rhsConvert), lhsConvert, rhsConvert, ((leftObject.convert!= null)&&(!leftObject.convert.isEmpty())), ((rightObject.convert!= null)&&(!rightObject.convert.isEmpty())))); target.convert = null; if (mergedConvert!= null) { List uniqueConvertl = target.getConvert(); uniqueConvertl.addAll(mergedConvert); } } else { if (convertShouldBeMergedAndSet == Boolean.FALSE) { target.convert = null; } } } { Boolean nameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.name!= null), (rightObject.name!= null)); if (nameShouldBeMergedAndSet == Boolean.TRUE) { String lhsName; lhsName = leftObject.getName(); String rhsName; rhsName = rightObject.getName(); String mergedName = ((String) strategy.merge(LocatorUtils.property(leftLocator, "name", lhsName), LocatorUtils.property(rightLocator, "name", rhsName), lhsName, rhsName, (leftObject.name!= null), (rightObject.name!= null))); target.setName(mergedName); } else { if (nameShouldBeMergedAndSet == Boolean.FALSE) { target.name = null; } } } { Boolean accessShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.access!= null), (rightObject.access!= null)); if (accessShouldBeMergedAndSet == Boolean.TRUE) { String lhsAccess; lhsAccess = leftObject.getAccess(); String rhsAccess; rhsAccess = rightObject.getAccess(); String mergedAccess = ((String) strategy.merge(LocatorUtils.property(leftLocator, "access", lhsAccess), LocatorUtils.property(rightLocator, "access", rhsAccess), lhsAccess, rhsAccess, (leftObject.access!= null), (rightObject.access!= null))); target.setAccess(mergedAccess); } else { if (accessShouldBeMergedAndSet == Boolean.FALSE) { target.access = null; } } } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy