You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/08/07 14:01:00 UTC
[24/51] [abbrv] [partial] airavata git commit: AIRAVATA-2505 Upgrade
Airavata to Thrift 0.10.0
http://git-wip-us.apache.org/repos/asf/airavata/blob/14ff0916/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowModel.java
index ba6569c..12f8a9b 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowModel.java
@@ -16,42 +16,15 @@
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.model;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, WorkflowModel._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowModel> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowModel");
@@ -65,20 +38,17 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
private static final org.apache.thrift.protocol.TField WORKFLOW_OUTPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowOutputs", org.apache.thrift.protocol.TType.LIST, (short)8);
private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)9);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkflowModelStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkflowModelTupleSchemeFactory());
- }
-
- private String templateId; // required
- private String name; // required
- private String graph; // required
- private String gatewayId; // required
- private String createdUser; // required
- private ByteBuffer image; // optional
- private List<org.apache.airavata.model.application.io.InputDataObjectType> workflowInputs; // optional
- private List<org.apache.airavata.model.application.io.OutputDataObjectType> workflowOutputs; // optional
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkflowModelStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkflowModelTupleSchemeFactory();
+
+ private java.lang.String templateId; // required
+ private java.lang.String name; // required
+ private java.lang.String graph; // required
+ private java.lang.String gatewayId; // required
+ private java.lang.String createdUser; // required
+ private java.nio.ByteBuffer image; // optional
+ private java.util.List<org.apache.airavata.model.application.io.InputDataObjectType> workflowInputs; // optional
+ private java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType> workflowOutputs; // optional
private long creationTime; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -93,10 +63,10 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
WORKFLOW_OUTPUTS((short)8, "workflowOutputs"),
CREATION_TIME((short)9, "creationTime");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -135,21 +105,21 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -158,7 +128,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -167,9 +137,9 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
private static final int __CREATIONTIME_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.IMAGE,_Fields.WORKFLOW_INPUTS,_Fields.WORKFLOW_OUTPUTS,_Fields.CREATION_TIME};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TEMPLATE_ID, new org.apache.thrift.meta_data.FieldMetaData("templateId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -190,7 +160,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.application.io.OutputDataObjectType.class))));
tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowModel.class, metaDataMap);
}
@@ -200,11 +170,11 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
public WorkflowModel(
- String templateId,
- String name,
- String graph,
- String gatewayId,
- String createdUser)
+ java.lang.String templateId,
+ java.lang.String name,
+ java.lang.String graph,
+ java.lang.String gatewayId,
+ java.lang.String createdUser)
{
this();
this.templateId = templateId;
@@ -238,14 +208,14 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
this.image = org.apache.thrift.TBaseHelper.copyBinary(other.image);
}
if (other.isSetWorkflowInputs()) {
- List<org.apache.airavata.model.application.io.InputDataObjectType> __this__workflowInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(other.workflowInputs.size());
+ java.util.List<org.apache.airavata.model.application.io.InputDataObjectType> __this__workflowInputs = new java.util.ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(other.workflowInputs.size());
for (org.apache.airavata.model.application.io.InputDataObjectType other_element : other.workflowInputs) {
__this__workflowInputs.add(new org.apache.airavata.model.application.io.InputDataObjectType(other_element));
}
this.workflowInputs = __this__workflowInputs;
}
if (other.isSetWorkflowOutputs()) {
- List<org.apache.airavata.model.application.io.OutputDataObjectType> __this__workflowOutputs = new ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(other.workflowOutputs.size());
+ java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType> __this__workflowOutputs = new java.util.ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(other.workflowOutputs.size());
for (org.apache.airavata.model.application.io.OutputDataObjectType other_element : other.workflowOutputs) {
__this__workflowOutputs.add(new org.apache.airavata.model.application.io.OutputDataObjectType(other_element));
}
@@ -273,11 +243,11 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
this.creationTime = 0;
}
- public String getTemplateId() {
+ public java.lang.String getTemplateId() {
return this.templateId;
}
- public void setTemplateId(String templateId) {
+ public void setTemplateId(java.lang.String templateId) {
this.templateId = templateId;
}
@@ -296,11 +266,11 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
}
- public String getName() {
+ public java.lang.String getName() {
return this.name;
}
- public void setName(String name) {
+ public void setName(java.lang.String name) {
this.name = name;
}
@@ -319,11 +289,11 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
}
- public String getGraph() {
+ public java.lang.String getGraph() {
return this.graph;
}
- public void setGraph(String graph) {
+ public void setGraph(java.lang.String graph) {
this.graph = graph;
}
@@ -342,11 +312,11 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
}
- public String getGatewayId() {
+ public java.lang.String getGatewayId() {
return this.gatewayId;
}
- public void setGatewayId(String gatewayId) {
+ public void setGatewayId(java.lang.String gatewayId) {
this.gatewayId = gatewayId;
}
@@ -365,11 +335,11 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
}
- public String getCreatedUser() {
+ public java.lang.String getCreatedUser() {
return this.createdUser;
}
- public void setCreatedUser(String createdUser) {
+ public void setCreatedUser(java.lang.String createdUser) {
this.createdUser = createdUser;
}
@@ -393,15 +363,15 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return image == null ? null : image.array();
}
- public ByteBuffer bufferForImage() {
+ public java.nio.ByteBuffer bufferForImage() {
return org.apache.thrift.TBaseHelper.copyBinary(image);
}
public void setImage(byte[] image) {
- this.image = image == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(image, image.length));
+ this.image = image == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(image.clone());
}
- public void setImage(ByteBuffer image) {
+ public void setImage(java.nio.ByteBuffer image) {
this.image = org.apache.thrift.TBaseHelper.copyBinary(image);
}
@@ -430,16 +400,16 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
public void addToWorkflowInputs(org.apache.airavata.model.application.io.InputDataObjectType elem) {
if (this.workflowInputs == null) {
- this.workflowInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>();
+ this.workflowInputs = new java.util.ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>();
}
this.workflowInputs.add(elem);
}
- public List<org.apache.airavata.model.application.io.InputDataObjectType> getWorkflowInputs() {
+ public java.util.List<org.apache.airavata.model.application.io.InputDataObjectType> getWorkflowInputs() {
return this.workflowInputs;
}
- public void setWorkflowInputs(List<org.apache.airavata.model.application.io.InputDataObjectType> workflowInputs) {
+ public void setWorkflowInputs(java.util.List<org.apache.airavata.model.application.io.InputDataObjectType> workflowInputs) {
this.workflowInputs = workflowInputs;
}
@@ -468,16 +438,16 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
public void addToWorkflowOutputs(org.apache.airavata.model.application.io.OutputDataObjectType elem) {
if (this.workflowOutputs == null) {
- this.workflowOutputs = new ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>();
+ this.workflowOutputs = new java.util.ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>();
}
this.workflowOutputs.add(elem);
}
- public List<org.apache.airavata.model.application.io.OutputDataObjectType> getWorkflowOutputs() {
+ public java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType> getWorkflowOutputs() {
return this.workflowOutputs;
}
- public void setWorkflowOutputs(List<org.apache.airavata.model.application.io.OutputDataObjectType> workflowOutputs) {
+ public void setWorkflowOutputs(java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType> workflowOutputs) {
this.workflowOutputs = workflowOutputs;
}
@@ -506,25 +476,25 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
public void unsetCreationTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
}
/** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
public boolean isSetCreationTime() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
}
public void setCreationTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TEMPLATE_ID:
if (value == null) {
unsetTemplateId();
} else {
- setTemplateId((String)value);
+ setTemplateId((java.lang.String)value);
}
break;
@@ -532,7 +502,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (value == null) {
unsetName();
} else {
- setName((String)value);
+ setName((java.lang.String)value);
}
break;
@@ -540,7 +510,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (value == null) {
unsetGraph();
} else {
- setGraph((String)value);
+ setGraph((java.lang.String)value);
}
break;
@@ -548,7 +518,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (value == null) {
unsetGatewayId();
} else {
- setGatewayId((String)value);
+ setGatewayId((java.lang.String)value);
}
break;
@@ -556,7 +526,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (value == null) {
unsetCreatedUser();
} else {
- setCreatedUser((String)value);
+ setCreatedUser((java.lang.String)value);
}
break;
@@ -564,7 +534,11 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (value == null) {
unsetImage();
} else {
- setImage((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setImage((byte[])value);
+ } else {
+ setImage((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -572,7 +546,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (value == null) {
unsetWorkflowInputs();
} else {
- setWorkflowInputs((List<org.apache.airavata.model.application.io.InputDataObjectType>)value);
+ setWorkflowInputs((java.util.List<org.apache.airavata.model.application.io.InputDataObjectType>)value);
}
break;
@@ -580,7 +554,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (value == null) {
unsetWorkflowOutputs();
} else {
- setWorkflowOutputs((List<org.apache.airavata.model.application.io.OutputDataObjectType>)value);
+ setWorkflowOutputs((java.util.List<org.apache.airavata.model.application.io.OutputDataObjectType>)value);
}
break;
@@ -588,14 +562,14 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (value == null) {
unsetCreationTime();
} else {
- setCreationTime((Long)value);
+ setCreationTime((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TEMPLATE_ID:
return getTemplateId();
@@ -625,13 +599,13 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return getCreationTime();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -654,11 +628,11 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
case CREATION_TIME:
return isSetCreationTime();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof WorkflowModel)
@@ -669,6 +643,8 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
public boolean equals(WorkflowModel that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_templateId = true && this.isSetTemplateId();
boolean that_present_templateId = true && that.isSetTemplateId();
@@ -756,54 +732,45 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_templateId = true && (isSetTemplateId());
- list.add(present_templateId);
- if (present_templateId)
- list.add(templateId);
+ hashCode = hashCode * 8191 + ((isSetTemplateId()) ? 131071 : 524287);
+ if (isSetTemplateId())
+ hashCode = hashCode * 8191 + templateId.hashCode();
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
+ hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
+ if (isSetName())
+ hashCode = hashCode * 8191 + name.hashCode();
- boolean present_graph = true && (isSetGraph());
- list.add(present_graph);
- if (present_graph)
- list.add(graph);
+ hashCode = hashCode * 8191 + ((isSetGraph()) ? 131071 : 524287);
+ if (isSetGraph())
+ hashCode = hashCode * 8191 + graph.hashCode();
- boolean present_gatewayId = true && (isSetGatewayId());
- list.add(present_gatewayId);
- if (present_gatewayId)
- list.add(gatewayId);
+ hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
+ if (isSetGatewayId())
+ hashCode = hashCode * 8191 + gatewayId.hashCode();
- boolean present_createdUser = true && (isSetCreatedUser());
- list.add(present_createdUser);
- if (present_createdUser)
- list.add(createdUser);
+ hashCode = hashCode * 8191 + ((isSetCreatedUser()) ? 131071 : 524287);
+ if (isSetCreatedUser())
+ hashCode = hashCode * 8191 + createdUser.hashCode();
- boolean present_image = true && (isSetImage());
- list.add(present_image);
- if (present_image)
- list.add(image);
+ hashCode = hashCode * 8191 + ((isSetImage()) ? 131071 : 524287);
+ if (isSetImage())
+ hashCode = hashCode * 8191 + image.hashCode();
- boolean present_workflowInputs = true && (isSetWorkflowInputs());
- list.add(present_workflowInputs);
- if (present_workflowInputs)
- list.add(workflowInputs);
+ hashCode = hashCode * 8191 + ((isSetWorkflowInputs()) ? 131071 : 524287);
+ if (isSetWorkflowInputs())
+ hashCode = hashCode * 8191 + workflowInputs.hashCode();
- boolean present_workflowOutputs = true && (isSetWorkflowOutputs());
- list.add(present_workflowOutputs);
- if (present_workflowOutputs)
- list.add(workflowOutputs);
+ hashCode = hashCode * 8191 + ((isSetWorkflowOutputs()) ? 131071 : 524287);
+ if (isSetWorkflowOutputs())
+ hashCode = hashCode * 8191 + workflowOutputs.hashCode();
- boolean present_creationTime = true && (isSetCreationTime());
- list.add(present_creationTime);
- if (present_creationTime)
- list.add(creationTime);
+ hashCode = hashCode * 8191 + ((isSetCreationTime()) ? 131071 : 524287);
+ if (isSetCreationTime())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creationTime);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -814,7 +781,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTemplateId()).compareTo(other.isSetTemplateId());
+ lastComparison = java.lang.Boolean.valueOf(isSetTemplateId()).compareTo(other.isSetTemplateId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -824,7 +791,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -834,7 +801,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetGraph()).compareTo(other.isSetGraph());
+ lastComparison = java.lang.Boolean.valueOf(isSetGraph()).compareTo(other.isSetGraph());
if (lastComparison != 0) {
return lastComparison;
}
@@ -844,7 +811,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+ lastComparison = java.lang.Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -854,7 +821,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreatedUser()).compareTo(other.isSetCreatedUser());
+ lastComparison = java.lang.Boolean.valueOf(isSetCreatedUser()).compareTo(other.isSetCreatedUser());
if (lastComparison != 0) {
return lastComparison;
}
@@ -864,7 +831,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
+ lastComparison = java.lang.Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -874,7 +841,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetWorkflowInputs()).compareTo(other.isSetWorkflowInputs());
+ lastComparison = java.lang.Boolean.valueOf(isSetWorkflowInputs()).compareTo(other.isSetWorkflowInputs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -884,7 +851,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetWorkflowOutputs()).compareTo(other.isSetWorkflowOutputs());
+ lastComparison = java.lang.Boolean.valueOf(isSetWorkflowOutputs()).compareTo(other.isSetWorkflowOutputs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -894,7 +861,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -912,16 +879,16 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WorkflowModel(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkflowModel(");
boolean first = true;
sb.append("templateId:");
@@ -1036,7 +1003,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1046,13 +1013,13 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
}
- private static class WorkflowModelStandardSchemeFactory implements SchemeFactory {
+ private static class WorkflowModelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkflowModelStandardScheme getScheme() {
return new WorkflowModelStandardScheme();
}
}
- private static class WorkflowModelStandardScheme extends StandardScheme<WorkflowModel> {
+ private static class WorkflowModelStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkflowModel> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowModel struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1116,7 +1083,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.workflowInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(_list0.size);
+ struct.workflowInputs = new java.util.ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(_list0.size);
org.apache.airavata.model.application.io.InputDataObjectType _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
@@ -1135,7 +1102,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
- struct.workflowOutputs = new ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(_list3.size);
+ struct.workflowOutputs = new java.util.ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(_list3.size);
org.apache.airavata.model.application.io.OutputDataObjectType _elem4;
for (int _i5 = 0; _i5 < _list3.size; ++_i5)
{
@@ -1242,23 +1209,23 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
- private static class WorkflowModelTupleSchemeFactory implements SchemeFactory {
+ private static class WorkflowModelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkflowModelTupleScheme getScheme() {
return new WorkflowModelTupleScheme();
}
}
- private static class WorkflowModelTupleScheme extends TupleScheme<WorkflowModel> {
+ private static class WorkflowModelTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkflowModel> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowModel struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.templateId);
oprot.writeString(struct.name);
oprot.writeString(struct.graph);
oprot.writeString(struct.gatewayId);
oprot.writeString(struct.createdUser);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetImage()) {
optionals.set(0);
}
@@ -1300,7 +1267,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowModel struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.templateId = iprot.readString();
struct.setTemplateIdIsSet(true);
struct.name = iprot.readString();
@@ -1311,7 +1278,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
struct.setGatewayIdIsSet(true);
struct.createdUser = iprot.readString();
struct.setCreatedUserIsSet(true);
- BitSet incoming = iprot.readBitSet(4);
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.image = iprot.readBinary();
struct.setImageIsSet(true);
@@ -1319,7 +1286,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.workflowInputs = new ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(_list10.size);
+ struct.workflowInputs = new java.util.ArrayList<org.apache.airavata.model.application.io.InputDataObjectType>(_list10.size);
org.apache.airavata.model.application.io.InputDataObjectType _elem11;
for (int _i12 = 0; _i12 < _list10.size; ++_i12)
{
@@ -1333,7 +1300,7 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.workflowOutputs = new ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(_list13.size);
+ struct.workflowOutputs = new java.util.ArrayList<org.apache.airavata.model.application.io.OutputDataObjectType>(_list13.size);
org.apache.airavata.model.application.io.OutputDataObjectType _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
@@ -1351,5 +1318,8 @@ public class WorkflowModel implements org.apache.thrift.TBase<WorkflowModel, Wor
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/14ff0916/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowState.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowState.java
index 5faac14..7348214 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowState.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowState.java
@@ -16,7 +16,7 @@
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/airavata/blob/14ff0916/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowStatus.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowStatus.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowStatus.java
index deadf51..6b642f1 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowStatus.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/WorkflowStatus.java
@@ -16,42 +16,15 @@
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.model;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, WorkflowStatus._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowStatus> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowStatus");
@@ -59,15 +32,12 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
private static final org.apache.thrift.protocol.TField TIME_OF_STATE_CHANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeOfStateChange", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkflowStatusStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkflowStatusTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkflowStatusStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkflowStatusTupleSchemeFactory();
private WorkflowState state; // required
private long timeOfStateChange; // optional
- private String reason; // optional
+ private java.lang.String reason; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -79,10 +49,10 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
TIME_OF_STATE_CHANGE((short)2, "timeOfStateChange"),
REASON((short)3, "reason");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -109,21 +79,21 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -132,7 +102,7 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,16 +111,16 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
private static final int __TIMEOFSTATECHANGE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TIME_OF_STATE_CHANGE,_Fields.REASON};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WorkflowState.class)));
tmpMap.put(_Fields.TIME_OF_STATE_CHANGE, new org.apache.thrift.meta_data.FieldMetaData("timeOfStateChange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowStatus.class, metaDataMap);
}
@@ -231,23 +201,23 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
}
public void unsetTimeOfStateChange() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
}
/** Returns true if field timeOfStateChange is set (has been assigned a value) and false otherwise */
public boolean isSetTimeOfStateChange() {
- return EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID);
}
public void setTimeOfStateChangeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOFSTATECHANGE_ISSET_ID, value);
}
- public String getReason() {
+ public java.lang.String getReason() {
return this.reason;
}
- public void setReason(String reason) {
+ public void setReason(java.lang.String reason) {
this.reason = reason;
}
@@ -266,7 +236,7 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case STATE:
if (value == null) {
@@ -280,7 +250,7 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
if (value == null) {
unsetTimeOfStateChange();
} else {
- setTimeOfStateChange((Long)value);
+ setTimeOfStateChange((java.lang.Long)value);
}
break;
@@ -288,14 +258,14 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
if (value == null) {
unsetReason();
} else {
- setReason((String)value);
+ setReason((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STATE:
return getState();
@@ -307,13 +277,13 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
return getReason();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -324,11 +294,11 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
case REASON:
return isSetReason();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof WorkflowStatus)
@@ -339,6 +309,8 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
public boolean equals(WorkflowStatus that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_state = true && this.isSetState();
boolean that_present_state = true && that.isSetState();
@@ -372,24 +344,21 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_state = true && (isSetState());
- list.add(present_state);
- if (present_state)
- list.add(state.getValue());
+ hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
+ if (isSetState())
+ hashCode = hashCode * 8191 + state.getValue();
- boolean present_timeOfStateChange = true && (isSetTimeOfStateChange());
- list.add(present_timeOfStateChange);
- if (present_timeOfStateChange)
- list.add(timeOfStateChange);
+ hashCode = hashCode * 8191 + ((isSetTimeOfStateChange()) ? 131071 : 524287);
+ if (isSetTimeOfStateChange())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeOfStateChange);
- boolean present_reason = true && (isSetReason());
- list.add(present_reason);
- if (present_reason)
- list.add(reason);
+ hashCode = hashCode * 8191 + ((isSetReason()) ? 131071 : 524287);
+ if (isSetReason())
+ hashCode = hashCode * 8191 + reason.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -400,7 +369,7 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
+ lastComparison = java.lang.Boolean.valueOf(isSetState()).compareTo(other.isSetState());
if (lastComparison != 0) {
return lastComparison;
}
@@ -410,7 +379,7 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
+ lastComparison = java.lang.Boolean.valueOf(isSetTimeOfStateChange()).compareTo(other.isSetTimeOfStateChange());
if (lastComparison != 0) {
return lastComparison;
}
@@ -420,7 +389,7 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
+ lastComparison = java.lang.Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
if (lastComparison != 0) {
return lastComparison;
}
@@ -438,16 +407,16 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WorkflowStatus(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkflowStatus(");
boolean first = true;
sb.append("state:");
@@ -494,7 +463,7 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -504,13 +473,13 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
}
}
- private static class WorkflowStatusStandardSchemeFactory implements SchemeFactory {
+ private static class WorkflowStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkflowStatusStandardScheme getScheme() {
return new WorkflowStatusStandardScheme();
}
}
- private static class WorkflowStatusStandardScheme extends StandardScheme<WorkflowStatus> {
+ private static class WorkflowStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkflowStatus> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowStatus struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -582,19 +551,19 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
}
- private static class WorkflowStatusTupleSchemeFactory implements SchemeFactory {
+ private static class WorkflowStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkflowStatusTupleScheme getScheme() {
return new WorkflowStatusTupleScheme();
}
}
- private static class WorkflowStatusTupleScheme extends TupleScheme<WorkflowStatus> {
+ private static class WorkflowStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkflowStatus> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowStatus struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.state.getValue());
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTimeOfStateChange()) {
optionals.set(0);
}
@@ -612,10 +581,10 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowStatus struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.state = org.apache.airavata.model.WorkflowState.findByValue(iprot.readI32());
struct.setStateIsSet(true);
- BitSet incoming = iprot.readBitSet(2);
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.timeOfStateChange = iprot.readI64();
struct.setTimeOfStateChangeIsSet(true);
@@ -627,5 +596,8 @@ public class WorkflowStatus implements org.apache.thrift.TBase<WorkflowStatus, W
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}