jakarta.xml.ns.persistence.orm.Id 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 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.XmlElement;
import jakarta.xml.bind.annotation.XmlSchemaType;
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 Id {}
*
* Java class for id complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "id", propOrder = {
"column",
"generatedValue",
"temporal",
"tableGenerator",
"sequenceGenerator"
})
public class Id implements Cloneable, CopyTo, Equals, HashCode, MergeFrom
{
protected Column column;
@XmlElement(name = "generated-value")
protected GeneratedValue generatedValue;
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "token")
protected String temporal;
@XmlElement(name = "table-generator")
protected TableGenerator tableGenerator;
@XmlElement(name = "sequence-generator")
protected SequenceGenerator sequenceGenerator;
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "access")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String access;
/**
* Gets the value of the column property.
*
* @return
* possible object is
* {@link Column }
*
*/
public Column getColumn() {
return column;
}
/**
* Sets the value of the column property.
*
* @param value
* allowed object is
* {@link Column }
*
*/
public void setColumn(Column value) {
this.column = value;
}
/**
* Gets the value of the generatedValue property.
*
* @return
* possible object is
* {@link GeneratedValue }
*
*/
public GeneratedValue getGeneratedValue() {
return generatedValue;
}
/**
* Sets the value of the generatedValue property.
*
* @param value
* allowed object is
* {@link GeneratedValue }
*
*/
public void setGeneratedValue(GeneratedValue value) {
this.generatedValue = value;
}
/**
* Gets the value of the temporal property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTemporal() {
return temporal;
}
/**
* Sets the value of the temporal property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTemporal(String value) {
this.temporal = value;
}
/**
* Gets the value of the tableGenerator property.
*
* @return
* possible object is
* {@link TableGenerator }
*
*/
public TableGenerator getTableGenerator() {
return tableGenerator;
}
/**
* Sets the value of the tableGenerator property.
*
* @param value
* allowed object is
* {@link TableGenerator }
*
*/
public void setTableGenerator(TableGenerator value) {
this.tableGenerator = value;
}
/**
* Gets the value of the sequenceGenerator property.
*
* @return
* possible object is
* {@link SequenceGenerator }
*
*/
public SequenceGenerator getSequenceGenerator() {
return sequenceGenerator;
}
/**
* Sets the value of the sequenceGenerator property.
*
* @param value
* allowed object is
* {@link SequenceGenerator }
*
*/
public void setSequenceGenerator(SequenceGenerator value) {
this.sequenceGenerator = value;
}
/**
* 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 Id that = ((Id) object);
{
Column lhsColumn;
lhsColumn = this.getColumn();
Column rhsColumn;
rhsColumn = that.getColumn();
if (!strategy.equals(LocatorUtils.property(thisLocator, "column", lhsColumn), LocatorUtils.property(thatLocator, "column", rhsColumn), lhsColumn, rhsColumn, (this.column!= null), (that.column!= null))) {
return false;
}
}
{
GeneratedValue lhsGeneratedValue;
lhsGeneratedValue = this.getGeneratedValue();
GeneratedValue rhsGeneratedValue;
rhsGeneratedValue = that.getGeneratedValue();
if (!strategy.equals(LocatorUtils.property(thisLocator, "generatedValue", lhsGeneratedValue), LocatorUtils.property(thatLocator, "generatedValue", rhsGeneratedValue), lhsGeneratedValue, rhsGeneratedValue, (this.generatedValue!= null), (that.generatedValue!= null))) {
return false;
}
}
{
String lhsTemporal;
lhsTemporal = this.getTemporal();
String rhsTemporal;
rhsTemporal = that.getTemporal();
if (!strategy.equals(LocatorUtils.property(thisLocator, "temporal", lhsTemporal), LocatorUtils.property(thatLocator, "temporal", rhsTemporal), lhsTemporal, rhsTemporal, (this.temporal!= null), (that.temporal!= null))) {
return false;
}
}
{
TableGenerator lhsTableGenerator;
lhsTableGenerator = this.getTableGenerator();
TableGenerator rhsTableGenerator;
rhsTableGenerator = that.getTableGenerator();
if (!strategy.equals(LocatorUtils.property(thisLocator, "tableGenerator", lhsTableGenerator), LocatorUtils.property(thatLocator, "tableGenerator", rhsTableGenerator), lhsTableGenerator, rhsTableGenerator, (this.tableGenerator!= null), (that.tableGenerator!= null))) {
return false;
}
}
{
SequenceGenerator lhsSequenceGenerator;
lhsSequenceGenerator = this.getSequenceGenerator();
SequenceGenerator rhsSequenceGenerator;
rhsSequenceGenerator = that.getSequenceGenerator();
if (!strategy.equals(LocatorUtils.property(thisLocator, "sequenceGenerator", lhsSequenceGenerator), LocatorUtils.property(thatLocator, "sequenceGenerator", rhsSequenceGenerator), lhsSequenceGenerator, rhsSequenceGenerator, (this.sequenceGenerator!= null), (that.sequenceGenerator!= null))) {
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;
{
Column theColumn;
theColumn = this.getColumn();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "column", theColumn), currentHashCode, theColumn, (this.column!= null));
}
{
GeneratedValue theGeneratedValue;
theGeneratedValue = this.getGeneratedValue();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "generatedValue", theGeneratedValue), currentHashCode, theGeneratedValue, (this.generatedValue!= null));
}
{
String theTemporal;
theTemporal = this.getTemporal();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "temporal", theTemporal), currentHashCode, theTemporal, (this.temporal!= null));
}
{
TableGenerator theTableGenerator;
theTableGenerator = this.getTableGenerator();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "tableGenerator", theTableGenerator), currentHashCode, theTableGenerator, (this.tableGenerator!= null));
}
{
SequenceGenerator theSequenceGenerator;
theSequenceGenerator = this.getSequenceGenerator();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sequenceGenerator", theSequenceGenerator), currentHashCode, theSequenceGenerator, (this.sequenceGenerator!= null));
}
{
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 Id) {
final Id copy = ((Id) draftCopy);
{
Boolean columnShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.column!= null));
if (columnShouldBeCopiedAndSet == Boolean.TRUE) {
Column sourceColumn;
sourceColumn = this.getColumn();
Column copyColumn = ((Column) strategy.copy(LocatorUtils.property(locator, "column", sourceColumn), sourceColumn, (this.column!= null)));
copy.setColumn(copyColumn);
} else {
if (columnShouldBeCopiedAndSet == Boolean.FALSE) {
copy.column = null;
}
}
}
{
Boolean generatedValueShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.generatedValue!= null));
if (generatedValueShouldBeCopiedAndSet == Boolean.TRUE) {
GeneratedValue sourceGeneratedValue;
sourceGeneratedValue = this.getGeneratedValue();
GeneratedValue copyGeneratedValue = ((GeneratedValue) strategy.copy(LocatorUtils.property(locator, "generatedValue", sourceGeneratedValue), sourceGeneratedValue, (this.generatedValue!= null)));
copy.setGeneratedValue(copyGeneratedValue);
} else {
if (generatedValueShouldBeCopiedAndSet == Boolean.FALSE) {
copy.generatedValue = null;
}
}
}
{
Boolean temporalShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.temporal!= null));
if (temporalShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceTemporal;
sourceTemporal = this.getTemporal();
String copyTemporal = ((String) strategy.copy(LocatorUtils.property(locator, "temporal", sourceTemporal), sourceTemporal, (this.temporal!= null)));
copy.setTemporal(copyTemporal);
} else {
if (temporalShouldBeCopiedAndSet == Boolean.FALSE) {
copy.temporal = null;
}
}
}
{
Boolean tableGeneratorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.tableGenerator!= null));
if (tableGeneratorShouldBeCopiedAndSet == Boolean.TRUE) {
TableGenerator sourceTableGenerator;
sourceTableGenerator = this.getTableGenerator();
TableGenerator copyTableGenerator = ((TableGenerator) strategy.copy(LocatorUtils.property(locator, "tableGenerator", sourceTableGenerator), sourceTableGenerator, (this.tableGenerator!= null)));
copy.setTableGenerator(copyTableGenerator);
} else {
if (tableGeneratorShouldBeCopiedAndSet == Boolean.FALSE) {
copy.tableGenerator = null;
}
}
}
{
Boolean sequenceGeneratorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.sequenceGenerator!= null));
if (sequenceGeneratorShouldBeCopiedAndSet == Boolean.TRUE) {
SequenceGenerator sourceSequenceGenerator;
sourceSequenceGenerator = this.getSequenceGenerator();
SequenceGenerator copySequenceGenerator = ((SequenceGenerator) strategy.copy(LocatorUtils.property(locator, "sequenceGenerator", sourceSequenceGenerator), sourceSequenceGenerator, (this.sequenceGenerator!= null)));
copy.setSequenceGenerator(copySequenceGenerator);
} else {
if (sequenceGeneratorShouldBeCopiedAndSet == Boolean.FALSE) {
copy.sequenceGenerator = 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 Id();
}
@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 Id) {
final Id target = this;
final Id leftObject = ((Id) left);
final Id rightObject = ((Id) right);
{
Boolean columnShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.column!= null), (rightObject.column!= null));
if (columnShouldBeMergedAndSet == Boolean.TRUE) {
Column lhsColumn;
lhsColumn = leftObject.getColumn();
Column rhsColumn;
rhsColumn = rightObject.getColumn();
Column mergedColumn = ((Column) strategy.merge(LocatorUtils.property(leftLocator, "column", lhsColumn), LocatorUtils.property(rightLocator, "column", rhsColumn), lhsColumn, rhsColumn, (leftObject.column!= null), (rightObject.column!= null)));
target.setColumn(mergedColumn);
} else {
if (columnShouldBeMergedAndSet == Boolean.FALSE) {
target.column = null;
}
}
}
{
Boolean generatedValueShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.generatedValue!= null), (rightObject.generatedValue!= null));
if (generatedValueShouldBeMergedAndSet == Boolean.TRUE) {
GeneratedValue lhsGeneratedValue;
lhsGeneratedValue = leftObject.getGeneratedValue();
GeneratedValue rhsGeneratedValue;
rhsGeneratedValue = rightObject.getGeneratedValue();
GeneratedValue mergedGeneratedValue = ((GeneratedValue) strategy.merge(LocatorUtils.property(leftLocator, "generatedValue", lhsGeneratedValue), LocatorUtils.property(rightLocator, "generatedValue", rhsGeneratedValue), lhsGeneratedValue, rhsGeneratedValue, (leftObject.generatedValue!= null), (rightObject.generatedValue!= null)));
target.setGeneratedValue(mergedGeneratedValue);
} else {
if (generatedValueShouldBeMergedAndSet == Boolean.FALSE) {
target.generatedValue = null;
}
}
}
{
Boolean temporalShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.temporal!= null), (rightObject.temporal!= null));
if (temporalShouldBeMergedAndSet == Boolean.TRUE) {
String lhsTemporal;
lhsTemporal = leftObject.getTemporal();
String rhsTemporal;
rhsTemporal = rightObject.getTemporal();
String mergedTemporal = ((String) strategy.merge(LocatorUtils.property(leftLocator, "temporal", lhsTemporal), LocatorUtils.property(rightLocator, "temporal", rhsTemporal), lhsTemporal, rhsTemporal, (leftObject.temporal!= null), (rightObject.temporal!= null)));
target.setTemporal(mergedTemporal);
} else {
if (temporalShouldBeMergedAndSet == Boolean.FALSE) {
target.temporal = null;
}
}
}
{
Boolean tableGeneratorShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.tableGenerator!= null), (rightObject.tableGenerator!= null));
if (tableGeneratorShouldBeMergedAndSet == Boolean.TRUE) {
TableGenerator lhsTableGenerator;
lhsTableGenerator = leftObject.getTableGenerator();
TableGenerator rhsTableGenerator;
rhsTableGenerator = rightObject.getTableGenerator();
TableGenerator mergedTableGenerator = ((TableGenerator) strategy.merge(LocatorUtils.property(leftLocator, "tableGenerator", lhsTableGenerator), LocatorUtils.property(rightLocator, "tableGenerator", rhsTableGenerator), lhsTableGenerator, rhsTableGenerator, (leftObject.tableGenerator!= null), (rightObject.tableGenerator!= null)));
target.setTableGenerator(mergedTableGenerator);
} else {
if (tableGeneratorShouldBeMergedAndSet == Boolean.FALSE) {
target.tableGenerator = null;
}
}
}
{
Boolean sequenceGeneratorShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.sequenceGenerator!= null), (rightObject.sequenceGenerator!= null));
if (sequenceGeneratorShouldBeMergedAndSet == Boolean.TRUE) {
SequenceGenerator lhsSequenceGenerator;
lhsSequenceGenerator = leftObject.getSequenceGenerator();
SequenceGenerator rhsSequenceGenerator;
rhsSequenceGenerator = rightObject.getSequenceGenerator();
SequenceGenerator mergedSequenceGenerator = ((SequenceGenerator) strategy.merge(LocatorUtils.property(leftLocator, "sequenceGenerator", lhsSequenceGenerator), LocatorUtils.property(rightLocator, "sequenceGenerator", rhsSequenceGenerator), lhsSequenceGenerator, rhsSequenceGenerator, (leftObject.sequenceGenerator!= null), (rightObject.sequenceGenerator!= null)));
target.setSequenceGenerator(mergedSequenceGenerator);
} else {
if (sequenceGeneratorShouldBeMergedAndSet == Boolean.FALSE) {
target.sequenceGenerator = 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;
}
}
}
}
}
}