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

org.somda.sdc.biceps.model.participant.SetStringOperationState Maven / Gradle / Ivy


package org.somda.sdc.biceps.model.participant;

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.jetbrains.annotations.Nullable;
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;


/**
 * State of a string set operation that is exposed on the SCO.
 * 
 * 

Java class for SetStringOperationState complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *           
 *             
 *               
 *                 
 *                   
 *                 
 *               
 *             
 *           
 *         
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SetStringOperationState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = { "allowedValues" }) public class SetStringOperationState extends AbstractOperationState implements Cloneable, CopyTo, ToString { /** * An OPTIONAL list of currently allowed string values that can be requested. If the list is empty, then there is not limitation. * */ @XmlElement(name = "AllowedValues", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant") protected SetStringOperationState.AllowedValues allowedValues; /** * An OPTIONAL list of currently allowed string values that can be requested. If the list is empty, then there is not limitation. * * @return * possible object is * {@link SetStringOperationState.AllowedValues } * */ @Nullable public SetStringOperationState.AllowedValues getAllowedValues() { return allowedValues; } /** * Sets the value of the allowedValues property. * * @param value * allowed object is * {@link SetStringOperationState.AllowedValues } * * @see #getAllowedValues() */ public void setAllowedValues( @Nullable SetStringOperationState.AllowedValues value) { this.allowedValues = value; } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } if (!super.equals(object)) { return false; } final SetStringOperationState that = ((SetStringOperationState) object); { SetStringOperationState.AllowedValues leftAllowedValues; leftAllowedValues = this.getAllowedValues(); SetStringOperationState.AllowedValues rightAllowedValues; rightAllowedValues = that.getAllowedValues(); if (this.allowedValues!= null) { if (that.allowedValues!= null) { if (!leftAllowedValues.equals(rightAllowedValues)) { return false; } } else { return false; } } else { if (that.allowedValues!= null) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; currentHashCode = ((currentHashCode* 31)+ super.hashCode()); { currentHashCode = (currentHashCode* 31); SetStringOperationState.AllowedValues theAllowedValues; theAllowedValues = this.getAllowedValues(); if (this.allowedValues!= null) { currentHashCode += theAllowedValues.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) { super.appendFields(locator, buffer, strategy); { SetStringOperationState.AllowedValues theAllowedValues; theAllowedValues = this.getAllowedValues(); strategy.appendField(locator, this, "allowedValues", buffer, theAllowedValues, (this.allowedValues!= null)); } 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); super.copyTo(locator, draftCopy, strategy); if (draftCopy instanceof SetStringOperationState) { final SetStringOperationState copy = ((SetStringOperationState) draftCopy); { Boolean allowedValuesShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.allowedValues!= null)); if (allowedValuesShouldBeCopiedAndSet == Boolean.TRUE) { SetStringOperationState.AllowedValues sourceAllowedValues; sourceAllowedValues = this.getAllowedValues(); SetStringOperationState.AllowedValues copyAllowedValues = ((SetStringOperationState.AllowedValues) strategy.copy(LocatorUtils.property(locator, "allowedValues", sourceAllowedValues), sourceAllowedValues, (this.allowedValues!= null))); copy.setAllowedValues(copyAllowedValues); } else { if (allowedValuesShouldBeCopiedAndSet == Boolean.FALSE) { copy.allowedValues = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new SetStringOperationState(); } /** *

Java class for anonymous complex type

. * *

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

* *
{@code
     * 
     *   
     *     
     *       
     *         
     *       
     *     
     *   
     * 
     * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "value" }) public static class AllowedValues implements Cloneable, CopyTo, ToString { /** * A single allowed value that can be requested. * */ @XmlElement(name = "Value", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", required = true) protected List value; /** * A single allowed value that can be requested. * * Gets the value of the value 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 value property.

* *

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

*
         * getValue().add(newItem);
         * 
* * *

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

* * * @return * The value of the value property. */ public List getValue() { if (value == null) { value = new ArrayList<>(); } return this.value; } public void setValue(List value) { this.value = null; if (value!= null) { List draftl = this.getValue(); draftl.addAll(value); } } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final SetStringOperationState.AllowedValues that = ((SetStringOperationState.AllowedValues) object); { List leftValue; leftValue = (((this.value!= null)&&(!this.value.isEmpty()))?this.getValue():null); List rightValue; rightValue = (((that.value!= null)&&(!that.value.isEmpty()))?that.getValue():null); if ((this.value!= null)&&(!this.value.isEmpty())) { if ((that.value!= null)&&(!that.value.isEmpty())) { if (!leftValue.equals(rightValue)) { return false; } } else { return false; } } else { if ((that.value!= null)&&(!that.value.isEmpty())) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; { currentHashCode = (currentHashCode* 31); List theValue; theValue = (((this.value!= null)&&(!this.value.isEmpty()))?this.getValue():null); if ((this.value!= null)&&(!this.value.isEmpty())) { currentHashCode += theValue.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 theValue; theValue = (((this.value!= null)&&(!this.value.isEmpty()))?this.getValue():null); strategy.appendField(locator, this, "value", buffer, theValue, ((this.value!= null)&&(!this.value.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 SetStringOperationState.AllowedValues) { final SetStringOperationState.AllowedValues copy = ((SetStringOperationState.AllowedValues) draftCopy); { Boolean valueShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.value!= null)&&(!this.value.isEmpty()))); if (valueShouldBeCopiedAndSet == Boolean.TRUE) { List sourceValue; sourceValue = (((this.value!= null)&&(!this.value.isEmpty()))?this.getValue():null); @SuppressWarnings("unchecked") List copyValue = ((List ) strategy.copy(LocatorUtils.property(locator, "value", sourceValue), sourceValue, ((this.value!= null)&&(!this.value.isEmpty())))); copy.setValue(copyValue); } else { if (valueShouldBeCopiedAndSet == Boolean.FALSE) { copy.value = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new SetStringOperationState.AllowedValues(); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy