org.finra.herd.model.api.xml.EmrStep Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of herd-model-api Show documentation
Show all versions of herd-model-api Show documentation
This project contains the model API classes. This contains the herd XSD and generates Java POJO's from them. These classes are used for incoming
and outgoing calls into the system (e.g. via REST).
package org.finra.herd.model.api.xml;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for emrStep complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="emrStep">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="stepName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="jarLocation" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="mainClass" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="scriptArguments" type="{}scriptArguments" minOccurs="0"/>
* <element name="continueOnError" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="status" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "emrStep", propOrder = {
})
public class EmrStep implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, ToString2
{
private final static long serialVersionUID = -1L;
@XmlElement(required = true)
protected String id;
@XmlElement(required = true)
protected String stepName;
protected String jarLocation;
protected String mainClass;
@XmlElementWrapper
@XmlElement(name = "argument")
protected List scriptArguments;
protected String continueOnError;
@XmlElement(required = true)
protected String status;
/**
* Default no-arg constructor
*
*/
public EmrStep() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public EmrStep(final String id, final String stepName, final String jarLocation, final String mainClass, final List scriptArguments, final String continueOnError, final String status) {
this.id = id;
this.stepName = stepName;
this.jarLocation = jarLocation;
this.mainClass = mainClass;
this.scriptArguments = scriptArguments;
this.continueOnError = continueOnError;
this.status = status;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the stepName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStepName() {
return stepName;
}
/**
* Sets the value of the stepName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStepName(String value) {
this.stepName = value;
}
/**
* Gets the value of the jarLocation property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getJarLocation() {
return jarLocation;
}
/**
* Sets the value of the jarLocation property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setJarLocation(String value) {
this.jarLocation = value;
}
/**
* Gets the value of the mainClass property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMainClass() {
return mainClass;
}
/**
* Sets the value of the mainClass property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMainClass(String value) {
this.mainClass = value;
}
/**
* Gets the value of the continueOnError property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getContinueOnError() {
return continueOnError;
}
/**
* Sets the value of the continueOnError property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setContinueOnError(String value) {
this.continueOnError = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStatus(String value) {
this.status = value;
}
public List getScriptArguments() {
return scriptArguments;
}
public void setScriptArguments(List scriptArguments) {
this.scriptArguments = scriptArguments;
}
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
String theId;
theId = this.getId();
strategy.appendField(locator, this, "id", buffer, theId, (this.id!= null));
}
{
String theStepName;
theStepName = this.getStepName();
strategy.appendField(locator, this, "stepName", buffer, theStepName, (this.stepName!= null));
}
{
String theJarLocation;
theJarLocation = this.getJarLocation();
strategy.appendField(locator, this, "jarLocation", buffer, theJarLocation, (this.jarLocation!= null));
}
{
String theMainClass;
theMainClass = this.getMainClass();
strategy.appendField(locator, this, "mainClass", buffer, theMainClass, (this.mainClass!= null));
}
{
List theScriptArguments;
theScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null);
strategy.appendField(locator, this, "scriptArguments", buffer, theScriptArguments, (this.scriptArguments!= null));
}
{
String theContinueOnError;
theContinueOnError = this.getContinueOnError();
strategy.appendField(locator, this, "continueOnError", buffer, theContinueOnError, (this.continueOnError!= null));
}
{
String theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null));
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final EmrStep that = ((EmrStep) object);
{
String lhsId;
lhsId = this.getId();
String rhsId;
rhsId = that.getId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId, (this.id!= null), (that.id!= null))) {
return false;
}
}
{
String lhsStepName;
lhsStepName = this.getStepName();
String rhsStepName;
rhsStepName = that.getStepName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "stepName", lhsStepName), LocatorUtils.property(thatLocator, "stepName", rhsStepName), lhsStepName, rhsStepName, (this.stepName!= null), (that.stepName!= null))) {
return false;
}
}
{
String lhsJarLocation;
lhsJarLocation = this.getJarLocation();
String rhsJarLocation;
rhsJarLocation = that.getJarLocation();
if (!strategy.equals(LocatorUtils.property(thisLocator, "jarLocation", lhsJarLocation), LocatorUtils.property(thatLocator, "jarLocation", rhsJarLocation), lhsJarLocation, rhsJarLocation, (this.jarLocation!= null), (that.jarLocation!= null))) {
return false;
}
}
{
String lhsMainClass;
lhsMainClass = this.getMainClass();
String rhsMainClass;
rhsMainClass = that.getMainClass();
if (!strategy.equals(LocatorUtils.property(thisLocator, "mainClass", lhsMainClass), LocatorUtils.property(thatLocator, "mainClass", rhsMainClass), lhsMainClass, rhsMainClass, (this.mainClass!= null), (that.mainClass!= null))) {
return false;
}
}
{
List lhsScriptArguments;
lhsScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null);
List rhsScriptArguments;
rhsScriptArguments = ((that.scriptArguments!= null)?that.getScriptArguments():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "scriptArguments", lhsScriptArguments), LocatorUtils.property(thatLocator, "scriptArguments", rhsScriptArguments), lhsScriptArguments, rhsScriptArguments, (this.scriptArguments!= null), (that.scriptArguments!= null))) {
return false;
}
}
{
String lhsContinueOnError;
lhsContinueOnError = this.getContinueOnError();
String rhsContinueOnError;
rhsContinueOnError = that.getContinueOnError();
if (!strategy.equals(LocatorUtils.property(thisLocator, "continueOnError", lhsContinueOnError), LocatorUtils.property(thatLocator, "continueOnError", rhsContinueOnError), lhsContinueOnError, rhsContinueOnError, (this.continueOnError!= null), (that.continueOnError!= null))) {
return false;
}
}
{
String lhsStatus;
lhsStatus = this.getStatus();
String rhsStatus;
rhsStatus = that.getStatus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus, (this.status!= null), (that.status!= null))) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = 1;
{
String theId;
theId = this.getId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId, (this.id!= null));
}
{
String theStepName;
theStepName = this.getStepName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "stepName", theStepName), currentHashCode, theStepName, (this.stepName!= null));
}
{
String theJarLocation;
theJarLocation = this.getJarLocation();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "jarLocation", theJarLocation), currentHashCode, theJarLocation, (this.jarLocation!= null));
}
{
String theMainClass;
theMainClass = this.getMainClass();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "mainClass", theMainClass), currentHashCode, theMainClass, (this.mainClass!= null));
}
{
List theScriptArguments;
theScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "scriptArguments", theScriptArguments), currentHashCode, theScriptArguments, (this.scriptArguments!= null));
}
{
String theContinueOnError;
theContinueOnError = this.getContinueOnError();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "continueOnError", theContinueOnError), currentHashCode, theContinueOnError, (this.continueOnError!= null));
}
{
String theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null));
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof EmrStep) {
final EmrStep copy = ((EmrStep) draftCopy);
{
Boolean idShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.id!= null));
if (idShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceId;
sourceId = this.getId();
String copyId = ((String) strategy.copy(LocatorUtils.property(locator, "id", sourceId), sourceId, (this.id!= null)));
copy.setId(copyId);
} else {
if (idShouldBeCopiedAndSet == Boolean.FALSE) {
copy.id = null;
}
}
}
{
Boolean stepNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.stepName!= null));
if (stepNameShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceStepName;
sourceStepName = this.getStepName();
String copyStepName = ((String) strategy.copy(LocatorUtils.property(locator, "stepName", sourceStepName), sourceStepName, (this.stepName!= null)));
copy.setStepName(copyStepName);
} else {
if (stepNameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.stepName = null;
}
}
}
{
Boolean jarLocationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.jarLocation!= null));
if (jarLocationShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceJarLocation;
sourceJarLocation = this.getJarLocation();
String copyJarLocation = ((String) strategy.copy(LocatorUtils.property(locator, "jarLocation", sourceJarLocation), sourceJarLocation, (this.jarLocation!= null)));
copy.setJarLocation(copyJarLocation);
} else {
if (jarLocationShouldBeCopiedAndSet == Boolean.FALSE) {
copy.jarLocation = null;
}
}
}
{
Boolean mainClassShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.mainClass!= null));
if (mainClassShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceMainClass;
sourceMainClass = this.getMainClass();
String copyMainClass = ((String) strategy.copy(LocatorUtils.property(locator, "mainClass", sourceMainClass), sourceMainClass, (this.mainClass!= null)));
copy.setMainClass(copyMainClass);
} else {
if (mainClassShouldBeCopiedAndSet == Boolean.FALSE) {
copy.mainClass = null;
}
}
}
{
Boolean scriptArgumentsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.scriptArguments!= null));
if (scriptArgumentsShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceScriptArguments;
sourceScriptArguments = ((this.scriptArguments!= null)?this.getScriptArguments():null);
@SuppressWarnings("unchecked")
List copyScriptArguments = ((List ) strategy.copy(LocatorUtils.property(locator, "scriptArguments", sourceScriptArguments), sourceScriptArguments, (this.scriptArguments!= null)));
copy.scriptArguments = null;
if (copyScriptArguments!= null) {
copy.setScriptArguments(copyScriptArguments);
}
} else {
if (scriptArgumentsShouldBeCopiedAndSet == Boolean.FALSE) {
copy.scriptArguments = null;
}
}
}
{
Boolean continueOnErrorShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.continueOnError!= null));
if (continueOnErrorShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceContinueOnError;
sourceContinueOnError = this.getContinueOnError();
String copyContinueOnError = ((String) strategy.copy(LocatorUtils.property(locator, "continueOnError", sourceContinueOnError), sourceContinueOnError, (this.continueOnError!= null)));
copy.setContinueOnError(copyContinueOnError);
} else {
if (continueOnErrorShouldBeCopiedAndSet == Boolean.FALSE) {
copy.continueOnError = null;
}
}
}
{
Boolean statusShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.status!= null));
if (statusShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceStatus;
sourceStatus = this.getStatus();
String copyStatus = ((String) strategy.copy(LocatorUtils.property(locator, "status", sourceStatus), sourceStatus, (this.status!= null)));
copy.setStatus(copyStatus);
} else {
if (statusShouldBeCopiedAndSet == Boolean.FALSE) {
copy.status = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new EmrStep();
}
}