http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java index 64918ff..5da774e 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/ExperimentSummaryModel.java @@ -1,4 +1,21 @@ /** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING @@ -6,33 +23,46 @@ */ package org.apache.airavata.model.experiment; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.protocol.TTupleProtocol; 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.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 java.util.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-22") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-23") public class ExperimentSummaryModel implements org.apache.thrift.TBase<ExperimentSummaryModel, ExperimentSummaryModel._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentSummaryModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentSummaryModel"); private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField PROJECT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("projectId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3); - 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)4); - private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField EXECUTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("executionId", org.apache.thrift.protocol.TType.STRING, (short)8); - private static final org.apache.thrift.protocol.TField EXPERIMENT_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentStatus", org.apache.thrift.protocol.TType.STRING, (short)9); - private static final org.apache.thrift.protocol.TField STATUS_UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("statusUpdateTime", org.apache.thrift.protocol.TType.I64, (short)10); + 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)3); + private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField EXPERIMENT_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentStatus", org.apache.thrift.protocol.TType.STRUCT, (short)8); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -40,29 +70,25 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen schemes.put(TupleScheme.class, new ExperimentSummaryModelTupleSchemeFactory()); } - public String experimentId; // required - public String projectId; // required - public String gatewayId; // required - public long creationTime; // optional - public String userName; // required - public String name; // required - public String description; // optional - public String executionId; // optional - public String experimentStatus; // optional - public long statusUpdateTime; // optional + private String experimentId; // required + private String projectId; // required + private long creationTime; // optional + private String userName; // required + private String name; // required + private String description; // optional + private String applicationId; // optional + private org.apache.airavata.model.status.ExperimentStatus experimentStatus; // 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 { EXPERIMENT_ID((short)1, "experimentId"), PROJECT_ID((short)2, "projectId"), - GATEWAY_ID((short)3, "gatewayId"), - CREATION_TIME((short)4, "creationTime"), - USER_NAME((short)5, "userName"), - NAME((short)6, "name"), - DESCRIPTION((short)7, "description"), - EXECUTION_ID((short)8, "executionId"), - EXPERIMENT_STATUS((short)9, "experimentStatus"), - STATUS_UPDATE_TIME((short)10, "statusUpdateTime"); + CREATION_TIME((short)3, "creationTime"), + USER_NAME((short)4, "userName"), + NAME((short)5, "name"), + DESCRIPTION((short)6, "description"), + APPLICATION_ID((short)7, "applicationId"), + EXPERIMENT_STATUS((short)8, "experimentStatus"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -81,22 +107,18 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return EXPERIMENT_ID; case 2: // PROJECT_ID return PROJECT_ID; - case 3: // GATEWAY_ID - return GATEWAY_ID; - case 4: // CREATION_TIME + case 3: // CREATION_TIME return CREATION_TIME; - case 5: // USER_NAME + case 4: // USER_NAME return USER_NAME; - case 6: // NAME + case 5: // NAME return NAME; - case 7: // DESCRIPTION + case 6: // DESCRIPTION return DESCRIPTION; - case 8: // EXECUTION_ID - return EXECUTION_ID; - case 9: // EXPERIMENT_STATUS + case 7: // APPLICATION_ID + return APPLICATION_ID; + case 8: // EXPERIMENT_STATUS return EXPERIMENT_STATUS; - case 10: // STATUS_UPDATE_TIME - return STATUS_UPDATE_TIME; default: return null; } @@ -138,9 +160,8 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen // isset id assignments private static final int __CREATIONTIME_ISSET_ID = 0; - private static final int __STATUSUPDATETIME_ISSET_ID = 1; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.DESCRIPTION,_Fields.EXECUTION_ID,_Fields.EXPERIMENT_STATUS,_Fields.STATUS_UPDATE_TIME}; + private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.DESCRIPTION,_Fields.APPLICATION_ID,_Fields.EXPERIMENT_STATUS}; public static final 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); @@ -148,8 +169,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PROJECT_ID, new org.apache.thrift.meta_data.FieldMetaData("projectId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); 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))); tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -158,12 +177,10 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.EXECUTION_ID, new org.apache.thrift.meta_data.FieldMetaData("executionId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.EXPERIMENT_STATUS, new org.apache.thrift.meta_data.FieldMetaData("experimentStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.STATUS_UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("statusUpdateTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.status.ExperimentStatus.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentSummaryModel.class, metaDataMap); } @@ -174,14 +191,12 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen public ExperimentSummaryModel( String experimentId, String projectId, - String gatewayId, String userName, String name) { this(); this.experimentId = experimentId; this.projectId = projectId; - this.gatewayId = gatewayId; this.userName = userName; this.name = name; } @@ -197,9 +212,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen if (other.isSetProjectId()) { this.projectId = other.projectId; } - if (other.isSetGatewayId()) { - this.gatewayId = other.gatewayId; - } this.creationTime = other.creationTime; if (other.isSetUserName()) { this.userName = other.userName; @@ -210,13 +222,12 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen if (other.isSetDescription()) { this.description = other.description; } - if (other.isSetExecutionId()) { - this.executionId = other.executionId; + if (other.isSetApplicationId()) { + this.applicationId = other.applicationId; } if (other.isSetExperimentStatus()) { - this.experimentStatus = other.experimentStatus; + this.experimentStatus = new org.apache.airavata.model.status.ExperimentStatus(other.experimentStatus); } - this.statusUpdateTime = other.statusUpdateTime; } public ExperimentSummaryModel deepCopy() { @@ -227,25 +238,21 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen public void clear() { this.experimentId = null; this.projectId = null; - this.gatewayId = null; setCreationTimeIsSet(false); this.creationTime = 0; this.userName = null; this.name = null; this.description = null; - this.executionId = null; + this.applicationId = null; this.experimentStatus = null; - setStatusUpdateTimeIsSet(false); - this.statusUpdateTime = 0; } public String getExperimentId() { return this.experimentId; } - public ExperimentSummaryModel setExperimentId(String experimentId) { + public void setExperimentId(String experimentId) { this.experimentId = experimentId; - return this; } public void unsetExperimentId() { @@ -267,9 +274,8 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return this.projectId; } - public ExperimentSummaryModel setProjectId(String projectId) { + public void setProjectId(String projectId) { this.projectId = projectId; - return this; } public void unsetProjectId() { @@ -287,38 +293,13 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen } } - public String getGatewayId() { - return this.gatewayId; - } - - public ExperimentSummaryModel setGatewayId(String gatewayId) { - this.gatewayId = gatewayId; - return this; - } - - public void unsetGatewayId() { - this.gatewayId = null; - } - - /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ - public boolean isSetGatewayId() { - return this.gatewayId != null; - } - - public void setGatewayIdIsSet(boolean value) { - if (!value) { - this.gatewayId = null; - } - } - public long getCreationTime() { return this.creationTime; } - public ExperimentSummaryModel setCreationTime(long creationTime) { + public void setCreationTime(long creationTime) { this.creationTime = creationTime; setCreationTimeIsSet(true); - return this; } public void unsetCreationTime() { @@ -338,9 +319,8 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return this.userName; } - public ExperimentSummaryModel setUserName(String userName) { + public void setUserName(String userName) { this.userName = userName; - return this; } public void unsetUserName() { @@ -362,9 +342,8 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return this.name; } - public ExperimentSummaryModel setName(String name) { + public void setName(String name) { this.name = name; - return this; } public void unsetName() { @@ -386,9 +365,8 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return this.description; } - public ExperimentSummaryModel setDescription(String description) { + public void setDescription(String description) { this.description = description; - return this; } public void unsetDescription() { @@ -406,37 +384,35 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen } } - public String getExecutionId() { - return this.executionId; + public String getApplicationId() { + return this.applicationId; } - public ExperimentSummaryModel setExecutionId(String executionId) { - this.executionId = executionId; - return this; + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; } - public void unsetExecutionId() { - this.executionId = null; + public void unsetApplicationId() { + this.applicationId = null; } - /** Returns true if field executionId is set (has been assigned a value) and false otherwise */ - public boolean isSetExecutionId() { - return this.executionId != null; + /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */ + public boolean isSetApplicationId() { + return this.applicationId != null; } - public void setExecutionIdIsSet(boolean value) { + public void setApplicationIdIsSet(boolean value) { if (!value) { - this.executionId = null; + this.applicationId = null; } } - public String getExperimentStatus() { + public org.apache.airavata.model.status.ExperimentStatus getExperimentStatus() { return this.experimentStatus; } - public ExperimentSummaryModel setExperimentStatus(String experimentStatus) { + public void setExperimentStatus(org.apache.airavata.model.status.ExperimentStatus experimentStatus) { this.experimentStatus = experimentStatus; - return this; } public void unsetExperimentStatus() { @@ -454,29 +430,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen } } - public long getStatusUpdateTime() { - return this.statusUpdateTime; - } - - public ExperimentSummaryModel setStatusUpdateTime(long statusUpdateTime) { - this.statusUpdateTime = statusUpdateTime; - setStatusUpdateTimeIsSet(true); - return this; - } - - public void unsetStatusUpdateTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STATUSUPDATETIME_ISSET_ID); - } - - /** Returns true if field statusUpdateTime is set (has been assigned a value) and false otherwise */ - public boolean isSetStatusUpdateTime() { - return EncodingUtils.testBit(__isset_bitfield, __STATUSUPDATETIME_ISSET_ID); - } - - public void setStatusUpdateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STATUSUPDATETIME_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { case EXPERIMENT_ID: @@ -495,14 +448,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen } break; - case GATEWAY_ID: - if (value == null) { - unsetGatewayId(); - } else { - setGatewayId((String)value); - } - break; - case CREATION_TIME: if (value == null) { unsetCreationTime(); @@ -535,11 +480,11 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen } break; - case EXECUTION_ID: + case APPLICATION_ID: if (value == null) { - unsetExecutionId(); + unsetApplicationId(); } else { - setExecutionId((String)value); + setApplicationId((String)value); } break; @@ -547,15 +492,7 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen if (value == null) { unsetExperimentStatus(); } else { - setExperimentStatus((String)value); - } - break; - - case STATUS_UPDATE_TIME: - if (value == null) { - unsetStatusUpdateTime(); - } else { - setStatusUpdateTime((Long)value); + setExperimentStatus((org.apache.airavata.model.status.ExperimentStatus)value); } break; @@ -570,9 +507,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen case PROJECT_ID: return getProjectId(); - case GATEWAY_ID: - return getGatewayId(); - case CREATION_TIME: return Long.valueOf(getCreationTime()); @@ -585,15 +519,12 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen case DESCRIPTION: return getDescription(); - case EXECUTION_ID: - return getExecutionId(); + case APPLICATION_ID: + return getApplicationId(); case EXPERIMENT_STATUS: return getExperimentStatus(); - case STATUS_UPDATE_TIME: - return Long.valueOf(getStatusUpdateTime()); - } throw new IllegalStateException(); } @@ -609,8 +540,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return isSetExperimentId(); case PROJECT_ID: return isSetProjectId(); - case GATEWAY_ID: - return isSetGatewayId(); case CREATION_TIME: return isSetCreationTime(); case USER_NAME: @@ -619,12 +548,10 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return isSetName(); case DESCRIPTION: return isSetDescription(); - case EXECUTION_ID: - return isSetExecutionId(); + case APPLICATION_ID: + return isSetApplicationId(); case EXPERIMENT_STATUS: return isSetExperimentStatus(); - case STATUS_UPDATE_TIME: - return isSetStatusUpdateTime(); } throw new IllegalStateException(); } @@ -660,15 +587,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return false; } - boolean this_present_gatewayId = true && this.isSetGatewayId(); - boolean that_present_gatewayId = true && that.isSetGatewayId(); - if (this_present_gatewayId || that_present_gatewayId) { - if (!(this_present_gatewayId && that_present_gatewayId)) - return false; - if (!this.gatewayId.equals(that.gatewayId)) - return false; - } - boolean this_present_creationTime = true && this.isSetCreationTime(); boolean that_present_creationTime = true && that.isSetCreationTime(); if (this_present_creationTime || that_present_creationTime) { @@ -705,12 +623,12 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return false; } - boolean this_present_executionId = true && this.isSetExecutionId(); - boolean that_present_executionId = true && that.isSetExecutionId(); - if (this_present_executionId || that_present_executionId) { - if (!(this_present_executionId && that_present_executionId)) + boolean this_present_applicationId = true && this.isSetApplicationId(); + boolean that_present_applicationId = true && that.isSetApplicationId(); + if (this_present_applicationId || that_present_applicationId) { + if (!(this_present_applicationId && that_present_applicationId)) return false; - if (!this.executionId.equals(that.executionId)) + if (!this.applicationId.equals(that.applicationId)) return false; } @@ -723,15 +641,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return false; } - boolean this_present_statusUpdateTime = true && this.isSetStatusUpdateTime(); - boolean that_present_statusUpdateTime = true && that.isSetStatusUpdateTime(); - if (this_present_statusUpdateTime || that_present_statusUpdateTime) { - if (!(this_present_statusUpdateTime && that_present_statusUpdateTime)) - return false; - if (this.statusUpdateTime != that.statusUpdateTime) - return false; - } - return true; } @@ -749,11 +658,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen if (present_projectId) list.add(projectId); - boolean present_gatewayId = true && (isSetGatewayId()); - list.add(present_gatewayId); - if (present_gatewayId) - list.add(gatewayId); - boolean present_creationTime = true && (isSetCreationTime()); list.add(present_creationTime); if (present_creationTime) @@ -774,21 +678,16 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen if (present_description) list.add(description); - boolean present_executionId = true && (isSetExecutionId()); - list.add(present_executionId); - if (present_executionId) - list.add(executionId); + boolean present_applicationId = true && (isSetApplicationId()); + list.add(present_applicationId); + if (present_applicationId) + list.add(applicationId); boolean present_experimentStatus = true && (isSetExperimentStatus()); list.add(present_experimentStatus); if (present_experimentStatus) list.add(experimentStatus); - boolean present_statusUpdateTime = true && (isSetStatusUpdateTime()); - list.add(present_statusUpdateTime); - if (present_statusUpdateTime) - list.add(statusUpdateTime); - return list.hashCode(); } @@ -820,16 +719,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return lastComparison; } } - lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGatewayId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime()); if (lastComparison != 0) { return lastComparison; @@ -870,12 +759,12 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExecutionId()).compareTo(other.isSetExecutionId()); + lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(other.isSetApplicationId()); if (lastComparison != 0) { return lastComparison; } - if (isSetExecutionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionId, other.executionId); + if (isSetApplicationId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, other.applicationId); if (lastComparison != 0) { return lastComparison; } @@ -890,16 +779,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return lastComparison; } } - lastComparison = Boolean.valueOf(isSetStatusUpdateTime()).compareTo(other.isSetStatusUpdateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStatusUpdateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusUpdateTime, other.statusUpdateTime); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -907,11 +786,11 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen return _Fields.findByThriftId(fieldId); } - public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException { + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } - public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @@ -935,14 +814,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen sb.append(this.projectId); } first = false; - if (!first) sb.append(", "); - sb.append("gatewayId:"); - if (this.gatewayId == null) { - sb.append("null"); - } else { - sb.append(this.gatewayId); - } - first = false; if (isSetCreationTime()) { if (!first) sb.append(", "); sb.append("creationTime:"); @@ -975,13 +846,13 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen } first = false; } - if (isSetExecutionId()) { + if (isSetApplicationId()) { if (!first) sb.append(", "); - sb.append("executionId:"); - if (this.executionId == null) { + sb.append("applicationId:"); + if (this.applicationId == null) { sb.append("null"); } else { - sb.append(this.executionId); + sb.append(this.applicationId); } first = false; } @@ -995,40 +866,38 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen } first = false; } - if (isSetStatusUpdateTime()) { - if (!first) sb.append(", "); - sb.append("statusUpdateTime:"); - sb.append(this.statusUpdateTime); - first = false; - } sb.append(")"); return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields - if (experimentId == null) { - throw new TProtocolException("Required field 'experimentId' was not present! Struct: " + toString()); + if (!isSetExperimentId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' is unset! Struct:" + toString()); } - if (projectId == null) { - throw new TProtocolException("Required field 'projectId' was not present! Struct: " + toString()); - } - if (gatewayId == null) { - throw new TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); + + if (!isSetProjectId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectId' is unset! Struct:" + toString()); } - if (userName == null) { - throw new TProtocolException("Required field 'userName' was not present! Struct: " + toString()); + + if (!isSetUserName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' is unset! Struct:" + toString()); } - if (name == null) { - throw new TProtocolException("Required field 'name' was not present! Struct: " + toString()); + + if (!isSetName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString()); } + // check for sub-struct validity + if (experimentStatus != null) { + experimentStatus.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (TException te) { + } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } @@ -1038,7 +907,7 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen // 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; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (TException te) { + } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } @@ -1051,7 +920,7 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen private static class ExperimentSummaryModelStandardScheme extends StandardScheme<ExperimentSummaryModel> { - public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentSummaryModel struct) throws TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentSummaryModel struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -1077,15 +946,7 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // GATEWAY_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.gatewayId = iprot.readString(); - struct.setGatewayIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // CREATION_TIME + case 3: // CREATION_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.creationTime = iprot.readI64(); struct.setCreationTimeIsSet(true); @@ -1093,7 +954,7 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // USER_NAME + case 4: // USER_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userName = iprot.readString(); struct.setUserNameIsSet(true); @@ -1101,7 +962,7 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // NAME + case 5: // NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.name = iprot.readString(); struct.setNameIsSet(true); @@ -1109,7 +970,7 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 7: // DESCRIPTION + case 6: // DESCRIPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.description = iprot.readString(); struct.setDescriptionIsSet(true); @@ -1117,42 +978,33 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 8: // EXECUTION_ID + case 7: // APPLICATION_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.executionId = iprot.readString(); - struct.setExecutionIdIsSet(true); + struct.applicationId = iprot.readString(); + struct.setApplicationIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 9: // EXPERIMENT_STATUS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.experimentStatus = iprot.readString(); + case 8: // EXPERIMENT_STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.experimentStatus = new org.apache.airavata.model.status.ExperimentStatus(); + struct.experimentStatus.read(iprot); struct.setExperimentStatusIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 10: // STATUS_UPDATE_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.statusUpdateTime = iprot.readI64(); - struct.setStatusUpdateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, ExperimentSummaryModel struct) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, ExperimentSummaryModel struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -1166,11 +1018,6 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen oprot.writeString(struct.projectId); oprot.writeFieldEnd(); } - if (struct.gatewayId != null) { - oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); - oprot.writeString(struct.gatewayId); - oprot.writeFieldEnd(); - } if (struct.isSetCreationTime()) { oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC); oprot.writeI64(struct.creationTime); @@ -1193,25 +1040,20 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen oprot.writeFieldEnd(); } } - if (struct.executionId != null) { - if (struct.isSetExecutionId()) { - oprot.writeFieldBegin(EXECUTION_ID_FIELD_DESC); - oprot.writeString(struct.executionId); + if (struct.applicationId != null) { + if (struct.isSetApplicationId()) { + oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC); + oprot.writeString(struct.applicationId); oprot.writeFieldEnd(); } } if (struct.experimentStatus != null) { if (struct.isSetExperimentStatus()) { oprot.writeFieldBegin(EXPERIMENT_STATUS_FIELD_DESC); - oprot.writeString(struct.experimentStatus); + struct.experimentStatus.write(oprot); oprot.writeFieldEnd(); } } - if (struct.isSetStatusUpdateTime()) { - oprot.writeFieldBegin(STATUS_UPDATE_TIME_FIELD_DESC); - oprot.writeI64(struct.statusUpdateTime); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1227,11 +1069,10 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen private static class ExperimentSummaryModelTupleScheme extends TupleScheme<ExperimentSummaryModel> { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentSummaryModel struct) throws TException { + public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentSummaryModel struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.experimentId); oprot.writeString(struct.projectId); - oprot.writeString(struct.gatewayId); oprot.writeString(struct.userName); oprot.writeString(struct.name); BitSet optionals = new BitSet(); @@ -1241,47 +1082,39 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen if (struct.isSetDescription()) { optionals.set(1); } - if (struct.isSetExecutionId()) { + if (struct.isSetApplicationId()) { optionals.set(2); } if (struct.isSetExperimentStatus()) { optionals.set(3); } - if (struct.isSetStatusUpdateTime()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); + oprot.writeBitSet(optionals, 4); if (struct.isSetCreationTime()) { oprot.writeI64(struct.creationTime); } if (struct.isSetDescription()) { oprot.writeString(struct.description); } - if (struct.isSetExecutionId()) { - oprot.writeString(struct.executionId); + if (struct.isSetApplicationId()) { + oprot.writeString(struct.applicationId); } if (struct.isSetExperimentStatus()) { - oprot.writeString(struct.experimentStatus); - } - if (struct.isSetStatusUpdateTime()) { - oprot.writeI64(struct.statusUpdateTime); + struct.experimentStatus.write(oprot); } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentSummaryModel struct) throws TException { + public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentSummaryModel struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.experimentId = iprot.readString(); struct.setExperimentIdIsSet(true); struct.projectId = iprot.readString(); struct.setProjectIdIsSet(true); - struct.gatewayId = iprot.readString(); - struct.setGatewayIdIsSet(true); struct.userName = iprot.readString(); struct.setUserNameIsSet(true); struct.name = iprot.readString(); struct.setNameIsSet(true); - BitSet incoming = iprot.readBitSet(5); + BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.creationTime = iprot.readI64(); struct.setCreationTimeIsSet(true); @@ -1291,17 +1124,14 @@ public class ExperimentSummaryModel implements org.apache.thrift.TBase<Experimen struct.setDescriptionIsSet(true); } if (incoming.get(2)) { - struct.executionId = iprot.readString(); - struct.setExecutionIdIsSet(true); + struct.applicationId = iprot.readString(); + struct.setApplicationIdIsSet(true); } if (incoming.get(3)) { - struct.experimentStatus = iprot.readString(); + struct.experimentStatus = new org.apache.airavata.model.status.ExperimentStatus(); + struct.experimentStatus.read(iprot); struct.setExperimentStatusIsSet(true); } - if (incoming.get(4)) { - struct.statusUpdateTime = iprot.readI64(); - struct.setStatusUpdateTimeIsSet(true); - } } }
http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java index 2315ee3..08e798c 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/experiment/UserConfigurationDataModel.java @@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory; * * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-18") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-23") public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserConfigurationDataModel, UserConfigurationDataModel._Fields>, java.io.Serializable, Cloneable, Comparable<UserConfigurationDataModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserConfigurationDataModel"); http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java index 21c5e74..f01101d 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-18") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-23") public class JobModel implements org.apache.thrift.TBase<JobModel, JobModel._Fields>, java.io.Serializable, Cloneable, Comparable<JobModel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobModel"); http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java index be23363..a2375d8 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ExperimentStatusChangeEvent.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-18") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-23") public class ExperimentStatusChangeEvent implements org.apache.thrift.TBase<ExperimentStatusChangeEvent, ExperimentStatusChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentStatusChangeEvent> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentStatusChangeEvent"); http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java index 5ced6f7..6d3479f 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobIdentifier.java @@ -51,13 +51,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-18") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-23") public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, JobIdentifier._Fields>, java.io.Serializable, Cloneable, Comparable<JobIdentifier> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobIdentifier"); private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField WORKFLOW_NODE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowNodeId", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PROCESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("processId", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)5); @@ -69,7 +69,7 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job private String jobId; // required private String taskId; // required - private String workflowNodeId; // required + private String processId; // required private String experimentId; // required private String gatewayId; // required @@ -77,7 +77,7 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job public enum _Fields implements org.apache.thrift.TFieldIdEnum { JOB_ID((short)1, "jobId"), TASK_ID((short)2, "taskId"), - WORKFLOW_NODE_ID((short)3, "workflowNodeId"), + PROCESS_ID((short)3, "processId"), EXPERIMENT_ID((short)4, "experimentId"), GATEWAY_ID((short)5, "gatewayId"); @@ -98,8 +98,8 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job return JOB_ID; case 2: // TASK_ID return TASK_ID; - case 3: // WORKFLOW_NODE_ID - return WORKFLOW_NODE_ID; + case 3: // PROCESS_ID + return PROCESS_ID; case 4: // EXPERIMENT_ID return EXPERIMENT_ID; case 5: // GATEWAY_ID @@ -151,7 +151,7 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.WORKFLOW_NODE_ID, new org.apache.thrift.meta_data.FieldMetaData("workflowNodeId", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.PROCESS_ID, new org.apache.thrift.meta_data.FieldMetaData("processId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); @@ -167,14 +167,14 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job public JobIdentifier( String jobId, String taskId, - String workflowNodeId, + String processId, String experimentId, String gatewayId) { this(); this.jobId = jobId; this.taskId = taskId; - this.workflowNodeId = workflowNodeId; + this.processId = processId; this.experimentId = experimentId; this.gatewayId = gatewayId; } @@ -189,8 +189,8 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job if (other.isSetTaskId()) { this.taskId = other.taskId; } - if (other.isSetWorkflowNodeId()) { - this.workflowNodeId = other.workflowNodeId; + if (other.isSetProcessId()) { + this.processId = other.processId; } if (other.isSetExperimentId()) { this.experimentId = other.experimentId; @@ -208,7 +208,7 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job public void clear() { this.jobId = null; this.taskId = null; - this.workflowNodeId = null; + this.processId = null; this.experimentId = null; this.gatewayId = null; } @@ -259,26 +259,26 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job } } - public String getWorkflowNodeId() { - return this.workflowNodeId; + public String getProcessId() { + return this.processId; } - public void setWorkflowNodeId(String workflowNodeId) { - this.workflowNodeId = workflowNodeId; + public void setProcessId(String processId) { + this.processId = processId; } - public void unsetWorkflowNodeId() { - this.workflowNodeId = null; + public void unsetProcessId() { + this.processId = null; } - /** Returns true if field workflowNodeId is set (has been assigned a value) and false otherwise */ - public boolean isSetWorkflowNodeId() { - return this.workflowNodeId != null; + /** Returns true if field processId is set (has been assigned a value) and false otherwise */ + public boolean isSetProcessId() { + return this.processId != null; } - public void setWorkflowNodeIdIsSet(boolean value) { + public void setProcessIdIsSet(boolean value) { if (!value) { - this.workflowNodeId = null; + this.processId = null; } } @@ -346,11 +346,11 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job } break; - case WORKFLOW_NODE_ID: + case PROCESS_ID: if (value == null) { - unsetWorkflowNodeId(); + unsetProcessId(); } else { - setWorkflowNodeId((String)value); + setProcessId((String)value); } break; @@ -381,8 +381,8 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job case TASK_ID: return getTaskId(); - case WORKFLOW_NODE_ID: - return getWorkflowNodeId(); + case PROCESS_ID: + return getProcessId(); case EXPERIMENT_ID: return getExperimentId(); @@ -405,8 +405,8 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job return isSetJobId(); case TASK_ID: return isSetTaskId(); - case WORKFLOW_NODE_ID: - return isSetWorkflowNodeId(); + case PROCESS_ID: + return isSetProcessId(); case EXPERIMENT_ID: return isSetExperimentId(); case GATEWAY_ID: @@ -446,12 +446,12 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job return false; } - boolean this_present_workflowNodeId = true && this.isSetWorkflowNodeId(); - boolean that_present_workflowNodeId = true && that.isSetWorkflowNodeId(); - if (this_present_workflowNodeId || that_present_workflowNodeId) { - if (!(this_present_workflowNodeId && that_present_workflowNodeId)) + boolean this_present_processId = true && this.isSetProcessId(); + boolean that_present_processId = true && that.isSetProcessId(); + if (this_present_processId || that_present_processId) { + if (!(this_present_processId && that_present_processId)) return false; - if (!this.workflowNodeId.equals(that.workflowNodeId)) + if (!this.processId.equals(that.processId)) return false; } @@ -490,10 +490,10 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job if (present_taskId) list.add(taskId); - boolean present_workflowNodeId = true && (isSetWorkflowNodeId()); - list.add(present_workflowNodeId); - if (present_workflowNodeId) - list.add(workflowNodeId); + boolean present_processId = true && (isSetProcessId()); + list.add(present_processId); + if (present_processId) + list.add(processId); boolean present_experimentId = true && (isSetExperimentId()); list.add(present_experimentId); @@ -536,12 +536,12 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job return lastComparison; } } - lastComparison = Boolean.valueOf(isSetWorkflowNodeId()).compareTo(other.isSetWorkflowNodeId()); + lastComparison = Boolean.valueOf(isSetProcessId()).compareTo(other.isSetProcessId()); if (lastComparison != 0) { return lastComparison; } - if (isSetWorkflowNodeId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowNodeId, other.workflowNodeId); + if (isSetProcessId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processId, other.processId); if (lastComparison != 0) { return lastComparison; } @@ -602,11 +602,11 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job } first = false; if (!first) sb.append(", "); - sb.append("workflowNodeId:"); - if (this.workflowNodeId == null) { + sb.append("processId:"); + if (this.processId == null) { sb.append("null"); } else { - sb.append(this.workflowNodeId); + sb.append(this.processId); } first = false; if (!first) sb.append(", "); @@ -639,8 +639,8 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' is unset! Struct:" + toString()); } - if (!isSetWorkflowNodeId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'workflowNodeId' is unset! Struct:" + toString()); + if (!isSetProcessId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'processId' is unset! Struct:" + toString()); } if (!isSetExperimentId()) { @@ -704,10 +704,10 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // WORKFLOW_NODE_ID + case 3: // PROCESS_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.workflowNodeId = iprot.readString(); - struct.setWorkflowNodeIdIsSet(true); + struct.processId = iprot.readString(); + struct.setProcessIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -751,9 +751,9 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job oprot.writeString(struct.taskId); oprot.writeFieldEnd(); } - if (struct.workflowNodeId != null) { - oprot.writeFieldBegin(WORKFLOW_NODE_ID_FIELD_DESC); - oprot.writeString(struct.workflowNodeId); + if (struct.processId != null) { + oprot.writeFieldBegin(PROCESS_ID_FIELD_DESC); + oprot.writeString(struct.processId); oprot.writeFieldEnd(); } if (struct.experimentId != null) { @@ -785,7 +785,7 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.jobId); oprot.writeString(struct.taskId); - oprot.writeString(struct.workflowNodeId); + oprot.writeString(struct.processId); oprot.writeString(struct.experimentId); oprot.writeString(struct.gatewayId); } @@ -797,8 +797,8 @@ public class JobIdentifier implements org.apache.thrift.TBase<JobIdentifier, Job struct.setJobIdIsSet(true); struct.taskId = iprot.readString(); struct.setTaskIdIsSet(true); - struct.workflowNodeId = iprot.readString(); - struct.setWorkflowNodeIdIsSet(true); + struct.processId = iprot.readString(); + struct.setProcessIdIsSet(true); struct.experimentId = iprot.readString(); struct.setExperimentIdIsSet(true); struct.gatewayId = iprot.readString(); http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java index c807853..1bd7beb 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeEvent.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-18") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-23") public class JobStatusChangeEvent implements org.apache.thrift.TBase<JobStatusChangeEvent, JobStatusChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<JobStatusChangeEvent> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobStatusChangeEvent"); http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java index 817a79a..03b851f 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/JobStatusChangeRequestEvent.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-18") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-23") public class JobStatusChangeRequestEvent implements org.apache.thrift.TBase<JobStatusChangeRequestEvent, JobStatusChangeRequestEvent._Fields>, java.io.Serializable, Cloneable, Comparable<JobStatusChangeRequestEvent> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobStatusChangeRequestEvent"); http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java index 4f3eb57..2a7bfc6 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/Message.java @@ -51,7 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-18") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-6-23") public class Message implements org.apache.thrift.TBase<Message, Message._Fields>, java.io.Serializable, Cloneable, Comparable<Message> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Message"); http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/MessageType.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/MessageType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/MessageType.java index a497ac4..8fd2dd4 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/MessageType.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/MessageType.java @@ -31,7 +31,7 @@ import org.apache.thrift.TEnum; public enum MessageType implements org.apache.thrift.TEnum { EXPERIMENT(0), TASK(1), - WORKFLOWNODE(2), + PROCESS(2), JOB(3), LAUNCHTASK(4), TERMINATETASK(5), @@ -61,7 +61,7 @@ public enum MessageType implements org.apache.thrift.TEnum { case 1: return TASK; case 2: - return WORKFLOWNODE; + return PROCESS; case 3: return JOB; case 4: http://git-wip-us.apache.org/repos/asf/airavata/blob/aec8f411/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessIdentifier.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessIdentifier.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessIdentifier.java new file mode 100644 index 0000000..2f5ea84 --- /dev/null +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/ProcessIdentifier.java @@ -0,0 +1,608 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Autogenerated by Thrift Compiler (0.9.2) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.airavata.model.messaging.event; + +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.2)", date = "2015-6-23") +public class ProcessIdentifier implements org.apache.thrift.TBase<ProcessIdentifier, ProcessIdentifier._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessIdentifier> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessIdentifier"); + + private static final org.apache.thrift.protocol.TField PROCESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("processId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", 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 ProcessIdentifierStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ProcessIdentifierTupleSchemeFactory()); + } + + private String processId; // required + private String experimentId; // required + private String gatewayId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + PROCESS_ID((short)1, "processId"), + EXPERIMENT_ID((short)2, "experimentId"), + GATEWAY_ID((short)3, "gatewayId"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PROCESS_ID + return PROCESS_ID; + case 2: // EXPERIMENT_ID + return EXPERIMENT_ID; + case 3: // GATEWAY_ID + return GATEWAY_ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final 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); + tmpMap.put(_Fields.PROCESS_ID, new org.apache.thrift.meta_data.FieldMetaData("processId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ProcessIdentifier.class, metaDataMap); + } + + public ProcessIdentifier() { + } + + public ProcessIdentifier( + String processId, + String experimentId, + String gatewayId) + { + this(); + this.processId = processId; + this.experimentId = experimentId; + this.gatewayId = gatewayId; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public ProcessIdentifier(ProcessIdentifier other) { + if (other.isSetProcessId()) { + this.processId = other.processId; + } + if (other.isSetExperimentId()) { + this.experimentId = other.experimentId; + } + if (other.isSetGatewayId()) { + this.gatewayId = other.gatewayId; + } + } + + public ProcessIdentifier deepCopy() { + return new ProcessIdentifier(this); + } + + @Override + public void clear() { + this.processId = null; + this.experimentId = null; + this.gatewayId = null; + } + + public String getProcessId() { + return this.processId; + } + + public void setProcessId(String processId) { + this.processId = processId; + } + + public void unsetProcessId() { + this.processId = null; + } + + /** Returns true if field processId is set (has been assigned a value) and false otherwise */ + public boolean isSetProcessId() { + return this.processId != null; + } + + public void setProcessIdIsSet(boolean value) { + if (!value) { + this.processId = null; + } + } + + public String getExperimentId() { + return this.experimentId; + } + + public void setExperimentId(String experimentId) { + this.experimentId = experimentId; + } + + public void unsetExperimentId() { + this.experimentId = null; + } + + /** Returns true if field experimentId is set (has been assigned a value) and false otherwise */ + public boolean isSetExperimentId() { + return this.experimentId != null; + } + + public void setExperimentIdIsSet(boolean value) { + if (!value) { + this.experimentId = null; + } + } + + public String getGatewayId() { + return this.gatewayId; + } + + public void setGatewayId(String gatewayId) { + this.gatewayId = gatewayId; + } + + public void unsetGatewayId() { + this.gatewayId = null; + } + + /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ + public boolean isSetGatewayId() { + return this.gatewayId != null; + } + + public void setGatewayIdIsSet(boolean value) { + if (!value) { + this.gatewayId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PROCESS_ID: + if (value == null) { + unsetProcessId(); + } else { + setProcessId((String)value); + } + break; + + case EXPERIMENT_ID: + if (value == null) { + unsetExperimentId(); + } else { + setExperimentId((String)value); + } + break; + + case GATEWAY_ID: + if (value == null) { + unsetGatewayId(); + } else { + setGatewayId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PROCESS_ID: + return getProcessId(); + + case EXPERIMENT_ID: + return getExperimentId(); + + case GATEWAY_ID: + return getGatewayId(); + + } + throw new 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(); + } + + switch (field) { + case PROCESS_ID: + return isSetProcessId(); + case EXPERIMENT_ID: + return isSetExperimentId(); + case GATEWAY_ID: + return isSetGatewayId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ProcessIdentifier) + return this.equals((ProcessIdentifier)that); + return false; + } + + public boolean equals(ProcessIdentifier that) { + if (that == null) + return false; + + boolean this_present_processId = true && this.isSetProcessId(); + boolean that_present_processId = true && that.isSetProcessId(); + if (this_present_processId || that_present_processId) { + if (!(this_present_processId && that_present_processId)) + return false; + if (!this.processId.equals(that.processId)) + return false; + } + + boolean this_present_experimentId = true && this.isSetExperimentId(); + boolean that_present_experimentId = true && that.isSetExperimentId(); + if (this_present_experimentId || that_present_experimentId) { + if (!(this_present_experimentId && that_present_experimentId)) + return false; + if (!this.experimentId.equals(that.experimentId)) + return false; + } + + boolean this_present_gatewayId = true && this.isSetGatewayId(); + boolean that_present_gatewayId = true && that.isSetGatewayId(); + if (this_present_gatewayId || that_present_gatewayId) { + if (!(this_present_gatewayId && that_present_gatewayId)) + return false; + if (!this.gatewayId.equals(that.gatewayId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_processId = true && (isSetProcessId()); + list.add(present_processId); + if (present_processId) + list.add(processId); + + boolean present_experimentId = true && (isSetExperimentId()); + list.add(present_experimentId); + if (present_experimentId) + list.add(experimentId); + + boolean present_gatewayId = true && (isSetGatewayId()); + list.add(present_gatewayId); + if (present_gatewayId) + list.add(gatewayId); + + return list.hashCode(); + } + + @Override + public int compareTo(ProcessIdentifier other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetProcessId()).compareTo(other.isSetProcessId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProcessId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processId, other.processId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExperimentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGatewayId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().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); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ProcessIdentifier("); + boolean first = true; + + sb.append("processId:"); + if (this.processId == null) { + sb.append("null"); + } else { + sb.append(this.processId); + } + first = false; + if (!first) sb.append(", "); + sb.append("experimentId:"); + if (this.experimentId == null) { + sb.append("null"); + } else { + sb.append(this.experimentId); + } + first = false; + if (!first) sb.append(", "); + sb.append("gatewayId:"); + if (this.gatewayId == null) { + sb.append("null"); + } else { + sb.append(this.gatewayId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetProcessId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'processId' is unset! Struct:" + toString()); + } + + if (!isSetExperimentId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' is unset! Struct:" + toString()); + } + + if (!isSetGatewayId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ProcessIdentifierStandardSchemeFactory implements SchemeFactory { + public ProcessIdentifierStandardScheme getScheme() { + return new ProcessIdentifierStandardScheme(); + } + } + + private static class ProcessIdentifierStandardScheme extends StandardScheme<ProcessIdentifier> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ProcessIdentifier struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // PROCESS_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.processId = iprot.readString(); + struct.setProcessIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // EXPERIMENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.experimentId = iprot.readString(); + struct.setExperimentIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // GATEWAY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.gatewayId = iprot.readString(); + struct.setGatewayIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ProcessIdentifier struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.processId != null) { + oprot.writeFieldBegin(PROCESS_ID_FIELD_DESC); + oprot.writeString(struct.processId); + oprot.writeFieldEnd(); + } + if (struct.experimentId != null) { + oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC); + oprot.writeString(struct.experimentId); + oprot.writeFieldEnd(); + } + if (struct.gatewayId != null) { + oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); + oprot.writeString(struct.gatewayId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ProcessIdentifierTupleSchemeFactory implements SchemeFactory { + public ProcessIdentifierTupleScheme getScheme() { + return new ProcessIdentifierTupleScheme(); + } + } + + private static class ProcessIdentifierTupleScheme extends TupleScheme<ProcessIdentifier> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ProcessIdentifier struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.processId); + oprot.writeString(struct.experimentId); + oprot.writeString(struct.gatewayId); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ProcessIdentifier struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.processId = iprot.readString(); + struct.setProcessIdIsSet(true); + struct.experimentId = iprot.readString(); + struct.setExperimentIdIsSet(true); + struct.gatewayId = iprot.readString(); + struct.setGatewayIdIsSet(true); + } + } + +} +
