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

jakarta.xml.ns.persistence.orm.Inheritance 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;


/**
 * @Target({TYPE}) @Retention(RUNTIME)
 *         public @interface Inheritance {
 *           InheritanceType strategy() default SINGLE_TABLE;
 *         }
 * 
 * 

Java class for inheritance complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "inheritance") public class Inheritance implements Cloneable, CopyTo, Equals, HashCode, MergeFrom { @XmlAttribute(name = "strategy") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String strategy; /** * Gets the value of the strategy property. * * @return * possible object is * {@link String } * */ public String getStrategy() { return strategy; } /** * Sets the value of the strategy property. * * @param value * allowed object is * {@link String } * */ public void setStrategy(String value) { this.strategy = 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 Inheritance that = ((Inheritance) object); { String lhsStrategy; lhsStrategy = this.getStrategy(); String rhsStrategy; rhsStrategy = that.getStrategy(); if (!strategy.equals(LocatorUtils.property(thisLocator, "strategy", lhsStrategy), LocatorUtils.property(thatLocator, "strategy", rhsStrategy), lhsStrategy, rhsStrategy, (this.strategy!= null), (that.strategy!= 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 theStrategy; theStrategy = this.getStrategy(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "strategy", theStrategy), currentHashCode, theStrategy, (this.strategy!= 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 Inheritance) { final Inheritance copy = ((Inheritance) draftCopy); { Boolean strategyShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.strategy!= null)); if (strategyShouldBeCopiedAndSet == Boolean.TRUE) { String sourceStrategy; sourceStrategy = this.getStrategy(); String copyStrategy = ((String) strategy.copy(LocatorUtils.property(locator, "strategy", sourceStrategy), sourceStrategy, (this.strategy!= null))); copy.setStrategy(copyStrategy); } else { if (strategyShouldBeCopiedAndSet == Boolean.FALSE) { copy.strategy = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new Inheritance(); } @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 Inheritance) { final Inheritance target = this; final Inheritance leftObject = ((Inheritance) left); final Inheritance rightObject = ((Inheritance) right); { Boolean strategyShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.strategy!= null), (rightObject.strategy!= null)); if (strategyShouldBeMergedAndSet == Boolean.TRUE) { String lhsStrategy; lhsStrategy = leftObject.getStrategy(); String rhsStrategy; rhsStrategy = rightObject.getStrategy(); String mergedStrategy = ((String) strategy.merge(LocatorUtils.property(leftLocator, "strategy", lhsStrategy), LocatorUtils.property(rightLocator, "strategy", rhsStrategy), lhsStrategy, rhsStrategy, (leftObject.strategy!= null), (rightObject.strategy!= null))); target.setStrategy(mergedStrategy); } else { if (strategyShouldBeMergedAndSet == Boolean.FALSE) { target.strategy = null; } } } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy