rapture.common.dp.WorkOrder Maven / Gradle / Ivy
/**
* The MIT License (MIT)
*
* Copyright (C) 2011-2016 Incapture Technologies LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* This file is autogenerated and any changes will be overwritten.
*/
package rapture.common.dp;
import rapture.common.*;
import rapture.object.Searchable;
import rapture.object.Storable;
import rapture.object.Debugable;
import rapture.common.version.ApiVersion;
import rapture.common.impl.jackson.JacksonUtil;
import java.util.List;
import java.util.Map;
import rapture.common.Scheme;
import rapture.object.Addressable;
import rapture.common.model.IndexConfig;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
**/
@SuppressWarnings("all")
public class WorkOrder implements RaptureTransferObject, Debugable ,Storable , Addressable {
/*
* Start of field 'workOrderURI' (String)
*/
private String workOrderURI;
@JsonProperty("workOrderURI")
public String getWorkOrderURI() {
return workOrderURI;
}
@JsonProperty("workOrderURI")
public void setWorkOrderURI(String workOrderURI) {
this.workOrderURI = new RaptureURI(workOrderURI, Scheme.WORKORDER).toString() /* TODO remove toString */ ;
}
/*
* end of field 'workOrderURI' (String)
*/
/*
* Start of field 'workflowURI' (String)
*/
private String workflowURI;
@JsonProperty("workflowURI")
public String getWorkflowURI() {
return workflowURI;
}
@JsonProperty("workflowURI")
public void setWorkflowURI(String workflowURI) {
this.workflowURI = new RaptureURI(workflowURI, Scheme.WORKFLOW).toString() /* TODO remove toString */ ;
}
/*
* end of field 'workflowURI' (String)
*/
/*
* Start of field 'workerIds' (List)
*/
private List workerIds;
@JsonProperty("workerIds")
public List getWorkerIds() {
return workerIds;
}
@JsonProperty("workerIds")
public void setWorkerIds(List workerIds) {
this.workerIds = workerIds ;
}
/*
* end of field 'workerIds' (List)
*/
/*
* Start of field 'outputs' (Map)
*/
private Map outputs;
@JsonProperty("outputs")
public Map getOutputs() {
return outputs;
}
@JsonProperty("outputs")
public void setOutputs(Map outputs) {
this.outputs = outputs ;
}
/*
* end of field 'outputs' (Map)
*/
/*
* Start of field 'pendingIds' (List)
*/
private List pendingIds;
@JsonProperty("pendingIds")
public List getPendingIds() {
return pendingIds;
}
@JsonProperty("pendingIds")
public void setPendingIds(List pendingIds) {
this.pendingIds = pendingIds ;
}
/*
* end of field 'pendingIds' (List)
*/
/*
* Start of field 'priority' (Integer)
*/
private Integer priority;
@JsonProperty("priority")
public Integer getPriority() {
return priority;
}
@JsonProperty("priority")
public void setPriority(Integer priority) {
this.priority = priority ;
}
/*
* end of field 'priority' (Integer)
*/
/*
* Start of field 'startTime' (Long)
*/
private Long startTime;
@JsonProperty("startTime")
public Long getStartTime() {
return startTime;
}
@JsonProperty("startTime")
public void setStartTime(Long startTime) {
this.startTime = startTime ;
}
/*
* end of field 'startTime' (Long)
*/
/*
* Start of field 'endTime' (Long)
*/
private Long endTime = new Long(-1);
@JsonProperty("endTime")
public Long getEndTime() {
return endTime;
}
@JsonProperty("endTime")
public void setEndTime(Long endTime) {
this.endTime = endTime ;
}
/*
* end of field 'endTime' (Long)
*/
/*
* Start of field 'semaphoreType' (SemaphoreType)
*/
private SemaphoreType semaphoreType = SemaphoreType.UNLIMITED;
@JsonProperty("semaphoreType")
public SemaphoreType getSemaphoreType() {
return semaphoreType;
}
@JsonProperty("semaphoreType")
public void setSemaphoreType(SemaphoreType semaphoreType) {
this.semaphoreType = semaphoreType ;
}
/*
* end of field 'semaphoreType' (SemaphoreType)
*/
/*
* Start of field 'semaphoreConfig' (String)
*/
private String semaphoreConfig;
@JsonProperty("semaphoreConfig")
public String getSemaphoreConfig() {
return semaphoreConfig;
}
@JsonProperty("semaphoreConfig")
public void setSemaphoreConfig(String semaphoreConfig) {
this.semaphoreConfig = semaphoreConfig ;
}
/*
* end of field 'semaphoreConfig' (String)
*/
/*
* Start of field 'status' (WorkOrderExecutionState)
*/
private WorkOrderExecutionState status;
@JsonProperty("status")
public WorkOrderExecutionState getStatus() {
return status;
}
@JsonProperty("status")
public void setStatus(WorkOrderExecutionState status) {
this.status = status ;
}
/*
* end of field 'status' (WorkOrderExecutionState)
*/
//@Override
public RaptureURI getAddressURI() {
return new RaptureURI(getStoragePath(), Scheme.WORKORDER);
// return new WORKORDERURI(getStoragePath());
}
public static final Scheme scheme = Scheme.WORKORDER;
//@Override
public Scheme getScheme() {
return scheme;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((outputs == null) ? 0 : outputs.hashCode());
result = prime * result + ((workflowURI == null) ? 0 : workflowURI.hashCode());
result = prime * result + ((workOrderURI == null) ? 0 : workOrderURI.hashCode());
result = prime * result + ((workerIds == null) ? 0 : workerIds.hashCode());
result = prime * result + ((startTime == null) ? 0 : startTime.hashCode());
result = prime * result + ((semaphoreType == null) ? 0 : semaphoreType.hashCode());
result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
result = prime * result + ((priority == null) ? 0 : priority.hashCode());
result = prime * result + ((semaphoreConfig == null) ? 0 : semaphoreConfig.hashCode());
result = prime * result + ((pendingIds == null) ? 0 : pendingIds.hashCode());
result = prime * result + ((status == null) ? 0 : status.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
WorkOrder other = (WorkOrder) obj;
if (outputs == null) {
if (other.outputs != null) {
return false;
}
} else if (!outputs.equals(other.outputs)) {
return false;
}
if (workflowURI == null) {
if (other.workflowURI != null) {
return false;
}
} else if (!workflowURI.equals(other.workflowURI)) {
return false;
}
if (workOrderURI == null) {
if (other.workOrderURI != null) {
return false;
}
} else if (!workOrderURI.equals(other.workOrderURI)) {
return false;
}
if (workerIds == null) {
if (other.workerIds != null) {
return false;
}
} else if (!workerIds.equals(other.workerIds)) {
return false;
}
if (startTime == null) {
if (other.startTime != null) {
return false;
}
} else if (!startTime.equals(other.startTime)) {
return false;
}
if (semaphoreType == null) {
if (other.semaphoreType != null) {
return false;
}
} else if (!semaphoreType.equals(other.semaphoreType)) {
return false;
}
if (endTime == null) {
if (other.endTime != null) {
return false;
}
} else if (!endTime.equals(other.endTime)) {
return false;
}
if (priority == null) {
if (other.priority != null) {
return false;
}
} else if (!priority.equals(other.priority)) {
return false;
}
if (semaphoreConfig == null) {
if (other.semaphoreConfig != null) {
return false;
}
} else if (!semaphoreConfig.equals(other.semaphoreConfig)) {
return false;
}
if (pendingIds == null) {
if (other.pendingIds != null) {
return false;
}
} else if (!pendingIds.equals(other.pendingIds)) {
return false;
}
if (status == null) {
if (other.status != null) {
return false;
}
} else if (!status.equals(other.status)) {
return false;
}
return true;
}
/**/
public String debug() {
StringBuilder sb = new StringBuilder();
{
sb.append(" outputs= ");
Object o = outputs;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" workflowURI= ");
Object o = workflowURI;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" workOrderURI= ");
Object o = workOrderURI;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" workerIds= ");
Object o = workerIds;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" startTime= ");
Object o = startTime;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" semaphoreType= ");
Object o = semaphoreType;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" endTime= ");
Object o = endTime;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" priority= ");
Object o = priority;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" semaphoreConfig= ");
Object o = semaphoreConfig;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" pendingIds= ");
Object o = pendingIds;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" status= ");
Object o = status;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
return sb.append("\n").toString();
}
@Override
public String getStoragePath() {
// Add key fields
return new WorkOrderPathBuilder()
.workOrderURI(getWorkOrderURI())
.buildStoragePath();
}
@Override
public RaptureURI getStorageLocation() {
return new WorkOrderPathBuilder()
.workOrderURI(getWorkOrderURI())
.buildStorageLocation();
}
@Override
public String toString() {
return JacksonUtil.jsonFromObject(this);
}
private ApiVersion _raptureVersion;
@JsonProperty("_raptureVersion")
public ApiVersion get_raptureVersion() {
return _raptureVersion;
}
@JsonProperty("_raptureVersion")
public void set_raptureVersion(ApiVersion _raptureVersion) {
this._raptureVersion = _raptureVersion;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy