org.somda.sdc.dpws.soap.model.Faultreason Maven / Gradle / Ivy
package org.somda.sdc.dpws.soap.model;
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.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;
/**
* Java class for faultreason complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "faultreason", namespace = "http://www.w3.org/2003/05/soap-envelope", propOrder = {
"text"
})
public class Faultreason implements Cloneable, CopyTo, ToString
{
@XmlElement(name = "Text", namespace = "http://www.w3.org/2003/05/soap-envelope", required = true)
protected List text;
/**
* Gets the value of the text 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 text property.
*
*
* For example, to add a new item, do as follows:
*
*
* getText().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reasontext }
*
*
*
* @return
* The value of the text property.
*/
public List getText() {
if (text == null) {
text = new ArrayList<>();
}
return this.text;
}
public void setText(List value) {
this.text = null;
if (value!= null) {
List draftl = this.getText();
draftl.addAll(value);
}
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final Faultreason that = ((Faultreason) object);
{
List leftText;
leftText = (((this.text!= null)&&(!this.text.isEmpty()))?this.getText():null);
List rightText;
rightText = (((that.text!= null)&&(!that.text.isEmpty()))?that.getText():null);
if ((this.text!= null)&&(!this.text.isEmpty())) {
if ((that.text!= null)&&(!that.text.isEmpty())) {
if (!leftText.equals(rightText)) {
return false;
}
} else {
return false;
}
} else {
if ((that.text!= null)&&(!that.text.isEmpty())) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
List theText;
theText = (((this.text!= null)&&(!this.text.isEmpty()))?this.getText():null);
if ((this.text!= null)&&(!this.text.isEmpty())) {
currentHashCode += theText.hashCode();
}
}
return currentHashCode;
}
@Override
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
List theText;
theText = (((this.text!= null)&&(!this.text.isEmpty()))?this.getText():null);
strategy.appendField(locator, this, "text", buffer, theText, ((this.text!= null)&&(!this.text.isEmpty())));
}
return buffer;
}
@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 Faultreason) {
final Faultreason copy = ((Faultreason) draftCopy);
{
Boolean textShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.text!= null)&&(!this.text.isEmpty())));
if (textShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceText;
sourceText = (((this.text!= null)&&(!this.text.isEmpty()))?this.getText():null);
@SuppressWarnings("unchecked")
List copyText = ((List ) strategy.copy(LocatorUtils.property(locator, "text", sourceText), sourceText, ((this.text!= null)&&(!this.text.isEmpty()))));
copy.setText(copyText);
} else {
if (textShouldBeCopiedAndSet == Boolean.FALSE) {
copy.text = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new Faultreason();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy