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

jakarta.xml.ns.persistence.orm.Embeddable 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 jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
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;


/**
 * Defines the settings and mappings for embeddable objects. Is 
 *         allowed to be sparsely populated and used in conjunction with 
 *         the annotations. Alternatively, the metadata-complete attribute 
 *         can be used to indicate that no annotations are to be processed 
 *         in the class. If this is the case then the defaulting rules will 
 *         be recursively applied.
 * 
 *         @Target({TYPE}) @Retention(RUNTIME)
 *         public @interface Embeddable {}
 * 
 * 

Java class for embeddable complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *       
 *       
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "embeddable", propOrder = { "description", "attributes" }) public class Embeddable implements Cloneable, CopyTo, Equals, HashCode, MergeFrom { protected String description; protected EmbeddableAttributes attributes; @XmlAttribute(name = "class", required = true) protected String clazz; @XmlAttribute(name = "access") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String access; @XmlAttribute(name = "metadata-complete") protected Boolean metadataComplete; /** * Gets the value of the description property. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link String } * */ public void setDescription(String value) { this.description = value; } /** * Gets the value of the attributes property. * * @return * possible object is * {@link EmbeddableAttributes } * */ public EmbeddableAttributes getAttributes() { return attributes; } /** * Sets the value of the attributes property. * * @param value * allowed object is * {@link EmbeddableAttributes } * */ public void setAttributes(EmbeddableAttributes value) { this.attributes = value; } /** * Gets the value of the clazz property. * * @return * possible object is * {@link String } * */ public String getClazz() { return clazz; } /** * Sets the value of the clazz property. * * @param value * allowed object is * {@link String } * */ public void setClazz(String value) { this.clazz = 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; } /** * Gets the value of the metadataComplete property. * * @return * possible object is * {@link Boolean } * */ public Boolean isMetadataComplete() { return metadataComplete; } /** * Sets the value of the metadataComplete property. * * @param value * allowed object is * {@link Boolean } * */ public void setMetadataComplete(Boolean value) { this.metadataComplete = 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 Embeddable that = ((Embeddable) object); { String lhsDescription; lhsDescription = this.getDescription(); String rhsDescription; rhsDescription = that.getDescription(); if (!strategy.equals(LocatorUtils.property(thisLocator, "description", lhsDescription), LocatorUtils.property(thatLocator, "description", rhsDescription), lhsDescription, rhsDescription, (this.description!= null), (that.description!= null))) { return false; } } { EmbeddableAttributes lhsAttributes; lhsAttributes = this.getAttributes(); EmbeddableAttributes rhsAttributes; rhsAttributes = that.getAttributes(); if (!strategy.equals(LocatorUtils.property(thisLocator, "attributes", lhsAttributes), LocatorUtils.property(thatLocator, "attributes", rhsAttributes), lhsAttributes, rhsAttributes, (this.attributes!= null), (that.attributes!= null))) { return false; } } { String lhsClazz; lhsClazz = this.getClazz(); String rhsClazz; rhsClazz = that.getClazz(); if (!strategy.equals(LocatorUtils.property(thisLocator, "clazz", lhsClazz), LocatorUtils.property(thatLocator, "clazz", rhsClazz), lhsClazz, rhsClazz, (this.clazz!= null), (that.clazz!= 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; } } { Boolean lhsMetadataComplete; lhsMetadataComplete = this.isMetadataComplete(); Boolean rhsMetadataComplete; rhsMetadataComplete = that.isMetadataComplete(); if (!strategy.equals(LocatorUtils.property(thisLocator, "metadataComplete", lhsMetadataComplete), LocatorUtils.property(thatLocator, "metadataComplete", rhsMetadataComplete), lhsMetadataComplete, rhsMetadataComplete, (this.metadataComplete!= null), (that.metadataComplete!= 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; { String theDescription; theDescription = this.getDescription(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription, (this.description!= null)); } { EmbeddableAttributes theAttributes; theAttributes = this.getAttributes(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "attributes", theAttributes), currentHashCode, theAttributes, (this.attributes!= null)); } { String theClazz; theClazz = this.getClazz(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "clazz", theClazz), currentHashCode, theClazz, (this.clazz!= null)); } { String theAccess; theAccess = this.getAccess(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "access", theAccess), currentHashCode, theAccess, (this.access!= null)); } { Boolean theMetadataComplete; theMetadataComplete = this.isMetadataComplete(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "metadataComplete", theMetadataComplete), currentHashCode, theMetadataComplete, (this.metadataComplete!= 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 Embeddable) { final Embeddable copy = ((Embeddable) draftCopy); { Boolean descriptionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.description!= null)); if (descriptionShouldBeCopiedAndSet == Boolean.TRUE) { String sourceDescription; sourceDescription = this.getDescription(); String copyDescription = ((String) strategy.copy(LocatorUtils.property(locator, "description", sourceDescription), sourceDescription, (this.description!= null))); copy.setDescription(copyDescription); } else { if (descriptionShouldBeCopiedAndSet == Boolean.FALSE) { copy.description = null; } } } { Boolean attributesShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.attributes!= null)); if (attributesShouldBeCopiedAndSet == Boolean.TRUE) { EmbeddableAttributes sourceAttributes; sourceAttributes = this.getAttributes(); EmbeddableAttributes copyAttributes = ((EmbeddableAttributes) strategy.copy(LocatorUtils.property(locator, "attributes", sourceAttributes), sourceAttributes, (this.attributes!= null))); copy.setAttributes(copyAttributes); } else { if (attributesShouldBeCopiedAndSet == Boolean.FALSE) { copy.attributes = null; } } } { Boolean clazzShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.clazz!= null)); if (clazzShouldBeCopiedAndSet == Boolean.TRUE) { String sourceClazz; sourceClazz = this.getClazz(); String copyClazz = ((String) strategy.copy(LocatorUtils.property(locator, "clazz", sourceClazz), sourceClazz, (this.clazz!= null))); copy.setClazz(copyClazz); } else { if (clazzShouldBeCopiedAndSet == Boolean.FALSE) { copy.clazz = 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; } } } { Boolean metadataCompleteShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.metadataComplete!= null)); if (metadataCompleteShouldBeCopiedAndSet == Boolean.TRUE) { Boolean sourceMetadataComplete; sourceMetadataComplete = this.isMetadataComplete(); Boolean copyMetadataComplete = ((Boolean) strategy.copy(LocatorUtils.property(locator, "metadataComplete", sourceMetadataComplete), sourceMetadataComplete, (this.metadataComplete!= null))); copy.setMetadataComplete(copyMetadataComplete); } else { if (metadataCompleteShouldBeCopiedAndSet == Boolean.FALSE) { copy.metadataComplete = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new Embeddable(); } @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 Embeddable) { final Embeddable target = this; final Embeddable leftObject = ((Embeddable) left); final Embeddable rightObject = ((Embeddable) right); { Boolean descriptionShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.description!= null), (rightObject.description!= null)); if (descriptionShouldBeMergedAndSet == Boolean.TRUE) { String lhsDescription; lhsDescription = leftObject.getDescription(); String rhsDescription; rhsDescription = rightObject.getDescription(); String mergedDescription = ((String) strategy.merge(LocatorUtils.property(leftLocator, "description", lhsDescription), LocatorUtils.property(rightLocator, "description", rhsDescription), lhsDescription, rhsDescription, (leftObject.description!= null), (rightObject.description!= null))); target.setDescription(mergedDescription); } else { if (descriptionShouldBeMergedAndSet == Boolean.FALSE) { target.description = null; } } } { Boolean attributesShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.attributes!= null), (rightObject.attributes!= null)); if (attributesShouldBeMergedAndSet == Boolean.TRUE) { EmbeddableAttributes lhsAttributes; lhsAttributes = leftObject.getAttributes(); EmbeddableAttributes rhsAttributes; rhsAttributes = rightObject.getAttributes(); EmbeddableAttributes mergedAttributes = ((EmbeddableAttributes) strategy.merge(LocatorUtils.property(leftLocator, "attributes", lhsAttributes), LocatorUtils.property(rightLocator, "attributes", rhsAttributes), lhsAttributes, rhsAttributes, (leftObject.attributes!= null), (rightObject.attributes!= null))); target.setAttributes(mergedAttributes); } else { if (attributesShouldBeMergedAndSet == Boolean.FALSE) { target.attributes = null; } } } { Boolean clazzShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.clazz!= null), (rightObject.clazz!= null)); if (clazzShouldBeMergedAndSet == Boolean.TRUE) { String lhsClazz; lhsClazz = leftObject.getClazz(); String rhsClazz; rhsClazz = rightObject.getClazz(); String mergedClazz = ((String) strategy.merge(LocatorUtils.property(leftLocator, "clazz", lhsClazz), LocatorUtils.property(rightLocator, "clazz", rhsClazz), lhsClazz, rhsClazz, (leftObject.clazz!= null), (rightObject.clazz!= null))); target.setClazz(mergedClazz); } else { if (clazzShouldBeMergedAndSet == Boolean.FALSE) { target.clazz = 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; } } } { Boolean metadataCompleteShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.metadataComplete!= null), (rightObject.metadataComplete!= null)); if (metadataCompleteShouldBeMergedAndSet == Boolean.TRUE) { Boolean lhsMetadataComplete; lhsMetadataComplete = leftObject.isMetadataComplete(); Boolean rhsMetadataComplete; rhsMetadataComplete = rightObject.isMetadataComplete(); Boolean mergedMetadataComplete = ((Boolean) strategy.merge(LocatorUtils.property(leftLocator, "metadataComplete", lhsMetadataComplete), LocatorUtils.property(rightLocator, "metadataComplete", rhsMetadataComplete), lhsMetadataComplete, rhsMetadataComplete, (leftObject.metadataComplete!= null), (rightObject.metadataComplete!= null))); target.setMetadataComplete(mergedMetadataComplete); } else { if (metadataCompleteShouldBeMergedAndSet == Boolean.FALSE) { target.metadataComplete = null; } } } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy