You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2015/06/13 01:16:36 UTC
[07/31] airavata git commit: generated new data model classes.
http://git-wip-us.apache.org/repos/asf/airavata/blob/51fa27b8/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentSummary.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentSummary.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentSummary.java
deleted file mode 100644
index 85ed22c..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ExperimentSummary.java
+++ /dev/null
@@ -1,1139 +0,0 @@
-/**
- * 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.workspace.experiment;
-
-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-11")
-public class ExperimentSummary implements org.apache.thrift.TBase<ExperimentSummary, ExperimentSummary._Fields>, java.io.Serializable, Cloneable, Comparable<ExperimentSummary> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExperimentSummary");
-
- 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 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 {
- schemes.put(StandardScheme.class, new ExperimentSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ExperimentSummaryTupleSchemeFactory());
- }
-
- 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 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"),
- 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>();
-
- 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: // EXPERIMENT_ID
- return EXPERIMENT_ID;
- case 2: // PROJECT_ID
- return PROJECT_ID;
- case 3: // CREATION_TIME
- return CREATION_TIME;
- case 4: // USER_NAME
- return USER_NAME;
- case 5: // NAME
- return NAME;
- case 6: // DESCRIPTION
- return DESCRIPTION;
- case 7: // APPLICATION_ID
- return APPLICATION_ID;
- case 8: // EXPERIMENT_STATUS
- return EXPERIMENT_STATUS;
- 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
- private static final int __CREATIONTIME_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- 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);
- 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.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.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,
- 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,
- 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.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExperimentStatus.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExperimentSummary.class, metaDataMap);
- }
-
- public ExperimentSummary() {
- }
-
- public ExperimentSummary(
- String experimentID,
- String projectID,
- String userName,
- String name)
- {
- this();
- this.experimentID = experimentID;
- this.projectID = projectID;
- this.userName = userName;
- this.name = name;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ExperimentSummary(ExperimentSummary other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetExperimentID()) {
- this.experimentID = other.experimentID;
- }
- if (other.isSetProjectID()) {
- this.projectID = other.projectID;
- }
- this.creationTime = other.creationTime;
- if (other.isSetUserName()) {
- this.userName = other.userName;
- }
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
- }
- if (other.isSetApplicationId()) {
- this.applicationId = other.applicationId;
- }
- if (other.isSetExperimentStatus()) {
- this.experimentStatus = new ExperimentStatus(other.experimentStatus);
- }
- }
-
- public ExperimentSummary deepCopy() {
- return new ExperimentSummary(this);
- }
-
- @Override
- public void clear() {
- this.experimentID = null;
- this.projectID = null;
- setCreationTimeIsSet(false);
- this.creationTime = 0;
- this.userName = null;
- this.name = null;
- this.description = null;
- this.applicationId = null;
- this.experimentStatus = 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 getProjectID() {
- return this.projectID;
- }
-
- public void setProjectID(String projectID) {
- this.projectID = projectID;
- }
-
- public void unsetProjectID() {
- this.projectID = null;
- }
-
- /** Returns true if field projectID is set (has been assigned a value) and false otherwise */
- public boolean isSetProjectID() {
- return this.projectID != null;
- }
-
- public void setProjectIDIsSet(boolean value) {
- if (!value) {
- this.projectID = null;
- }
- }
-
- public long getCreationTime() {
- return this.creationTime;
- }
-
- public void setCreationTime(long creationTime) {
- this.creationTime = creationTime;
- setCreationTimeIsSet(true);
- }
-
- public void unsetCreationTime() {
- __isset_bitfield = 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);
- }
-
- public void setCreationTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
- }
-
- public String getUserName() {
- return this.userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public void unsetUserName() {
- this.userName = null;
- }
-
- /** Returns true if field userName is set (has been assigned a value) and false otherwise */
- public boolean isSetUserName() {
- return this.userName != null;
- }
-
- public void setUserNameIsSet(boolean value) {
- if (!value) {
- this.userName = null;
- }
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean isSetName() {
- return this.name != null;
- }
-
- public void setNameIsSet(boolean value) {
- if (!value) {
- this.name = null;
- }
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void unsetDescription() {
- this.description = null;
- }
-
- /** Returns true if field description is set (has been assigned a value) and false otherwise */
- public boolean isSetDescription() {
- return this.description != null;
- }
-
- public void setDescriptionIsSet(boolean value) {
- if (!value) {
- this.description = null;
- }
- }
-
- public String getApplicationId() {
- return this.applicationId;
- }
-
- public void setApplicationId(String applicationId) {
- this.applicationId = applicationId;
- }
-
- public void unsetApplicationId() {
- this.applicationId = 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 setApplicationIdIsSet(boolean value) {
- if (!value) {
- this.applicationId = null;
- }
- }
-
- public ExperimentStatus getExperimentStatus() {
- return this.experimentStatus;
- }
-
- public void setExperimentStatus(ExperimentStatus experimentStatus) {
- this.experimentStatus = experimentStatus;
- }
-
- public void unsetExperimentStatus() {
- this.experimentStatus = null;
- }
-
- /** Returns true if field experimentStatus is set (has been assigned a value) and false otherwise */
- public boolean isSetExperimentStatus() {
- return this.experimentStatus != null;
- }
-
- public void setExperimentStatusIsSet(boolean value) {
- if (!value) {
- this.experimentStatus = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case EXPERIMENT_ID:
- if (value == null) {
- unsetExperimentID();
- } else {
- setExperimentID((String)value);
- }
- break;
-
- case PROJECT_ID:
- if (value == null) {
- unsetProjectID();
- } else {
- setProjectID((String)value);
- }
- break;
-
- case CREATION_TIME:
- if (value == null) {
- unsetCreationTime();
- } else {
- setCreationTime((Long)value);
- }
- break;
-
- case USER_NAME:
- if (value == null) {
- unsetUserName();
- } else {
- setUserName((String)value);
- }
- break;
-
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
- } else {
- setDescription((String)value);
- }
- break;
-
- case APPLICATION_ID:
- if (value == null) {
- unsetApplicationId();
- } else {
- setApplicationId((String)value);
- }
- break;
-
- case EXPERIMENT_STATUS:
- if (value == null) {
- unsetExperimentStatus();
- } else {
- setExperimentStatus((ExperimentStatus)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case EXPERIMENT_ID:
- return getExperimentID();
-
- case PROJECT_ID:
- return getProjectID();
-
- case CREATION_TIME:
- return Long.valueOf(getCreationTime());
-
- case USER_NAME:
- return getUserName();
-
- case NAME:
- return getName();
-
- case DESCRIPTION:
- return getDescription();
-
- case APPLICATION_ID:
- return getApplicationId();
-
- case EXPERIMENT_STATUS:
- return getExperimentStatus();
-
- }
- 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 EXPERIMENT_ID:
- return isSetExperimentID();
- case PROJECT_ID:
- return isSetProjectID();
- case CREATION_TIME:
- return isSetCreationTime();
- case USER_NAME:
- return isSetUserName();
- case NAME:
- return isSetName();
- case DESCRIPTION:
- return isSetDescription();
- case APPLICATION_ID:
- return isSetApplicationId();
- case EXPERIMENT_STATUS:
- return isSetExperimentStatus();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ExperimentSummary)
- return this.equals((ExperimentSummary)that);
- return false;
- }
-
- public boolean equals(ExperimentSummary that) {
- if (that == null)
- 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_projectID = true && this.isSetProjectID();
- boolean that_present_projectID = true && that.isSetProjectID();
- if (this_present_projectID || that_present_projectID) {
- if (!(this_present_projectID && that_present_projectID))
- return false;
- if (!this.projectID.equals(that.projectID))
- return false;
- }
-
- boolean this_present_creationTime = true && this.isSetCreationTime();
- boolean that_present_creationTime = true && that.isSetCreationTime();
- if (this_present_creationTime || that_present_creationTime) {
- if (!(this_present_creationTime && that_present_creationTime))
- return false;
- if (this.creationTime != that.creationTime)
- return false;
- }
-
- boolean this_present_userName = true && this.isSetUserName();
- boolean that_present_userName = true && that.isSetUserName();
- if (this_present_userName || that_present_userName) {
- if (!(this_present_userName && that_present_userName))
- return false;
- if (!this.userName.equals(that.userName))
- return false;
- }
-
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
- return false;
- if (!this.description.equals(that.description))
- return false;
- }
-
- 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.applicationId.equals(that.applicationId))
- return false;
- }
-
- boolean this_present_experimentStatus = true && this.isSetExperimentStatus();
- boolean that_present_experimentStatus = true && that.isSetExperimentStatus();
- if (this_present_experimentStatus || that_present_experimentStatus) {
- if (!(this_present_experimentStatus && that_present_experimentStatus))
- return false;
- if (!this.experimentStatus.equals(that.experimentStatus))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_experimentID = true && (isSetExperimentID());
- list.add(present_experimentID);
- if (present_experimentID)
- list.add(experimentID);
-
- boolean present_projectID = true && (isSetProjectID());
- list.add(present_projectID);
- if (present_projectID)
- list.add(projectID);
-
- boolean present_creationTime = true && (isSetCreationTime());
- list.add(present_creationTime);
- if (present_creationTime)
- list.add(creationTime);
-
- boolean present_userName = true && (isSetUserName());
- list.add(present_userName);
- if (present_userName)
- list.add(userName);
-
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
-
- 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);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(ExperimentSummary other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- 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(isSetProjectID()).compareTo(other.isSetProjectID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetProjectID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectID, other.projectID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreationTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetUserName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(other.isSetApplicationId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApplicationId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, other.applicationId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetExperimentStatus()).compareTo(other.isSetExperimentStatus());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetExperimentStatus()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentStatus, other.experimentStatus);
- 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("ExperimentSummary(");
- boolean first = true;
-
- sb.append("experimentID:");
- if (this.experimentID == null) {
- sb.append("null");
- } else {
- sb.append(this.experimentID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("projectID:");
- if (this.projectID == null) {
- sb.append("null");
- } else {
- sb.append(this.projectID);
- }
- first = false;
- if (isSetCreationTime()) {
- if (!first) sb.append(", ");
- sb.append("creationTime:");
- sb.append(this.creationTime);
- first = false;
- }
- if (!first) sb.append(", ");
- sb.append("userName:");
- if (this.userName == null) {
- sb.append("null");
- } else {
- sb.append(this.userName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- if (isSetDescription()) {
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
- sb.append("null");
- } else {
- sb.append(this.description);
- }
- first = false;
- }
- if (isSetApplicationId()) {
- if (!first) sb.append(", ");
- sb.append("applicationId:");
- if (this.applicationId == null) {
- sb.append("null");
- } else {
- sb.append(this.applicationId);
- }
- first = false;
- }
- if (isSetExperimentStatus()) {
- if (!first) sb.append(", ");
- sb.append("experimentStatus:");
- if (this.experimentStatus == null) {
- sb.append("null");
- } else {
- sb.append(this.experimentStatus);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetExperimentID()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentID' is unset! Struct:" + toString());
- }
-
- if (!isSetProjectID()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'projectID' is unset! Struct:" + toString());
- }
-
- if (!isSetUserName()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' is unset! 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 (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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;
- 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 ExperimentSummaryStandardSchemeFactory implements SchemeFactory {
- public ExperimentSummaryStandardScheme getScheme() {
- return new ExperimentSummaryStandardScheme();
- }
- }
-
- private static class ExperimentSummaryStandardScheme extends StandardScheme<ExperimentSummary> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ExperimentSummary 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: // 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 2: // PROJECT_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.projectID = iprot.readString();
- struct.setProjectIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // CREATION_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.creationTime = iprot.readI64();
- struct.setCreationTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // USER_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // APPLICATION_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.applicationId = iprot.readString();
- struct.setApplicationIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // EXPERIMENT_STATUS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.experimentStatus = new ExperimentStatus();
- struct.experimentStatus.read(iprot);
- struct.setExperimentStatusIsSet(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, ExperimentSummary struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.experimentID != null) {
- oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
- oprot.writeString(struct.experimentID);
- oprot.writeFieldEnd();
- }
- if (struct.projectID != null) {
- oprot.writeFieldBegin(PROJECT_ID_FIELD_DESC);
- oprot.writeString(struct.projectID);
- oprot.writeFieldEnd();
- }
- if (struct.isSetCreationTime()) {
- oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
- oprot.writeI64(struct.creationTime);
- oprot.writeFieldEnd();
- }
- if (struct.userName != null) {
- oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
- oprot.writeString(struct.userName);
- oprot.writeFieldEnd();
- }
- if (struct.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(struct.name);
- oprot.writeFieldEnd();
- }
- if (struct.description != null) {
- if (struct.isSetDescription()) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.description);
- oprot.writeFieldEnd();
- }
- }
- 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);
- struct.experimentStatus.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ExperimentSummaryTupleSchemeFactory implements SchemeFactory {
- public ExperimentSummaryTupleScheme getScheme() {
- return new ExperimentSummaryTupleScheme();
- }
- }
-
- private static class ExperimentSummaryTupleScheme extends TupleScheme<ExperimentSummary> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ExperimentSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.experimentID);
- oprot.writeString(struct.projectID);
- oprot.writeString(struct.userName);
- oprot.writeString(struct.name);
- BitSet optionals = new BitSet();
- if (struct.isSetCreationTime()) {
- optionals.set(0);
- }
- if (struct.isSetDescription()) {
- optionals.set(1);
- }
- if (struct.isSetApplicationId()) {
- optionals.set(2);
- }
- if (struct.isSetExperimentStatus()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetCreationTime()) {
- oprot.writeI64(struct.creationTime);
- }
- if (struct.isSetDescription()) {
- oprot.writeString(struct.description);
- }
- if (struct.isSetApplicationId()) {
- oprot.writeString(struct.applicationId);
- }
- if (struct.isSetExperimentStatus()) {
- struct.experimentStatus.write(oprot);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ExperimentSummary 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.userName = iprot.readString();
- struct.setUserNameIsSet(true);
- struct.name = iprot.readString();
- struct.setNameIsSet(true);
- BitSet incoming = iprot.readBitSet(4);
- if (incoming.get(0)) {
- struct.creationTime = iprot.readI64();
- struct.setCreationTimeIsSet(true);
- }
- if (incoming.get(1)) {
- struct.description = iprot.readString();
- struct.setDescriptionIsSet(true);
- }
- if (incoming.get(2)) {
- struct.applicationId = iprot.readString();
- struct.setApplicationIdIsSet(true);
- }
- if (incoming.get(3)) {
- struct.experimentStatus = new ExperimentStatus();
- struct.experimentStatus.read(iprot);
- struct.setExperimentStatusIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/51fa27b8/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
deleted file mode 100644
index 5aa7091..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobDetails.java
+++ /dev/null
@@ -1,1317 +0,0 @@
-/**
- * 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.workspace.experiment;
-
-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-11")
-public class JobDetails implements org.apache.thrift.TBase<JobDetails, JobDetails._Fields>, java.io.Serializable, Cloneable, Comparable<JobDetails> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobDetails");
-
- 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 JOB_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("jobDescription", org.apache.thrift.protocol.TType.STRING, (short)2);
- 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 JOB_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobStatus", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final org.apache.thrift.protocol.TField APPLICATION_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationStatus", org.apache.thrift.protocol.TType.STRUCT, (short)5);
- private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)6);
- private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_CONSUMED_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourceConsumed", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final org.apache.thrift.protocol.TField JOB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("jobName", org.apache.thrift.protocol.TType.STRING, (short)8);
- private static final org.apache.thrift.protocol.TField WORKING_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("workingDir", org.apache.thrift.protocol.TType.STRING, (short)9);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new JobDetailsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new JobDetailsTupleSchemeFactory());
- }
-
- private String jobID; // required
- private String jobDescription; // required
- private long creationTime; // optional
- private JobStatus jobStatus; // optional
- private ApplicationStatus applicationStatus; // optional
- private List<ErrorDetails> errors; // optional
- private String computeResourceConsumed; // optional
- private String jobName; // optional
- private String workingDir; // 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 {
- JOB_ID((short)1, "jobID"),
- JOB_DESCRIPTION((short)2, "jobDescription"),
- CREATION_TIME((short)3, "creationTime"),
- JOB_STATUS((short)4, "jobStatus"),
- APPLICATION_STATUS((short)5, "applicationStatus"),
- ERRORS((short)6, "errors"),
- COMPUTE_RESOURCE_CONSUMED((short)7, "computeResourceConsumed"),
- JOB_NAME((short)8, "jobName"),
- WORKING_DIR((short)9, "workingDir");
-
- 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: // JOB_ID
- return JOB_ID;
- case 2: // JOB_DESCRIPTION
- return JOB_DESCRIPTION;
- case 3: // CREATION_TIME
- return CREATION_TIME;
- case 4: // JOB_STATUS
- return JOB_STATUS;
- case 5: // APPLICATION_STATUS
- return APPLICATION_STATUS;
- case 6: // ERRORS
- return ERRORS;
- case 7: // COMPUTE_RESOURCE_CONSUMED
- return COMPUTE_RESOURCE_CONSUMED;
- case 8: // JOB_NAME
- return JOB_NAME;
- case 9: // WORKING_DIR
- return WORKING_DIR;
- 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
- private static final int __CREATIONTIME_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.JOB_STATUS,_Fields.APPLICATION_STATUS,_Fields.ERRORS,_Fields.COMPUTE_RESOURCE_CONSUMED,_Fields.JOB_NAME,_Fields.WORKING_DIR};
- 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.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("jobID", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.JOB_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("jobDescription", 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.JOB_STATUS, new org.apache.thrift.meta_data.FieldMetaData("jobStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobStatus.class)));
- tmpMap.put(_Fields.APPLICATION_STATUS, new org.apache.thrift.meta_data.FieldMetaData("applicationStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ApplicationStatus.class)));
- tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ErrorDetails.class))));
- tmpMap.put(_Fields.COMPUTE_RESOURCE_CONSUMED, new org.apache.thrift.meta_data.FieldMetaData("computeResourceConsumed", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.JOB_NAME, new org.apache.thrift.meta_data.FieldMetaData("jobName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.WORKING_DIR, new org.apache.thrift.meta_data.FieldMetaData("workingDir", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobDetails.class, metaDataMap);
- }
-
- public JobDetails() {
- this.jobID = "DO_NOT_SET_AT_CLIENTS";
-
- }
-
- public JobDetails(
- String jobID,
- String jobDescription)
- {
- this();
- this.jobID = jobID;
- this.jobDescription = jobDescription;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public JobDetails(JobDetails other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetJobID()) {
- this.jobID = other.jobID;
- }
- if (other.isSetJobDescription()) {
- this.jobDescription = other.jobDescription;
- }
- this.creationTime = other.creationTime;
- if (other.isSetJobStatus()) {
- this.jobStatus = new JobStatus(other.jobStatus);
- }
- if (other.isSetApplicationStatus()) {
- this.applicationStatus = new ApplicationStatus(other.applicationStatus);
- }
- if (other.isSetErrors()) {
- List<ErrorDetails> __this__errors = new ArrayList<ErrorDetails>(other.errors.size());
- for (ErrorDetails other_element : other.errors) {
- __this__errors.add(new ErrorDetails(other_element));
- }
- this.errors = __this__errors;
- }
- if (other.isSetComputeResourceConsumed()) {
- this.computeResourceConsumed = other.computeResourceConsumed;
- }
- if (other.isSetJobName()) {
- this.jobName = other.jobName;
- }
- if (other.isSetWorkingDir()) {
- this.workingDir = other.workingDir;
- }
- }
-
- public JobDetails deepCopy() {
- return new JobDetails(this);
- }
-
- @Override
- public void clear() {
- this.jobID = "DO_NOT_SET_AT_CLIENTS";
-
- this.jobDescription = null;
- setCreationTimeIsSet(false);
- this.creationTime = 0;
- this.jobStatus = null;
- this.applicationStatus = null;
- this.errors = null;
- this.computeResourceConsumed = null;
- this.jobName = null;
- this.workingDir = null;
- }
-
- public String getJobID() {
- return this.jobID;
- }
-
- public void setJobID(String jobID) {
- this.jobID = jobID;
- }
-
- public void unsetJobID() {
- this.jobID = null;
- }
-
- /** Returns true if field jobID is set (has been assigned a value) and false otherwise */
- public boolean isSetJobID() {
- return this.jobID != null;
- }
-
- public void setJobIDIsSet(boolean value) {
- if (!value) {
- this.jobID = null;
- }
- }
-
- public String getJobDescription() {
- return this.jobDescription;
- }
-
- public void setJobDescription(String jobDescription) {
- this.jobDescription = jobDescription;
- }
-
- public void unsetJobDescription() {
- this.jobDescription = null;
- }
-
- /** Returns true if field jobDescription is set (has been assigned a value) and false otherwise */
- public boolean isSetJobDescription() {
- return this.jobDescription != null;
- }
-
- public void setJobDescriptionIsSet(boolean value) {
- if (!value) {
- this.jobDescription = null;
- }
- }
-
- public long getCreationTime() {
- return this.creationTime;
- }
-
- public void setCreationTime(long creationTime) {
- this.creationTime = creationTime;
- setCreationTimeIsSet(true);
- }
-
- public void unsetCreationTime() {
- __isset_bitfield = 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);
- }
-
- public void setCreationTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
- }
-
- public JobStatus getJobStatus() {
- return this.jobStatus;
- }
-
- public void setJobStatus(JobStatus jobStatus) {
- this.jobStatus = jobStatus;
- }
-
- public void unsetJobStatus() {
- this.jobStatus = null;
- }
-
- /** Returns true if field jobStatus is set (has been assigned a value) and false otherwise */
- public boolean isSetJobStatus() {
- return this.jobStatus != null;
- }
-
- public void setJobStatusIsSet(boolean value) {
- if (!value) {
- this.jobStatus = null;
- }
- }
-
- public ApplicationStatus getApplicationStatus() {
- return this.applicationStatus;
- }
-
- public void setApplicationStatus(ApplicationStatus applicationStatus) {
- this.applicationStatus = applicationStatus;
- }
-
- public void unsetApplicationStatus() {
- this.applicationStatus = null;
- }
-
- /** Returns true if field applicationStatus is set (has been assigned a value) and false otherwise */
- public boolean isSetApplicationStatus() {
- return this.applicationStatus != null;
- }
-
- public void setApplicationStatusIsSet(boolean value) {
- if (!value) {
- this.applicationStatus = null;
- }
- }
-
- public int getErrorsSize() {
- return (this.errors == null) ? 0 : this.errors.size();
- }
-
- public java.util.Iterator<ErrorDetails> getErrorsIterator() {
- return (this.errors == null) ? null : this.errors.iterator();
- }
-
- public void addToErrors(ErrorDetails elem) {
- if (this.errors == null) {
- this.errors = new ArrayList<ErrorDetails>();
- }
- this.errors.add(elem);
- }
-
- public List<ErrorDetails> getErrors() {
- return this.errors;
- }
-
- public void setErrors(List<ErrorDetails> errors) {
- this.errors = errors;
- }
-
- public void unsetErrors() {
- this.errors = null;
- }
-
- /** Returns true if field errors is set (has been assigned a value) and false otherwise */
- public boolean isSetErrors() {
- return this.errors != null;
- }
-
- public void setErrorsIsSet(boolean value) {
- if (!value) {
- this.errors = null;
- }
- }
-
- public String getComputeResourceConsumed() {
- return this.computeResourceConsumed;
- }
-
- public void setComputeResourceConsumed(String computeResourceConsumed) {
- this.computeResourceConsumed = computeResourceConsumed;
- }
-
- public void unsetComputeResourceConsumed() {
- this.computeResourceConsumed = null;
- }
-
- /** Returns true if field computeResourceConsumed is set (has been assigned a value) and false otherwise */
- public boolean isSetComputeResourceConsumed() {
- return this.computeResourceConsumed != null;
- }
-
- public void setComputeResourceConsumedIsSet(boolean value) {
- if (!value) {
- this.computeResourceConsumed = null;
- }
- }
-
- public String getJobName() {
- return this.jobName;
- }
-
- public void setJobName(String jobName) {
- this.jobName = jobName;
- }
-
- public void unsetJobName() {
- this.jobName = null;
- }
-
- /** Returns true if field jobName is set (has been assigned a value) and false otherwise */
- public boolean isSetJobName() {
- return this.jobName != null;
- }
-
- public void setJobNameIsSet(boolean value) {
- if (!value) {
- this.jobName = null;
- }
- }
-
- public String getWorkingDir() {
- return this.workingDir;
- }
-
- public void setWorkingDir(String workingDir) {
- this.workingDir = workingDir;
- }
-
- public void unsetWorkingDir() {
- this.workingDir = null;
- }
-
- /** Returns true if field workingDir is set (has been assigned a value) and false otherwise */
- public boolean isSetWorkingDir() {
- return this.workingDir != null;
- }
-
- public void setWorkingDirIsSet(boolean value) {
- if (!value) {
- this.workingDir = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case JOB_ID:
- if (value == null) {
- unsetJobID();
- } else {
- setJobID((String)value);
- }
- break;
-
- case JOB_DESCRIPTION:
- if (value == null) {
- unsetJobDescription();
- } else {
- setJobDescription((String)value);
- }
- break;
-
- case CREATION_TIME:
- if (value == null) {
- unsetCreationTime();
- } else {
- setCreationTime((Long)value);
- }
- break;
-
- case JOB_STATUS:
- if (value == null) {
- unsetJobStatus();
- } else {
- setJobStatus((JobStatus)value);
- }
- break;
-
- case APPLICATION_STATUS:
- if (value == null) {
- unsetApplicationStatus();
- } else {
- setApplicationStatus((ApplicationStatus)value);
- }
- break;
-
- case ERRORS:
- if (value == null) {
- unsetErrors();
- } else {
- setErrors((List<ErrorDetails>)value);
- }
- break;
-
- case COMPUTE_RESOURCE_CONSUMED:
- if (value == null) {
- unsetComputeResourceConsumed();
- } else {
- setComputeResourceConsumed((String)value);
- }
- break;
-
- case JOB_NAME:
- if (value == null) {
- unsetJobName();
- } else {
- setJobName((String)value);
- }
- break;
-
- case WORKING_DIR:
- if (value == null) {
- unsetWorkingDir();
- } else {
- setWorkingDir((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case JOB_ID:
- return getJobID();
-
- case JOB_DESCRIPTION:
- return getJobDescription();
-
- case CREATION_TIME:
- return Long.valueOf(getCreationTime());
-
- case JOB_STATUS:
- return getJobStatus();
-
- case APPLICATION_STATUS:
- return getApplicationStatus();
-
- case ERRORS:
- return getErrors();
-
- case COMPUTE_RESOURCE_CONSUMED:
- return getComputeResourceConsumed();
-
- case JOB_NAME:
- return getJobName();
-
- case WORKING_DIR:
- return getWorkingDir();
-
- }
- 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 JOB_ID:
- return isSetJobID();
- case JOB_DESCRIPTION:
- return isSetJobDescription();
- case CREATION_TIME:
- return isSetCreationTime();
- case JOB_STATUS:
- return isSetJobStatus();
- case APPLICATION_STATUS:
- return isSetApplicationStatus();
- case ERRORS:
- return isSetErrors();
- case COMPUTE_RESOURCE_CONSUMED:
- return isSetComputeResourceConsumed();
- case JOB_NAME:
- return isSetJobName();
- case WORKING_DIR:
- return isSetWorkingDir();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof JobDetails)
- return this.equals((JobDetails)that);
- return false;
- }
-
- public boolean equals(JobDetails that) {
- if (that == null)
- return false;
-
- boolean this_present_jobID = true && this.isSetJobID();
- boolean that_present_jobID = true && that.isSetJobID();
- if (this_present_jobID || that_present_jobID) {
- if (!(this_present_jobID && that_present_jobID))
- return false;
- if (!this.jobID.equals(that.jobID))
- return false;
- }
-
- boolean this_present_jobDescription = true && this.isSetJobDescription();
- boolean that_present_jobDescription = true && that.isSetJobDescription();
- if (this_present_jobDescription || that_present_jobDescription) {
- if (!(this_present_jobDescription && that_present_jobDescription))
- return false;
- if (!this.jobDescription.equals(that.jobDescription))
- return false;
- }
-
- boolean this_present_creationTime = true && this.isSetCreationTime();
- boolean that_present_creationTime = true && that.isSetCreationTime();
- if (this_present_creationTime || that_present_creationTime) {
- if (!(this_present_creationTime && that_present_creationTime))
- return false;
- if (this.creationTime != that.creationTime)
- return false;
- }
-
- boolean this_present_jobStatus = true && this.isSetJobStatus();
- boolean that_present_jobStatus = true && that.isSetJobStatus();
- if (this_present_jobStatus || that_present_jobStatus) {
- if (!(this_present_jobStatus && that_present_jobStatus))
- return false;
- if (!this.jobStatus.equals(that.jobStatus))
- return false;
- }
-
- boolean this_present_applicationStatus = true && this.isSetApplicationStatus();
- boolean that_present_applicationStatus = true && that.isSetApplicationStatus();
- if (this_present_applicationStatus || that_present_applicationStatus) {
- if (!(this_present_applicationStatus && that_present_applicationStatus))
- return false;
- if (!this.applicationStatus.equals(that.applicationStatus))
- return false;
- }
-
- boolean this_present_errors = true && this.isSetErrors();
- boolean that_present_errors = true && that.isSetErrors();
- if (this_present_errors || that_present_errors) {
- if (!(this_present_errors && that_present_errors))
- return false;
- if (!this.errors.equals(that.errors))
- return false;
- }
-
- boolean this_present_computeResourceConsumed = true && this.isSetComputeResourceConsumed();
- boolean that_present_computeResourceConsumed = true && that.isSetComputeResourceConsumed();
- if (this_present_computeResourceConsumed || that_present_computeResourceConsumed) {
- if (!(this_present_computeResourceConsumed && that_present_computeResourceConsumed))
- return false;
- if (!this.computeResourceConsumed.equals(that.computeResourceConsumed))
- return false;
- }
-
- boolean this_present_jobName = true && this.isSetJobName();
- boolean that_present_jobName = true && that.isSetJobName();
- if (this_present_jobName || that_present_jobName) {
- if (!(this_present_jobName && that_present_jobName))
- return false;
- if (!this.jobName.equals(that.jobName))
- return false;
- }
-
- boolean this_present_workingDir = true && this.isSetWorkingDir();
- boolean that_present_workingDir = true && that.isSetWorkingDir();
- if (this_present_workingDir || that_present_workingDir) {
- if (!(this_present_workingDir && that_present_workingDir))
- return false;
- if (!this.workingDir.equals(that.workingDir))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_jobID = true && (isSetJobID());
- list.add(present_jobID);
- if (present_jobID)
- list.add(jobID);
-
- boolean present_jobDescription = true && (isSetJobDescription());
- list.add(present_jobDescription);
- if (present_jobDescription)
- list.add(jobDescription);
-
- boolean present_creationTime = true && (isSetCreationTime());
- list.add(present_creationTime);
- if (present_creationTime)
- list.add(creationTime);
-
- boolean present_jobStatus = true && (isSetJobStatus());
- list.add(present_jobStatus);
- if (present_jobStatus)
- list.add(jobStatus);
-
- boolean present_applicationStatus = true && (isSetApplicationStatus());
- list.add(present_applicationStatus);
- if (present_applicationStatus)
- list.add(applicationStatus);
-
- boolean present_errors = true && (isSetErrors());
- list.add(present_errors);
- if (present_errors)
- list.add(errors);
-
- boolean present_computeResourceConsumed = true && (isSetComputeResourceConsumed());
- list.add(present_computeResourceConsumed);
- if (present_computeResourceConsumed)
- list.add(computeResourceConsumed);
-
- boolean present_jobName = true && (isSetJobName());
- list.add(present_jobName);
- if (present_jobName)
- list.add(jobName);
-
- boolean present_workingDir = true && (isSetWorkingDir());
- list.add(present_workingDir);
- if (present_workingDir)
- list.add(workingDir);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(JobDetails other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetJobID()).compareTo(other.isSetJobID());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetJobID()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobID, other.jobID);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetJobDescription()).compareTo(other.isSetJobDescription());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetJobDescription()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobDescription, other.jobDescription);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetCreationTime()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetJobStatus()).compareTo(other.isSetJobStatus());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetJobStatus()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobStatus, other.jobStatus);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetApplicationStatus()).compareTo(other.isSetApplicationStatus());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetApplicationStatus()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationStatus, other.applicationStatus);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetErrors()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetComputeResourceConsumed()).compareTo(other.isSetComputeResourceConsumed());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetComputeResourceConsumed()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourceConsumed, other.computeResourceConsumed);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetJobName()).compareTo(other.isSetJobName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetJobName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobName, other.jobName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetWorkingDir()).compareTo(other.isSetWorkingDir());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetWorkingDir()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workingDir, other.workingDir);
- 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("JobDetails(");
- boolean first = true;
-
- sb.append("jobID:");
- if (this.jobID == null) {
- sb.append("null");
- } else {
- sb.append(this.jobID);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("jobDescription:");
- if (this.jobDescription == null) {
- sb.append("null");
- } else {
- sb.append(this.jobDescription);
- }
- first = false;
- if (isSetCreationTime()) {
- if (!first) sb.append(", ");
- sb.append("creationTime:");
- sb.append(this.creationTime);
- first = false;
- }
- if (isSetJobStatus()) {
- if (!first) sb.append(", ");
- sb.append("jobStatus:");
- if (this.jobStatus == null) {
- sb.append("null");
- } else {
- sb.append(this.jobStatus);
- }
- first = false;
- }
- if (isSetApplicationStatus()) {
- if (!first) sb.append(", ");
- sb.append("applicationStatus:");
- if (this.applicationStatus == null) {
- sb.append("null");
- } else {
- sb.append(this.applicationStatus);
- }
- first = false;
- }
- if (isSetErrors()) {
- if (!first) sb.append(", ");
- sb.append("errors:");
- if (this.errors == null) {
- sb.append("null");
- } else {
- sb.append(this.errors);
- }
- first = false;
- }
- if (isSetComputeResourceConsumed()) {
- if (!first) sb.append(", ");
- sb.append("computeResourceConsumed:");
- if (this.computeResourceConsumed == null) {
- sb.append("null");
- } else {
- sb.append(this.computeResourceConsumed);
- }
- first = false;
- }
- if (isSetJobName()) {
- if (!first) sb.append(", ");
- sb.append("jobName:");
- if (this.jobName == null) {
- sb.append("null");
- } else {
- sb.append(this.jobName);
- }
- first = false;
- }
- if (isSetWorkingDir()) {
- if (!first) sb.append(", ");
- sb.append("workingDir:");
- if (this.workingDir == null) {
- sb.append("null");
- } else {
- sb.append(this.workingDir);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetJobID()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobID' is unset! Struct:" + toString());
- }
-
- if (!isSetJobDescription()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobDescription' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- if (jobStatus != null) {
- jobStatus.validate();
- }
- if (applicationStatus != null) {
- applicationStatus.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 (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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;
- 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 JobDetailsStandardSchemeFactory implements SchemeFactory {
- public JobDetailsStandardScheme getScheme() {
- return new JobDetailsStandardScheme();
- }
- }
-
- private static class JobDetailsStandardScheme extends StandardScheme<JobDetails> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, JobDetails 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: // JOB_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.jobID = iprot.readString();
- struct.setJobIDIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // JOB_DESCRIPTION
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.jobDescription = iprot.readString();
- struct.setJobDescriptionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // CREATION_TIME
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.creationTime = iprot.readI64();
- struct.setCreationTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // JOB_STATUS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.jobStatus = new JobStatus();
- struct.jobStatus.read(iprot);
- struct.setJobStatusIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // APPLICATION_STATUS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.applicationStatus = new ApplicationStatus();
- struct.applicationStatus.read(iprot);
- struct.setApplicationStatusIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 6: // ERRORS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.errors = new ArrayList<ErrorDetails>(_list8.size);
- ErrorDetails _elem9;
- for (int _i10 = 0; _i10 < _list8.size; ++_i10)
- {
- _elem9 = new ErrorDetails();
- _elem9.read(iprot);
- struct.errors.add(_elem9);
- }
- iprot.readListEnd();
- }
- struct.setErrorsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 7: // COMPUTE_RESOURCE_CONSUMED
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.computeResourceConsumed = iprot.readString();
- struct.setComputeResourceConsumedIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 8: // JOB_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.jobName = iprot.readString();
- struct.setJobNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 9: // WORKING_DIR
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.workingDir = iprot.readString();
- struct.setWorkingDirIsSet(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, JobDetails struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.jobID != null) {
- oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
- oprot.writeString(struct.jobID);
- oprot.writeFieldEnd();
- }
- if (struct.jobDescription != null) {
- oprot.writeFieldBegin(JOB_DESCRIPTION_FIELD_DESC);
- oprot.writeString(struct.jobDescription);
- oprot.writeFieldEnd();
- }
- if (struct.isSetCreationTime()) {
- oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
- oprot.writeI64(struct.creationTime);
- oprot.writeFieldEnd();
- }
- if (struct.jobStatus != null) {
- if (struct.isSetJobStatus()) {
- oprot.writeFieldBegin(JOB_STATUS_FIELD_DESC);
- struct.jobStatus.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.applicationStatus != null) {
- if (struct.isSetApplicationStatus()) {
- oprot.writeFieldBegin(APPLICATION_STATUS_FIELD_DESC);
- struct.applicationStatus.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- if (struct.errors != null) {
- if (struct.isSetErrors()) {
- oprot.writeFieldBegin(ERRORS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.errors.size()));
- for (ErrorDetails _iter11 : struct.errors)
- {
- _iter11.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- if (struct.computeResourceConsumed != null) {
- if (struct.isSetComputeResourceConsumed()) {
- oprot.writeFieldBegin(COMPUTE_RESOURCE_CONSUMED_FIELD_DESC);
- oprot.writeString(struct.computeResourceConsumed);
- oprot.writeFieldEnd();
- }
- }
- if (struct.jobName != null) {
- if (struct.isSetJobName()) {
- oprot.writeFieldBegin(JOB_NAME_FIELD_DESC);
- oprot.writeString(struct.jobName);
- oprot.writeFieldEnd();
- }
- }
- if (struct.workingDir != null) {
- if (struct.isSetWorkingDir()) {
- oprot.writeFieldBegin(WORKING_DIR_FIELD_DESC);
- oprot.writeString(struct.workingDir);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class JobDetailsTupleSchemeFactory implements SchemeFactory {
- public JobDetailsTupleScheme getScheme() {
- return new JobDetailsTupleScheme();
- }
- }
-
- private static class JobDetailsTupleScheme extends TupleScheme<JobDetails> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, JobDetails struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.jobID);
- oprot.writeString(struct.jobDescription);
- BitSet optionals = new BitSet();
- if (struct.isSetCreationTime()) {
- optionals.set(0);
- }
- if (struct.isSetJobStatus()) {
- optionals.set(1);
- }
- if (struct.isSetApplicationStatus()) {
- optionals.set(2);
- }
- if (struct.isSetErrors()) {
- optionals.set(3);
- }
- if (struct.isSetComputeResourceConsumed()) {
- optionals.set(4);
- }
- if (struct.isSetJobName()) {
- optionals.set(5);
- }
- if (struct.isSetWorkingDir()) {
- optionals.set(6);
- }
- oprot.writeBitSet(optionals, 7);
- if (struct.isSetCreationTime()) {
- oprot.writeI64(struct.creationTime);
- }
- if (struct.isSetJobStatus()) {
- struct.jobStatus.write(oprot);
- }
- if (struct.isSetApplicationStatus()) {
- struct.applicationStatus.write(oprot);
- }
- if (struct.isSetErrors()) {
- {
- oprot.writeI32(struct.errors.size());
- for (ErrorDetails _iter12 : struct.errors)
- {
- _iter12.write(oprot);
- }
- }
- }
- if (struct.isSetComputeResourceConsumed()) {
- oprot.writeString(struct.computeResourceConsumed);
- }
- if (struct.isSetJobName()) {
- oprot.writeString(struct.jobName);
- }
- if (struct.isSetWorkingDir()) {
- oprot.writeString(struct.workingDir);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, JobDetails struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.jobID = iprot.readString();
- struct.setJobIDIsSet(true);
- struct.jobDescription = iprot.readString();
- struct.setJobDescriptionIsSet(true);
- BitSet incoming = iprot.readBitSet(7);
- if (incoming.get(0)) {
- struct.creationTime = iprot.readI64();
- struct.setCreationTimeIsSet(true);
- }
- if (incoming.get(1)) {
- struct.jobStatus = new JobStatus();
- struct.jobStatus.read(iprot);
- struct.setJobStatusIsSet(true);
- }
- if (incoming.get(2)) {
- struct.applicationStatus = new ApplicationStatus();
- struct.applicationStatus.read(iprot);
- struct.setApplicationStatusIsSet(true);
- }
- if (incoming.get(3)) {
- {
- org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.errors = new ArrayList<ErrorDetails>(_list13.size);
- ErrorDetails _elem14;
- for (int _i15 = 0; _i15 < _list13.size; ++_i15)
- {
- _elem14 = new ErrorDetails();
- _elem14.read(iprot);
- struct.errors.add(_elem14);
- }
- }
- struct.setErrorsIsSet(true);
- }
- if (incoming.get(4)) {
- struct.computeResourceConsumed = iprot.readString();
- struct.setComputeResourceConsumedIsSet(true);
- }
- if (incoming.get(5)) {
- struct.jobName = iprot.readString();
- struct.setJobNameIsSet(true);
- }
- if (incoming.get(6)) {
- struct.workingDir = iprot.readString();
- struct.setWorkingDirIsSet(true);
- }
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/airavata/blob/51fa27b8/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobState.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobState.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobState.java
deleted file mode 100644
index 458ec32..0000000
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/JobState.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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.workspace.experiment;
-
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
-public enum JobState implements org.apache.thrift.TEnum {
- SUBMITTED(0),
- UN_SUBMITTED(1),
- SETUP(2),
- QUEUED(3),
- ACTIVE(4),
- COMPLETE(5),
- CANCELING(6),
- CANCELED(7),
- FAILED(8),
- HELD(9),
- SUSPENDED(10),
- UNKNOWN(11);
-
- private final int value;
-
- private JobState(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static JobState findByValue(int value) {
- switch (value) {
- case 0:
- return SUBMITTED;
- case 1:
- return UN_SUBMITTED;
- case 2:
- return SETUP;
- case 3:
- return QUEUED;
- case 4:
- return ACTIVE;
- case 5:
- return COMPLETE;
- case 6:
- return CANCELING;
- case 7:
- return CANCELED;
- case 8:
- return FAILED;
- case 9:
- return HELD;
- case 10:
- return SUSPENDED;
- case 11:
- return UNKNOWN;
- default:
- return null;
- }
- }
-}