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

jakarta.xml.ns.persistence.orm.SqlResultSetMapping 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 java.util.ArrayList;
import java.util.List;
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.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}) @Retention(RUNTIME)
 *         public @interface SqlResultSetMapping {
 *           String name();
 *           EntityResult[] entities() default {};
 *           ConstructorResult[] classes() default{};
 *           ColumnResult[] columns() default {};
 *         }
 * 
 * 

Java class for sql-result-set-mapping complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *         
 *         
 *       
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "sql-result-set-mapping", propOrder = { "description", "entityResult", "constructorResult", "columnResult" }) public class SqlResultSetMapping implements Cloneable, CopyTo, Equals, HashCode, MergeFrom { protected String description; @XmlElement(name = "entity-result") protected List entityResult; @XmlElement(name = "constructor-result") protected List constructorResult; @XmlElement(name = "column-result") protected List columnResult; @XmlAttribute(name = "name", required = true) protected String name; /** * 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 entityResult property. * *

This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the entityResult property.

* *

* For example, to add a new item, do as follows: *

*
     * getEntityResult().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link EntityResult } *

* * * @return * The value of the entityResult property. */ public List getEntityResult() { if (entityResult == null) { entityResult = new ArrayList<>(); } return this.entityResult; } /** * Gets the value of the constructorResult property. * *

This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the constructorResult property.

* *

* For example, to add a new item, do as follows: *

*
     * getConstructorResult().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ConstructorResult } *

* * * @return * The value of the constructorResult property. */ public List getConstructorResult() { if (constructorResult == null) { constructorResult = new ArrayList<>(); } return this.constructorResult; } /** * Gets the value of the columnResult property. * *

This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the columnResult property.

* *

* For example, to add a new item, do as follows: *

*
     * getColumnResult().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ColumnResult } *

* * * @return * The value of the columnResult property. */ public List getColumnResult() { if (columnResult == null) { columnResult = new ArrayList<>(); } return this.columnResult; } /** * 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; } @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 SqlResultSetMapping that = ((SqlResultSetMapping) 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; } } { List lhsEntityResult; lhsEntityResult = (((this.entityResult!= null)&&(!this.entityResult.isEmpty()))?this.getEntityResult():null); List rhsEntityResult; rhsEntityResult = (((that.entityResult!= null)&&(!that.entityResult.isEmpty()))?that.getEntityResult():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "entityResult", lhsEntityResult), LocatorUtils.property(thatLocator, "entityResult", rhsEntityResult), lhsEntityResult, rhsEntityResult, ((this.entityResult!= null)&&(!this.entityResult.isEmpty())), ((that.entityResult!= null)&&(!that.entityResult.isEmpty())))) { return false; } } { List lhsConstructorResult; lhsConstructorResult = (((this.constructorResult!= null)&&(!this.constructorResult.isEmpty()))?this.getConstructorResult():null); List rhsConstructorResult; rhsConstructorResult = (((that.constructorResult!= null)&&(!that.constructorResult.isEmpty()))?that.getConstructorResult():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "constructorResult", lhsConstructorResult), LocatorUtils.property(thatLocator, "constructorResult", rhsConstructorResult), lhsConstructorResult, rhsConstructorResult, ((this.constructorResult!= null)&&(!this.constructorResult.isEmpty())), ((that.constructorResult!= null)&&(!that.constructorResult.isEmpty())))) { return false; } } { List lhsColumnResult; lhsColumnResult = (((this.columnResult!= null)&&(!this.columnResult.isEmpty()))?this.getColumnResult():null); List rhsColumnResult; rhsColumnResult = (((that.columnResult!= null)&&(!that.columnResult.isEmpty()))?that.getColumnResult():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "columnResult", lhsColumnResult), LocatorUtils.property(thatLocator, "columnResult", rhsColumnResult), lhsColumnResult, rhsColumnResult, ((this.columnResult!= null)&&(!this.columnResult.isEmpty())), ((that.columnResult!= null)&&(!that.columnResult.isEmpty())))) { 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; } } 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)); } { List theEntityResult; theEntityResult = (((this.entityResult!= null)&&(!this.entityResult.isEmpty()))?this.getEntityResult():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "entityResult", theEntityResult), currentHashCode, theEntityResult, ((this.entityResult!= null)&&(!this.entityResult.isEmpty()))); } { List theConstructorResult; theConstructorResult = (((this.constructorResult!= null)&&(!this.constructorResult.isEmpty()))?this.getConstructorResult():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "constructorResult", theConstructorResult), currentHashCode, theConstructorResult, ((this.constructorResult!= null)&&(!this.constructorResult.isEmpty()))); } { List theColumnResult; theColumnResult = (((this.columnResult!= null)&&(!this.columnResult.isEmpty()))?this.getColumnResult():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "columnResult", theColumnResult), currentHashCode, theColumnResult, ((this.columnResult!= null)&&(!this.columnResult.isEmpty()))); } { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, (this.name!= 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 SqlResultSetMapping) { final SqlResultSetMapping copy = ((SqlResultSetMapping) 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 entityResultShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.entityResult!= null)&&(!this.entityResult.isEmpty()))); if (entityResultShouldBeCopiedAndSet == Boolean.TRUE) { List sourceEntityResult; sourceEntityResult = (((this.entityResult!= null)&&(!this.entityResult.isEmpty()))?this.getEntityResult():null); @SuppressWarnings("unchecked") List copyEntityResult = ((List ) strategy.copy(LocatorUtils.property(locator, "entityResult", sourceEntityResult), sourceEntityResult, ((this.entityResult!= null)&&(!this.entityResult.isEmpty())))); copy.entityResult = null; if (copyEntityResult!= null) { List uniqueEntityResultl = copy.getEntityResult(); uniqueEntityResultl.addAll(copyEntityResult); } } else { if (entityResultShouldBeCopiedAndSet == Boolean.FALSE) { copy.entityResult = null; } } } { Boolean constructorResultShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.constructorResult!= null)&&(!this.constructorResult.isEmpty()))); if (constructorResultShouldBeCopiedAndSet == Boolean.TRUE) { List sourceConstructorResult; sourceConstructorResult = (((this.constructorResult!= null)&&(!this.constructorResult.isEmpty()))?this.getConstructorResult():null); @SuppressWarnings("unchecked") List copyConstructorResult = ((List ) strategy.copy(LocatorUtils.property(locator, "constructorResult", sourceConstructorResult), sourceConstructorResult, ((this.constructorResult!= null)&&(!this.constructorResult.isEmpty())))); copy.constructorResult = null; if (copyConstructorResult!= null) { List uniqueConstructorResultl = copy.getConstructorResult(); uniqueConstructorResultl.addAll(copyConstructorResult); } } else { if (constructorResultShouldBeCopiedAndSet == Boolean.FALSE) { copy.constructorResult = null; } } } { Boolean columnResultShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.columnResult!= null)&&(!this.columnResult.isEmpty()))); if (columnResultShouldBeCopiedAndSet == Boolean.TRUE) { List sourceColumnResult; sourceColumnResult = (((this.columnResult!= null)&&(!this.columnResult.isEmpty()))?this.getColumnResult():null); @SuppressWarnings("unchecked") List copyColumnResult = ((List ) strategy.copy(LocatorUtils.property(locator, "columnResult", sourceColumnResult), sourceColumnResult, ((this.columnResult!= null)&&(!this.columnResult.isEmpty())))); copy.columnResult = null; if (copyColumnResult!= null) { List uniqueColumnResultl = copy.getColumnResult(); uniqueColumnResultl.addAll(copyColumnResult); } } else { if (columnResultShouldBeCopiedAndSet == Boolean.FALSE) { copy.columnResult = 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; } } } } return draftCopy; } @Override public Object createNewInstance() { return new SqlResultSetMapping(); } @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 SqlResultSetMapping) { final SqlResultSetMapping target = this; final SqlResultSetMapping leftObject = ((SqlResultSetMapping) left); final SqlResultSetMapping rightObject = ((SqlResultSetMapping) 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 entityResultShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, ((leftObject.entityResult!= null)&&(!leftObject.entityResult.isEmpty())), ((rightObject.entityResult!= null)&&(!rightObject.entityResult.isEmpty()))); if (entityResultShouldBeMergedAndSet == Boolean.TRUE) { List lhsEntityResult; lhsEntityResult = (((leftObject.entityResult!= null)&&(!leftObject.entityResult.isEmpty()))?leftObject.getEntityResult():null); List rhsEntityResult; rhsEntityResult = (((rightObject.entityResult!= null)&&(!rightObject.entityResult.isEmpty()))?rightObject.getEntityResult():null); List mergedEntityResult = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "entityResult", lhsEntityResult), LocatorUtils.property(rightLocator, "entityResult", rhsEntityResult), lhsEntityResult, rhsEntityResult, ((leftObject.entityResult!= null)&&(!leftObject.entityResult.isEmpty())), ((rightObject.entityResult!= null)&&(!rightObject.entityResult.isEmpty())))); target.entityResult = null; if (mergedEntityResult!= null) { List uniqueEntityResultl = target.getEntityResult(); uniqueEntityResultl.addAll(mergedEntityResult); } } else { if (entityResultShouldBeMergedAndSet == Boolean.FALSE) { target.entityResult = null; } } } { Boolean constructorResultShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, ((leftObject.constructorResult!= null)&&(!leftObject.constructorResult.isEmpty())), ((rightObject.constructorResult!= null)&&(!rightObject.constructorResult.isEmpty()))); if (constructorResultShouldBeMergedAndSet == Boolean.TRUE) { List lhsConstructorResult; lhsConstructorResult = (((leftObject.constructorResult!= null)&&(!leftObject.constructorResult.isEmpty()))?leftObject.getConstructorResult():null); List rhsConstructorResult; rhsConstructorResult = (((rightObject.constructorResult!= null)&&(!rightObject.constructorResult.isEmpty()))?rightObject.getConstructorResult():null); List mergedConstructorResult = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "constructorResult", lhsConstructorResult), LocatorUtils.property(rightLocator, "constructorResult", rhsConstructorResult), lhsConstructorResult, rhsConstructorResult, ((leftObject.constructorResult!= null)&&(!leftObject.constructorResult.isEmpty())), ((rightObject.constructorResult!= null)&&(!rightObject.constructorResult.isEmpty())))); target.constructorResult = null; if (mergedConstructorResult!= null) { List uniqueConstructorResultl = target.getConstructorResult(); uniqueConstructorResultl.addAll(mergedConstructorResult); } } else { if (constructorResultShouldBeMergedAndSet == Boolean.FALSE) { target.constructorResult = null; } } } { Boolean columnResultShouldBeMergedAndSet = strategy.shouldBeMergedAndSet(leftLocator, rightLocator, ((leftObject.columnResult!= null)&&(!leftObject.columnResult.isEmpty())), ((rightObject.columnResult!= null)&&(!rightObject.columnResult.isEmpty()))); if (columnResultShouldBeMergedAndSet == Boolean.TRUE) { List lhsColumnResult; lhsColumnResult = (((leftObject.columnResult!= null)&&(!leftObject.columnResult.isEmpty()))?leftObject.getColumnResult():null); List rhsColumnResult; rhsColumnResult = (((rightObject.columnResult!= null)&&(!rightObject.columnResult.isEmpty()))?rightObject.getColumnResult():null); List mergedColumnResult = ((List ) strategy.merge(LocatorUtils.property(leftLocator, "columnResult", lhsColumnResult), LocatorUtils.property(rightLocator, "columnResult", rhsColumnResult), lhsColumnResult, rhsColumnResult, ((leftObject.columnResult!= null)&&(!leftObject.columnResult.isEmpty())), ((rightObject.columnResult!= null)&&(!rightObject.columnResult.isEmpty())))); target.columnResult = null; if (mergedColumnResult!= null) { List uniqueColumnResultl = target.getColumnResult(); uniqueColumnResultl.addAll(mergedColumnResult); } } else { if (columnResultShouldBeMergedAndSet == Boolean.FALSE) { target.columnResult = 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; } } } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy