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

org.somda.sdc.biceps.model.message.InvocationInfo Maven / Gradle / Ivy

Go to download

SDCri is a set of Java libraries that implements a network communication framework conforming with the IEEE 11073 SDC specifications. This project implements the model for IEEE 11073-10207.

The newest version!

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

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.XmlSchemaType;
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;
import org.somda.sdc.biceps.model.extension.ExtensionType;
import org.somda.sdc.biceps.model.participant.LocalizedText;


/**
 * InvocationInfo conveys information to describe a transaction operation.
 * 
 * 

Java class for InvocationInfo complex type

. * *

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

* *
{@code
 * 
 *   
 *     
 *       
 *         
 *         
 *         
 *         
 *         
 *       
 *     
 *   
 * 
 * }
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "InvocationInfo", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message", propOrder = { "extension", "transactionId", "invocationState", "invocationError", "invocationErrorMessage" }) public class InvocationInfo implements Cloneable, CopyTo, ToString { @XmlElement(name = "Extension", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/extension") protected ExtensionType extension; /** * Transaction identifier that has been assigned to the processing of a set operation. * * The transaction identifier SHALL be used to identify a set operation transaction status that is delivered via msg:OperationInvokedReport MESSAGEs. The transaction's initial identifier is tramsmitted in the response of a set operation request. * */ @XmlElement(name = "TransactionId", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") @XmlSchemaType(name = "unsignedInt") protected long transactionId; /** * Processing state of an invoked operation. * */ @XmlElement(name = "InvocationState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message", required = true) @XmlSchemaType(name = "string") protected InvocationState invocationState; /** * If ./msg:InvocationState indicates a failure, InvocationError may convey more information about the error. * */ @XmlElement(name = "InvocationError", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") @XmlSchemaType(name = "string") protected InvocationError invocationError; /** * If ./msg:InvocationState indicates a failure, InvocationErrorMessage may convey a MESSAGE for a user with information about the error. * */ @XmlElement(name = "InvocationErrorMessage", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/message") protected List invocationErrorMessage; /** * Gets the value of the extension property. * * @return * possible object is * {@link ExtensionType } * */ public ExtensionType getExtension() { return extension; } /** * Sets the value of the extension property. * * @param value * allowed object is * {@link ExtensionType } * */ public void setExtension(ExtensionType value) { this.extension = value; } /** * Transaction identifier that has been assigned to the processing of a set operation. * * The transaction identifier SHALL be used to identify a set operation transaction status that is delivered via msg:OperationInvokedReport MESSAGEs. The transaction's initial identifier is tramsmitted in the response of a set operation request. * */ public long getTransactionId() { return transactionId; } /** * Sets the value of the transactionId property. * */ public void setTransactionId(long value) { this.transactionId = value; } /** * Processing state of an invoked operation. * * @return * possible object is * {@link InvocationState } * */ public InvocationState getInvocationState() { return invocationState; } /** * Sets the value of the invocationState property. * * @param value * allowed object is * {@link InvocationState } * * @see #getInvocationState() */ public void setInvocationState(InvocationState value) { this.invocationState = value; } /** * If ./msg:InvocationState indicates a failure, InvocationError may convey more information about the error. * * @return * possible object is * {@link InvocationError } * */ public InvocationError getInvocationError() { return invocationError; } /** * Sets the value of the invocationError property. * * @param value * allowed object is * {@link InvocationError } * * @see #getInvocationError() */ public void setInvocationError(InvocationError value) { this.invocationError = value; } /** * If ./msg:InvocationState indicates a failure, InvocationErrorMessage may convey a MESSAGE for a user with information about the error. * * Gets the value of the invocationErrorMessage 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 invocationErrorMessage property.

* *

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

*
     * getInvocationErrorMessage().add(newItem);
     * 
* * *

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

* * * @return * The value of the invocationErrorMessage property. */ public List getInvocationErrorMessage() { if (invocationErrorMessage == null) { invocationErrorMessage = new ArrayList<>(); } return this.invocationErrorMessage; } public void setInvocationErrorMessage(List value) { this.invocationErrorMessage = null; if (value!= null) { List draftl = this.getInvocationErrorMessage(); draftl.addAll(value); } } @Override public boolean equals(Object object) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final InvocationInfo that = ((InvocationInfo) object); { ExtensionType leftExtension; leftExtension = this.getExtension(); ExtensionType rightExtension; rightExtension = that.getExtension(); if (this.extension!= null) { if (that.extension!= null) { if (!leftExtension.equals(rightExtension)) { return false; } } else { return false; } } else { if (that.extension!= null) { return false; } } } { long leftTransactionId; leftTransactionId = this.getTransactionId(); long rightTransactionId; rightTransactionId = that.getTransactionId(); if (leftTransactionId!= rightTransactionId) { return false; } } { InvocationState leftInvocationState; leftInvocationState = this.getInvocationState(); InvocationState rightInvocationState; rightInvocationState = that.getInvocationState(); if (this.invocationState!= null) { if (that.invocationState!= null) { if (!leftInvocationState.equals(rightInvocationState)) { return false; } } else { return false; } } else { if (that.invocationState!= null) { return false; } } } { InvocationError leftInvocationError; leftInvocationError = this.getInvocationError(); InvocationError rightInvocationError; rightInvocationError = that.getInvocationError(); if (this.invocationError!= null) { if (that.invocationError!= null) { if (!leftInvocationError.equals(rightInvocationError)) { return false; } } else { return false; } } else { if (that.invocationError!= null) { return false; } } } { List leftInvocationErrorMessage; leftInvocationErrorMessage = (((this.invocationErrorMessage!= null)&&(!this.invocationErrorMessage.isEmpty()))?this.getInvocationErrorMessage():null); List rightInvocationErrorMessage; rightInvocationErrorMessage = (((that.invocationErrorMessage!= null)&&(!that.invocationErrorMessage.isEmpty()))?that.getInvocationErrorMessage():null); if ((this.invocationErrorMessage!= null)&&(!this.invocationErrorMessage.isEmpty())) { if ((that.invocationErrorMessage!= null)&&(!that.invocationErrorMessage.isEmpty())) { if (!leftInvocationErrorMessage.equals(rightInvocationErrorMessage)) { return false; } } else { return false; } } else { if ((that.invocationErrorMessage!= null)&&(!that.invocationErrorMessage.isEmpty())) { return false; } } } return true; } @Override public int hashCode() { int currentHashCode = 1; { currentHashCode = (currentHashCode* 31); ExtensionType theExtension; theExtension = this.getExtension(); if (this.extension!= null) { currentHashCode += theExtension.hashCode(); } } { currentHashCode = (currentHashCode* 31); long theTransactionId; theTransactionId = this.getTransactionId(); currentHashCode += ((int)(theTransactionId^(theTransactionId >>> 32))); } { currentHashCode = (currentHashCode* 31); InvocationState theInvocationState; theInvocationState = this.getInvocationState(); if (this.invocationState!= null) { currentHashCode += theInvocationState.hashCode(); } } { currentHashCode = (currentHashCode* 31); InvocationError theInvocationError; theInvocationError = this.getInvocationError(); if (this.invocationError!= null) { currentHashCode += theInvocationError.hashCode(); } } { currentHashCode = (currentHashCode* 31); List theInvocationErrorMessage; theInvocationErrorMessage = (((this.invocationErrorMessage!= null)&&(!this.invocationErrorMessage.isEmpty()))?this.getInvocationErrorMessage():null); if ((this.invocationErrorMessage!= null)&&(!this.invocationErrorMessage.isEmpty())) { currentHashCode += theInvocationErrorMessage.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) { { ExtensionType theExtension; theExtension = this.getExtension(); strategy.appendField(locator, this, "extension", buffer, theExtension, (this.extension!= null)); } { long theTransactionId; theTransactionId = this.getTransactionId(); strategy.appendField(locator, this, "transactionId", buffer, theTransactionId, true); } { InvocationState theInvocationState; theInvocationState = this.getInvocationState(); strategy.appendField(locator, this, "invocationState", buffer, theInvocationState, (this.invocationState!= null)); } { InvocationError theInvocationError; theInvocationError = this.getInvocationError(); strategy.appendField(locator, this, "invocationError", buffer, theInvocationError, (this.invocationError!= null)); } { List theInvocationErrorMessage; theInvocationErrorMessage = (((this.invocationErrorMessage!= null)&&(!this.invocationErrorMessage.isEmpty()))?this.getInvocationErrorMessage():null); strategy.appendField(locator, this, "invocationErrorMessage", buffer, theInvocationErrorMessage, ((this.invocationErrorMessage!= null)&&(!this.invocationErrorMessage.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 InvocationInfo) { final InvocationInfo copy = ((InvocationInfo) draftCopy); { Boolean extensionShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.extension!= null)); if (extensionShouldBeCopiedAndSet == Boolean.TRUE) { ExtensionType sourceExtension; sourceExtension = this.getExtension(); ExtensionType copyExtension = ((ExtensionType) strategy.copy(LocatorUtils.property(locator, "extension", sourceExtension), sourceExtension, (this.extension!= null))); copy.setExtension(copyExtension); } else { if (extensionShouldBeCopiedAndSet == Boolean.FALSE) { copy.extension = null; } } } { Boolean transactionIdShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, true); if (transactionIdShouldBeCopiedAndSet == Boolean.TRUE) { long sourceTransactionId; sourceTransactionId = this.getTransactionId(); long copyTransactionId = strategy.copy(LocatorUtils.property(locator, "transactionId", sourceTransactionId), sourceTransactionId, true); copy.setTransactionId(copyTransactionId); } else { if (transactionIdShouldBeCopiedAndSet == Boolean.FALSE) { } } } { Boolean invocationStateShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.invocationState!= null)); if (invocationStateShouldBeCopiedAndSet == Boolean.TRUE) { InvocationState sourceInvocationState; sourceInvocationState = this.getInvocationState(); InvocationState copyInvocationState = ((InvocationState) strategy.copy(LocatorUtils.property(locator, "invocationState", sourceInvocationState), sourceInvocationState, (this.invocationState!= null))); copy.setInvocationState(copyInvocationState); } else { if (invocationStateShouldBeCopiedAndSet == Boolean.FALSE) { copy.invocationState = null; } } } { Boolean invocationErrorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.invocationError!= null)); if (invocationErrorShouldBeCopiedAndSet == Boolean.TRUE) { InvocationError sourceInvocationError; sourceInvocationError = this.getInvocationError(); InvocationError copyInvocationError = ((InvocationError) strategy.copy(LocatorUtils.property(locator, "invocationError", sourceInvocationError), sourceInvocationError, (this.invocationError!= null))); copy.setInvocationError(copyInvocationError); } else { if (invocationErrorShouldBeCopiedAndSet == Boolean.FALSE) { copy.invocationError = null; } } } { Boolean invocationErrorMessageShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.invocationErrorMessage!= null)&&(!this.invocationErrorMessage.isEmpty()))); if (invocationErrorMessageShouldBeCopiedAndSet == Boolean.TRUE) { List sourceInvocationErrorMessage; sourceInvocationErrorMessage = (((this.invocationErrorMessage!= null)&&(!this.invocationErrorMessage.isEmpty()))?this.getInvocationErrorMessage():null); @SuppressWarnings("unchecked") List copyInvocationErrorMessage = ((List ) strategy.copy(LocatorUtils.property(locator, "invocationErrorMessage", sourceInvocationErrorMessage), sourceInvocationErrorMessage, ((this.invocationErrorMessage!= null)&&(!this.invocationErrorMessage.isEmpty())))); copy.setInvocationErrorMessage(copyInvocationErrorMessage); } else { if (invocationErrorMessageShouldBeCopiedAndSet == Boolean.FALSE) { copy.invocationErrorMessage = null; } } } } return draftCopy; } @Override public Object createNewInstance() { return new InvocationInfo(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy