org.finra.herd.model.api.xml.HadoopJarStep Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of herd-model-api-15 Show documentation
Show all versions of herd-model-api-15 Show documentation
This project contains the model API classes compiled for JDK 1.5 and above. This project depends on herd-model-api and should not contain any
actual files.
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 hadoopJarStep complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="hadoopJarStep">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="stepName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="jarLocation" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <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}boolean" minOccurs="0"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "hadoopJarStep", propOrder = {
})
public class HadoopJarStep implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, ToString2
{
private final static long serialVersionUID = -1L;
@XmlElement(required = true)
protected String stepName;
@XmlElement(required = true)
protected String jarLocation;
protected String mainClass;
@XmlElementWrapper
@XmlElement(name = "argument")
protected List scriptArguments;
protected Boolean continueOnError;
/**
* Default no-arg constructor
*
*/
public HadoopJarStep() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public HadoopJarStep(final String stepName, final String jarLocation, final String mainClass, final List scriptArguments, final Boolean continueOnError) {
this.stepName = stepName;
this.jarLocation = jarLocation;
this.mainClass = mainClass;
this.scriptArguments = scriptArguments;
this.continueOnError = continueOnError;
}
/**
* 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 Boolean }
*
*/
public Boolean isContinueOnError() {
return continueOnError;
}
/**
* Sets the value of the continueOnError property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setContinueOnError(Boolean value) {
this.continueOnError = 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 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));
}
{
Boolean theContinueOnError;
theContinueOnError = this.isContinueOnError();
strategy.appendField(locator, this, "continueOnError", buffer, theContinueOnError, (this.continueOnError!= 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 HadoopJarStep that = ((HadoopJarStep) object);
{
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;
}
}
{
Boolean lhsContinueOnError;
lhsContinueOnError = this.isContinueOnError();
Boolean rhsContinueOnError;
rhsContinueOnError = that.isContinueOnError();
if (!strategy.equals(LocatorUtils.property(thisLocator, "continueOnError", lhsContinueOnError), LocatorUtils.property(thatLocator, "continueOnError", rhsContinueOnError), lhsContinueOnError, rhsContinueOnError, (this.continueOnError!= null), (that.continueOnError!= 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 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));
}
{
Boolean theContinueOnError;
theContinueOnError = this.isContinueOnError();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "continueOnError", theContinueOnError), currentHashCode, theContinueOnError, (this.continueOnError!= 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 HadoopJarStep) {
final HadoopJarStep copy = ((HadoopJarStep) draftCopy);
{
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) {
Boolean sourceContinueOnError;
sourceContinueOnError = this.isContinueOnError();
Boolean copyContinueOnError = ((Boolean) strategy.copy(LocatorUtils.property(locator, "continueOnError", sourceContinueOnError), sourceContinueOnError, (this.continueOnError!= null)));
copy.setContinueOnError(copyContinueOnError);
} else {
if (continueOnErrorShouldBeCopiedAndSet == Boolean.FALSE) {
copy.continueOnError = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new HadoopJarStep();
}
}