jakarta.xml.ns.persistence.orm.SequenceGenerator 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.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;
/**
* @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
* public @interface SequenceGenerator {
* String name();
* String sequenceName() default "";
* String catalog() default "";
* String schema() default "";
* int initialValue() default 1;
* int allocationSize() default 50;
* }
*
* Java class for sequence-generator complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "sequence-generator", propOrder = {
"description"
})
public class SequenceGenerator implements Cloneable, CopyTo, Equals, HashCode, MergeFrom
{
protected String description;
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "sequence-name")
protected String sequenceName;
@XmlAttribute(name = "catalog")
protected String catalog;
@XmlAttribute(name = "schema")
protected String schema;
@XmlAttribute(name = "initial-value")
protected Integer initialValue;
@XmlAttribute(name = "allocation-size")
protected Integer allocationSize;
/**
* 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 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 sequenceName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSequenceName() {
return sequenceName;
}
/**
* Sets the value of the sequenceName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSequenceName(String value) {
this.sequenceName = value;
}
/**
* Gets the value of the catalog property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCatalog() {
return catalog;
}
/**
* Sets the value of the catalog property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCatalog(String value) {
this.catalog = value;
}
/**
* Gets the value of the schema property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSchema() {
return schema;
}
/**
* Sets the value of the schema property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSchema(String value) {
this.schema = value;
}
/**
* Gets the value of the initialValue property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getInitialValue() {
return initialValue;
}
/**
* Sets the value of the initialValue property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setInitialValue(Integer value) {
this.initialValue = value;
}
/**
* Gets the value of the allocationSize property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getAllocationSize() {
return allocationSize;
}
/**
* Sets the value of the allocationSize property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setAllocationSize(Integer value) {
this.allocationSize = 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 SequenceGenerator that = ((SequenceGenerator) 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;
}
}
{
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 lhsSequenceName;
lhsSequenceName = this.getSequenceName();
String rhsSequenceName;
rhsSequenceName = that.getSequenceName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "sequenceName", lhsSequenceName), LocatorUtils.property(thatLocator, "sequenceName", rhsSequenceName), lhsSequenceName, rhsSequenceName, (this.sequenceName!= null), (that.sequenceName!= null))) {
return false;
}
}
{
String lhsCatalog;
lhsCatalog = this.getCatalog();
String rhsCatalog;
rhsCatalog = that.getCatalog();
if (!strategy.equals(LocatorUtils.property(thisLocator, "catalog", lhsCatalog), LocatorUtils.property(thatLocator, "catalog", rhsCatalog), lhsCatalog, rhsCatalog, (this.catalog!= null), (that.catalog!= null))) {
return false;
}
}
{
String lhsSchema;
lhsSchema = this.getSchema();
String rhsSchema;
rhsSchema = that.getSchema();
if (!strategy.equals(LocatorUtils.property(thisLocator, "schema", lhsSchema), LocatorUtils.property(thatLocator, "schema", rhsSchema), lhsSchema, rhsSchema, (this.schema!= null), (that.schema!= null))) {
return false;
}
}
{
Integer lhsInitialValue;
lhsInitialValue = this.getInitialValue();
Integer rhsInitialValue;
rhsInitialValue = that.getInitialValue();
if (!strategy.equals(LocatorUtils.property(thisLocator, "initialValue", lhsInitialValue), LocatorUtils.property(thatLocator, "initialValue", rhsInitialValue), lhsInitialValue, rhsInitialValue, (this.initialValue!= null), (that.initialValue!= null))) {
return false;
}
}
{
Integer lhsAllocationSize;
lhsAllocationSize = this.getAllocationSize();
Integer rhsAllocationSize;
rhsAllocationSize = that.getAllocationSize();
if (!strategy.equals(LocatorUtils.property(thisLocator, "allocationSize", lhsAllocationSize), LocatorUtils.property(thatLocator, "allocationSize", rhsAllocationSize), lhsAllocationSize, rhsAllocationSize, (this.allocationSize!= null), (that.allocationSize!= 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));
}
{
String theName;
theName = this.getName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, (this.name!= null));
}
{
String theSequenceName;
theSequenceName = this.getSequenceName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sequenceName", theSequenceName), currentHashCode, theSequenceName, (this.sequenceName!= null));
}
{
String theCatalog;
theCatalog = this.getCatalog();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "catalog", theCatalog), currentHashCode, theCatalog, (this.catalog!= null));
}
{
String theSchema;
theSchema = this.getSchema();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "schema", theSchema), currentHashCode, theSchema, (this.schema!= null));
}
{
Integer theInitialValue;
theInitialValue = this.getInitialValue();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "initialValue", theInitialValue), currentHashCode, theInitialValue, (this.initialValue!= null));
}
{
Integer theAllocationSize;
theAllocationSize = this.getAllocationSize();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "allocationSize", theAllocationSize), currentHashCode, theAllocationSize, (this.allocationSize!= 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 SequenceGenerator) {
final SequenceGenerator copy = ((SequenceGenerator) 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 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 sequenceNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.sequenceName!= null));
if (sequenceNameShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceSequenceName;
sourceSequenceName = this.getSequenceName();
String copySequenceName = ((String) strategy.copy(LocatorUtils.property(locator, "sequenceName", sourceSequenceName), sourceSequenceName, (this.sequenceName!= null)));
copy.setSequenceName(copySequenceName);
} else {
if (sequenceNameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.sequenceName = null;
}
}
}
{
Boolean catalogShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.catalog!= null));
if (catalogShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceCatalog;
sourceCatalog = this.getCatalog();
String copyCatalog = ((String) strategy.copy(LocatorUtils.property(locator, "catalog", sourceCatalog), sourceCatalog, (this.catalog!= null)));
copy.setCatalog(copyCatalog);
} else {
if (catalogShouldBeCopiedAndSet == Boolean.FALSE) {
copy.catalog = null;
}
}
}
{
Boolean schemaShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.schema!= null));
if (schemaShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceSchema;
sourceSchema = this.getSchema();
String copySchema = ((String) strategy.copy(LocatorUtils.property(locator, "schema", sourceSchema), sourceSchema, (this.schema!= null)));
copy.setSchema(copySchema);
} else {
if (schemaShouldBeCopiedAndSet == Boolean.FALSE) {
copy.schema = null;
}
}
}
{
Boolean initialValueShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.initialValue!= null));
if (initialValueShouldBeCopiedAndSet == Boolean.TRUE) {
Integer sourceInitialValue;
sourceInitialValue = this.getInitialValue();
Integer copyInitialValue = ((Integer) strategy.copy(LocatorUtils.property(locator, "initialValue", sourceInitialValue), sourceInitialValue, (this.initialValue!= null)));
copy.setInitialValue(copyInitialValue);
} else {
if (initialValueShouldBeCopiedAndSet == Boolean.FALSE) {
copy.initialValue = null;
}
}
}
{
Boolean allocationSizeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.allocationSize!= null));
if (allocationSizeShouldBeCopiedAndSet == Boolean.TRUE) {
Integer sourceAllocationSize;
sourceAllocationSize = this.getAllocationSize();
Integer copyAllocationSize = ((Integer) strategy.copy(LocatorUtils.property(locator, "allocationSize", sourceAllocationSize), sourceAllocationSize, (this.allocationSize!= null)));
copy.setAllocationSize(copyAllocationSize);
} else {
if (allocationSizeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.allocationSize = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new SequenceGenerator();
}
@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 SequenceGenerator) {
final SequenceGenerator target = this;
final SequenceGenerator leftObject = ((SequenceGenerator) left);
final SequenceGenerator rightObject = ((SequenceGenerator) 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 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 sequenceNameShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.sequenceName!= null), (rightObject.sequenceName!= null));
if (sequenceNameShouldBeMergedAndSet == Boolean.TRUE) {
String lhsSequenceName;
lhsSequenceName = leftObject.getSequenceName();
String rhsSequenceName;
rhsSequenceName = rightObject.getSequenceName();
String mergedSequenceName = ((String) strategy.merge(LocatorUtils.property(leftLocator, "sequenceName", lhsSequenceName), LocatorUtils.property(rightLocator, "sequenceName", rhsSequenceName), lhsSequenceName, rhsSequenceName, (leftObject.sequenceName!= null), (rightObject.sequenceName!= null)));
target.setSequenceName(mergedSequenceName);
} else {
if (sequenceNameShouldBeMergedAndSet == Boolean.FALSE) {
target.sequenceName = null;
}
}
}
{
Boolean catalogShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.catalog!= null), (rightObject.catalog!= null));
if (catalogShouldBeMergedAndSet == Boolean.TRUE) {
String lhsCatalog;
lhsCatalog = leftObject.getCatalog();
String rhsCatalog;
rhsCatalog = rightObject.getCatalog();
String mergedCatalog = ((String) strategy.merge(LocatorUtils.property(leftLocator, "catalog", lhsCatalog), LocatorUtils.property(rightLocator, "catalog", rhsCatalog), lhsCatalog, rhsCatalog, (leftObject.catalog!= null), (rightObject.catalog!= null)));
target.setCatalog(mergedCatalog);
} else {
if (catalogShouldBeMergedAndSet == Boolean.FALSE) {
target.catalog = null;
}
}
}
{
Boolean schemaShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.schema!= null), (rightObject.schema!= null));
if (schemaShouldBeMergedAndSet == Boolean.TRUE) {
String lhsSchema;
lhsSchema = leftObject.getSchema();
String rhsSchema;
rhsSchema = rightObject.getSchema();
String mergedSchema = ((String) strategy.merge(LocatorUtils.property(leftLocator, "schema", lhsSchema), LocatorUtils.property(rightLocator, "schema", rhsSchema), lhsSchema, rhsSchema, (leftObject.schema!= null), (rightObject.schema!= null)));
target.setSchema(mergedSchema);
} else {
if (schemaShouldBeMergedAndSet == Boolean.FALSE) {
target.schema = null;
}
}
}
{
Boolean initialValueShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.initialValue!= null), (rightObject.initialValue!= null));
if (initialValueShouldBeMergedAndSet == Boolean.TRUE) {
Integer lhsInitialValue;
lhsInitialValue = leftObject.getInitialValue();
Integer rhsInitialValue;
rhsInitialValue = rightObject.getInitialValue();
Integer mergedInitialValue = ((Integer) strategy.merge(LocatorUtils.property(leftLocator, "initialValue", lhsInitialValue), LocatorUtils.property(rightLocator, "initialValue", rhsInitialValue), lhsInitialValue, rhsInitialValue, (leftObject.initialValue!= null), (rightObject.initialValue!= null)));
target.setInitialValue(mergedInitialValue);
} else {
if (initialValueShouldBeMergedAndSet == Boolean.FALSE) {
target.initialValue = null;
}
}
}
{
Boolean allocationSizeShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, (leftObject.allocationSize!= null), (rightObject.allocationSize!= null));
if (allocationSizeShouldBeMergedAndSet == Boolean.TRUE) {
Integer lhsAllocationSize;
lhsAllocationSize = leftObject.getAllocationSize();
Integer rhsAllocationSize;
rhsAllocationSize = rightObject.getAllocationSize();
Integer mergedAllocationSize = ((Integer) strategy.merge(LocatorUtils.property(leftLocator, "allocationSize", lhsAllocationSize), LocatorUtils.property(rightLocator, "allocationSize", rhsAllocationSize), lhsAllocationSize, rhsAllocationSize, (leftObject.allocationSize!= null), (rightObject.allocationSize!= null)));
target.setAllocationSize(mergedAllocationSize);
} else {
if (allocationSizeShouldBeMergedAndSet == Boolean.FALSE) {
target.allocationSize = null;
}
}
}
}
}
}