org.jvnet.hyperjaxb3.ejb.schemas.customizations.Embedded 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 jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
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 embedded complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "embedded")
public class Embedded
extends jakarta.xml.ns.persistence.orm.Embedded
implements Cloneable, Mergeable, CopyTo, Equals, HashCode, MergeFrom
{
@XmlAttribute(name = "merge")
protected Boolean merge;
@XmlAttribute(name = "columnNamePrefix")
protected String columnNamePrefix;
/**
* Gets the value of the merge property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isMerge() {
if (merge == null) {
return true;
} else {
return merge;
}
}
/**
* Sets the value of the merge property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setMerge(Boolean value) {
this.merge = value;
}
/**
* Gets the value of the columnNamePrefix property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getColumnNamePrefix() {
return columnNamePrefix;
}
/**
* Sets the value of the columnNamePrefix property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setColumnNamePrefix(String value) {
this.columnNamePrefix = 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;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final Embedded that = ((Embedded) object);
{
boolean lhsMerge;
lhsMerge = ((this.merge!= null)?this.isMerge():true);
boolean rhsMerge;
rhsMerge = ((that.merge!= null)?that.isMerge():true);
if (!strategy.equals(LocatorUtils.property(thisLocator, "merge", lhsMerge), LocatorUtils.property(thatLocator, "merge", rhsMerge), lhsMerge, rhsMerge, (this.merge!= null), (that.merge!= null))) {
return false;
}
}
{
String lhsColumnNamePrefix;
lhsColumnNamePrefix = this.getColumnNamePrefix();
String rhsColumnNamePrefix;
rhsColumnNamePrefix = that.getColumnNamePrefix();
if (!strategy.equals(LocatorUtils.property(thisLocator, "columnNamePrefix", lhsColumnNamePrefix), LocatorUtils.property(thatLocator, "columnNamePrefix", rhsColumnNamePrefix), lhsColumnNamePrefix, rhsColumnNamePrefix, (this.columnNamePrefix!= null), (that.columnNamePrefix!= 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 = super.hashCode(locator, strategy);
{
boolean theMerge;
theMerge = ((this.merge!= null)?this.isMerge():true);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "merge", theMerge), currentHashCode, theMerge, (this.merge!= null));
}
{
String theColumnNamePrefix;
theColumnNamePrefix = this.getColumnNamePrefix();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "columnNamePrefix", theColumnNamePrefix), currentHashCode, theColumnNamePrefix, (this.columnNamePrefix!= 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);
super.copyTo(locator, draftCopy, strategy);
if (draftCopy instanceof Embedded) {
final Embedded copy = ((Embedded) draftCopy);
{
Boolean mergeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.merge!= null));
if (mergeShouldBeCopiedAndSet == Boolean.TRUE) {
boolean sourceMerge;
sourceMerge = ((this.merge!= null)?this.isMerge():true);
boolean copyMerge = strategy.copy(LocatorUtils.property(locator, "merge", sourceMerge), sourceMerge, (this.merge!= null));
copy.setMerge(copyMerge);
} else {
if (mergeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.merge = null;
}
}
}
{
Boolean columnNamePrefixShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.columnNamePrefix!= null));
if (columnNamePrefixShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceColumnNamePrefix;
sourceColumnNamePrefix = this.getColumnNamePrefix();
String copyColumnNamePrefix = ((String) strategy.copy(LocatorUtils.property(locator, "columnNamePrefix", sourceColumnNamePrefix), sourceColumnNamePrefix, (this.columnNamePrefix!= null)));
copy.setColumnNamePrefix(copyColumnNamePrefix);
} else {
if (columnNamePrefixShouldBeCopiedAndSet == Boolean.FALSE) {
copy.columnNamePrefix = 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) {
super.mergeFrom(leftLocator, rightLocator, left, right, strategy);
if (right instanceof Embedded) {
final Embedded target = this;
final Embedded leftObject = ((Embedded) left);
final Embedded rightObject = ((Embedded) right);
{
Boolean mergeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.merge!= null), (rightObject.merge!= null));
if (mergeShouldBeMergedAndSet == Boolean.TRUE) {
boolean lhsMerge;
lhsMerge = ((leftObject.merge!= null)?leftObject.isMerge():true);
boolean rhsMerge;
rhsMerge = ((rightObject.merge!= null)?rightObject.isMerge():true);
boolean mergedMerge = ((boolean) strategy.merge(LocatorUtils.property(leftLocator, "merge", lhsMerge), LocatorUtils.property(rightLocator, "merge", rhsMerge), lhsMerge, rhsMerge, (leftObject.merge!= null), (rightObject.merge!= null)));
target.setMerge(mergedMerge);
} else {
if (mergeShouldBeMergedAndSet == Boolean.FALSE) {
target.merge = null;
}
}
}
{
Boolean columnNamePrefixShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.columnNamePrefix!= null), (rightObject.columnNamePrefix!= null));
if (columnNamePrefixShouldBeMergedAndSet == Boolean.TRUE) {
String lhsColumnNamePrefix;
lhsColumnNamePrefix = leftObject.getColumnNamePrefix();
String rhsColumnNamePrefix;
rhsColumnNamePrefix = rightObject.getColumnNamePrefix();
String mergedColumnNamePrefix = ((String) strategy.merge(LocatorUtils.property(leftLocator, "columnNamePrefix", lhsColumnNamePrefix), LocatorUtils.property(rightLocator, "columnNamePrefix", rhsColumnNamePrefix), lhsColumnNamePrefix, rhsColumnNamePrefix, (leftObject.columnNamePrefix!= null), (rightObject.columnNamePrefix!= null)));
target.setColumnNamePrefix(mergedColumnNamePrefix);
} else {
if (columnNamePrefixShouldBeMergedAndSet == Boolean.FALSE) {
target.columnNamePrefix = null;
}
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy