org.finra.herd.model.api.xml.JobSummary 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 javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
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 jobSummary complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="jobSummary">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="namespace" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="jobName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="startTime" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
* <element name="endTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
* <element name="status" type="{}jobStatusEnum" minOccurs="0"/>
* <element name="totalExceptions" type="{http://www.w3.org/2001/XMLSchema}long"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "jobSummary", propOrder = {
})
public class JobSummary implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, ToString2
{
private final static long serialVersionUID = -1L;
@XmlElement(required = true)
protected String id;
protected String namespace;
@XmlElement(required = true)
protected String jobName;
@XmlElement(required = true)
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar startTime;
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar endTime;
@XmlSchemaType(name = "string")
protected JobStatusEnum status;
protected long totalExceptions;
/**
* Default no-arg constructor
*
*/
public JobSummary() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public JobSummary(final String id, final String namespace, final String jobName, final XMLGregorianCalendar startTime, final XMLGregorianCalendar endTime, final JobStatusEnum status, final long totalExceptions) {
this.id = id;
this.namespace = namespace;
this.jobName = jobName;
this.startTime = startTime;
this.endTime = endTime;
this.status = status;
this.totalExceptions = totalExceptions;
}
/**
* 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 namespace property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNamespace() {
return namespace;
}
/**
* Sets the value of the namespace property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNamespace(String value) {
this.namespace = value;
}
/**
* Gets the value of the jobName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getJobName() {
return jobName;
}
/**
* Sets the value of the jobName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setJobName(String value) {
this.jobName = value;
}
/**
* Gets the value of the startTime property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getStartTime() {
return startTime;
}
/**
* Sets the value of the startTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setStartTime(XMLGregorianCalendar value) {
this.startTime = value;
}
/**
* Gets the value of the endTime property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getEndTime() {
return endTime;
}
/**
* Sets the value of the endTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setEndTime(XMLGregorianCalendar value) {
this.endTime = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link JobStatusEnum }
*
*/
public JobStatusEnum getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link JobStatusEnum }
*
*/
public void setStatus(JobStatusEnum value) {
this.status = value;
}
/**
* Gets the value of the totalExceptions property.
*
*/
public long getTotalExceptions() {
return totalExceptions;
}
/**
* Sets the value of the totalExceptions property.
*
*/
public void setTotalExceptions(long value) {
this.totalExceptions = value;
}
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 theNamespace;
theNamespace = this.getNamespace();
strategy.appendField(locator, this, "namespace", buffer, theNamespace, (this.namespace!= null));
}
{
String theJobName;
theJobName = this.getJobName();
strategy.appendField(locator, this, "jobName", buffer, theJobName, (this.jobName!= null));
}
{
XMLGregorianCalendar theStartTime;
theStartTime = this.getStartTime();
strategy.appendField(locator, this, "startTime", buffer, theStartTime, (this.startTime!= null));
}
{
XMLGregorianCalendar theEndTime;
theEndTime = this.getEndTime();
strategy.appendField(locator, this, "endTime", buffer, theEndTime, (this.endTime!= null));
}
{
JobStatusEnum theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null));
}
{
long theTotalExceptions;
theTotalExceptions = this.getTotalExceptions();
strategy.appendField(locator, this, "totalExceptions", buffer, theTotalExceptions, true);
}
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 JobSummary that = ((JobSummary) 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 lhsNamespace;
lhsNamespace = this.getNamespace();
String rhsNamespace;
rhsNamespace = that.getNamespace();
if (!strategy.equals(LocatorUtils.property(thisLocator, "namespace", lhsNamespace), LocatorUtils.property(thatLocator, "namespace", rhsNamespace), lhsNamespace, rhsNamespace, (this.namespace!= null), (that.namespace!= null))) {
return false;
}
}
{
String lhsJobName;
lhsJobName = this.getJobName();
String rhsJobName;
rhsJobName = that.getJobName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "jobName", lhsJobName), LocatorUtils.property(thatLocator, "jobName", rhsJobName), lhsJobName, rhsJobName, (this.jobName!= null), (that.jobName!= null))) {
return false;
}
}
{
XMLGregorianCalendar lhsStartTime;
lhsStartTime = this.getStartTime();
XMLGregorianCalendar rhsStartTime;
rhsStartTime = that.getStartTime();
if (!strategy.equals(LocatorUtils.property(thisLocator, "startTime", lhsStartTime), LocatorUtils.property(thatLocator, "startTime", rhsStartTime), lhsStartTime, rhsStartTime, (this.startTime!= null), (that.startTime!= null))) {
return false;
}
}
{
XMLGregorianCalendar lhsEndTime;
lhsEndTime = this.getEndTime();
XMLGregorianCalendar rhsEndTime;
rhsEndTime = that.getEndTime();
if (!strategy.equals(LocatorUtils.property(thisLocator, "endTime", lhsEndTime), LocatorUtils.property(thatLocator, "endTime", rhsEndTime), lhsEndTime, rhsEndTime, (this.endTime!= null), (that.endTime!= null))) {
return false;
}
}
{
JobStatusEnum lhsStatus;
lhsStatus = this.getStatus();
JobStatusEnum 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;
}
}
{
long lhsTotalExceptions;
lhsTotalExceptions = this.getTotalExceptions();
long rhsTotalExceptions;
rhsTotalExceptions = that.getTotalExceptions();
if (!strategy.equals(LocatorUtils.property(thisLocator, "totalExceptions", lhsTotalExceptions), LocatorUtils.property(thatLocator, "totalExceptions", rhsTotalExceptions), lhsTotalExceptions, rhsTotalExceptions, true, true)) {
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 theNamespace;
theNamespace = this.getNamespace();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "namespace", theNamespace), currentHashCode, theNamespace, (this.namespace!= null));
}
{
String theJobName;
theJobName = this.getJobName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "jobName", theJobName), currentHashCode, theJobName, (this.jobName!= null));
}
{
XMLGregorianCalendar theStartTime;
theStartTime = this.getStartTime();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "startTime", theStartTime), currentHashCode, theStartTime, (this.startTime!= null));
}
{
XMLGregorianCalendar theEndTime;
theEndTime = this.getEndTime();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "endTime", theEndTime), currentHashCode, theEndTime, (this.endTime!= null));
}
{
JobStatusEnum theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null));
}
{
long theTotalExceptions;
theTotalExceptions = this.getTotalExceptions();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "totalExceptions", theTotalExceptions), currentHashCode, theTotalExceptions, true);
}
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 JobSummary) {
final JobSummary copy = ((JobSummary) 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 namespaceShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.namespace!= null));
if (namespaceShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceNamespace;
sourceNamespace = this.getNamespace();
String copyNamespace = ((String) strategy.copy(LocatorUtils.property(locator, "namespace", sourceNamespace), sourceNamespace, (this.namespace!= null)));
copy.setNamespace(copyNamespace);
} else {
if (namespaceShouldBeCopiedAndSet == Boolean.FALSE) {
copy.namespace = null;
}
}
}
{
Boolean jobNameShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.jobName!= null));
if (jobNameShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceJobName;
sourceJobName = this.getJobName();
String copyJobName = ((String) strategy.copy(LocatorUtils.property(locator, "jobName", sourceJobName), sourceJobName, (this.jobName!= null)));
copy.setJobName(copyJobName);
} else {
if (jobNameShouldBeCopiedAndSet == Boolean.FALSE) {
copy.jobName = null;
}
}
}
{
Boolean startTimeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.startTime!= null));
if (startTimeShouldBeCopiedAndSet == Boolean.TRUE) {
XMLGregorianCalendar sourceStartTime;
sourceStartTime = this.getStartTime();
XMLGregorianCalendar copyStartTime = ((XMLGregorianCalendar) strategy.copy(LocatorUtils.property(locator, "startTime", sourceStartTime), sourceStartTime, (this.startTime!= null)));
copy.setStartTime(copyStartTime);
} else {
if (startTimeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.startTime = null;
}
}
}
{
Boolean endTimeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.endTime!= null));
if (endTimeShouldBeCopiedAndSet == Boolean.TRUE) {
XMLGregorianCalendar sourceEndTime;
sourceEndTime = this.getEndTime();
XMLGregorianCalendar copyEndTime = ((XMLGregorianCalendar) strategy.copy(LocatorUtils.property(locator, "endTime", sourceEndTime), sourceEndTime, (this.endTime!= null)));
copy.setEndTime(copyEndTime);
} else {
if (endTimeShouldBeCopiedAndSet == Boolean.FALSE) {
copy.endTime = null;
}
}
}
{
Boolean statusShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.status!= null));
if (statusShouldBeCopiedAndSet == Boolean.TRUE) {
JobStatusEnum sourceStatus;
sourceStatus = this.getStatus();
JobStatusEnum copyStatus = ((JobStatusEnum) strategy.copy(LocatorUtils.property(locator, "status", sourceStatus), sourceStatus, (this.status!= null)));
copy.setStatus(copyStatus);
} else {
if (statusShouldBeCopiedAndSet == Boolean.FALSE) {
copy.status = null;
}
}
}
{
Boolean totalExceptionsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, true);
if (totalExceptionsShouldBeCopiedAndSet == Boolean.TRUE) {
long sourceTotalExceptions;
sourceTotalExceptions = this.getTotalExceptions();
long copyTotalExceptions = strategy.copy(LocatorUtils.property(locator, "totalExceptions", sourceTotalExceptions), sourceTotalExceptions, true);
copy.setTotalExceptions(copyTotalExceptions);
} else {
if (totalExceptionsShouldBeCopiedAndSet == Boolean.FALSE) {
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new JobSummary();
}
}