You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/09/05 20:44:04 UTC
[02/52] [partial] airavata git commit: AIRAVATA-2505 Upgrade Airavata
to Thrift 0.10.0
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e775660/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 664c922..ccef706 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
@@ -16,47 +16,20 @@
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.model.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"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* A structure holding the experiment configuration.
*
*
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
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");
@@ -71,21 +44,18 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
private static final org.apache.thrift.protocol.TField EXPERIMENT_DATA_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentDataDir", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.protocol.TField USE_USER_CRPREF_FIELD_DESC = new org.apache.thrift.protocol.TField("useUserCRPref", org.apache.thrift.protocol.TType.BOOL, (short)10);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UserConfigurationDataModelStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UserConfigurationDataModelTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UserConfigurationDataModelStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UserConfigurationDataModelTupleSchemeFactory();
private boolean airavataAutoSchedule; // required
private boolean overrideManualScheduledParams; // required
private boolean shareExperimentPublicly; // optional
private org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel computationalResourceScheduling; // optional
private boolean throttleResources; // optional
- private String userDN; // optional
+ private java.lang.String userDN; // optional
private boolean generateCert; // optional
- private String storageId; // optional
- private String experimentDataDir; // optional
+ private java.lang.String storageId; // optional
+ private java.lang.String experimentDataDir; // optional
private boolean useUserCRPref; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -101,10 +71,10 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
EXPERIMENT_DATA_DIR((short)9, "experimentDataDir"),
USE_USER_CRPREF((short)10, "useUserCRPref");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -145,21 +115,21 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -168,7 +138,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -182,9 +152,9 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
private static final int __USEUSERCRPREF_ISSET_ID = 5;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.SHARE_EXPERIMENT_PUBLICLY,_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING,_Fields.THROTTLE_RESOURCES,_Fields.USER_DN,_Fields.GENERATE_CERT,_Fields.STORAGE_ID,_Fields.EXPERIMENT_DATA_DIR,_Fields.USE_USER_CRPREF};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AIRAVATA_AUTO_SCHEDULE, new org.apache.thrift.meta_data.FieldMetaData("airavataAutoSchedule", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.OVERRIDE_MANUAL_SCHEDULED_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("overrideManualScheduledParams", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -205,7 +175,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USE_USER_CRPREF, new org.apache.thrift.meta_data.FieldMetaData("useUserCRPref", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserConfigurationDataModel.class, metaDataMap);
}
@@ -292,16 +262,16 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
public void unsetAiravataAutoSchedule() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
}
/** Returns true if field airavataAutoSchedule is set (has been assigned a value) and false otherwise */
public boolean isSetAiravataAutoSchedule() {
- return EncodingUtils.testBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID);
}
public void setAiravataAutoScheduleIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AIRAVATAAUTOSCHEDULE_ISSET_ID, value);
}
public boolean isOverrideManualScheduledParams() {
@@ -314,16 +284,16 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
public void unsetOverrideManualScheduledParams() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
}
/** Returns true if field overrideManualScheduledParams is set (has been assigned a value) and false otherwise */
public boolean isSetOverrideManualScheduledParams() {
- return EncodingUtils.testBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID);
}
public void setOverrideManualScheduledParamsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OVERRIDEMANUALSCHEDULEDPARAMS_ISSET_ID, value);
}
public boolean isShareExperimentPublicly() {
@@ -336,16 +306,16 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
public void unsetShareExperimentPublicly() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
}
/** Returns true if field shareExperimentPublicly is set (has been assigned a value) and false otherwise */
public boolean isSetShareExperimentPublicly() {
- return EncodingUtils.testBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID);
}
public void setShareExperimentPubliclyIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SHAREEXPERIMENTPUBLICLY_ISSET_ID, value);
}
public org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel getComputationalResourceScheduling() {
@@ -381,23 +351,23 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
public void unsetThrottleResources() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THROTTLERESOURCES_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THROTTLERESOURCES_ISSET_ID);
}
/** Returns true if field throttleResources is set (has been assigned a value) and false otherwise */
public boolean isSetThrottleResources() {
- return EncodingUtils.testBit(__isset_bitfield, __THROTTLERESOURCES_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THROTTLERESOURCES_ISSET_ID);
}
public void setThrottleResourcesIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THROTTLERESOURCES_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THROTTLERESOURCES_ISSET_ID, value);
}
- public String getUserDN() {
+ public java.lang.String getUserDN() {
return this.userDN;
}
- public void setUserDN(String userDN) {
+ public void setUserDN(java.lang.String userDN) {
this.userDN = userDN;
}
@@ -426,23 +396,23 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
public void unsetGenerateCert() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GENERATECERT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __GENERATECERT_ISSET_ID);
}
/** Returns true if field generateCert is set (has been assigned a value) and false otherwise */
public boolean isSetGenerateCert() {
- return EncodingUtils.testBit(__isset_bitfield, __GENERATECERT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __GENERATECERT_ISSET_ID);
}
public void setGenerateCertIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GENERATECERT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __GENERATECERT_ISSET_ID, value);
}
- public String getStorageId() {
+ public java.lang.String getStorageId() {
return this.storageId;
}
- public void setStorageId(String storageId) {
+ public void setStorageId(java.lang.String storageId) {
this.storageId = storageId;
}
@@ -461,11 +431,11 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
}
- public String getExperimentDataDir() {
+ public java.lang.String getExperimentDataDir() {
return this.experimentDataDir;
}
- public void setExperimentDataDir(String experimentDataDir) {
+ public void setExperimentDataDir(java.lang.String experimentDataDir) {
this.experimentDataDir = experimentDataDir;
}
@@ -494,25 +464,25 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
public void unsetUseUserCRPref() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USEUSERCRPREF_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USEUSERCRPREF_ISSET_ID);
}
/** Returns true if field useUserCRPref is set (has been assigned a value) and false otherwise */
public boolean isSetUseUserCRPref() {
- return EncodingUtils.testBit(__isset_bitfield, __USEUSERCRPREF_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USEUSERCRPREF_ISSET_ID);
}
public void setUseUserCRPrefIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USEUSERCRPREF_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USEUSERCRPREF_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AIRAVATA_AUTO_SCHEDULE:
if (value == null) {
unsetAiravataAutoSchedule();
} else {
- setAiravataAutoSchedule((Boolean)value);
+ setAiravataAutoSchedule((java.lang.Boolean)value);
}
break;
@@ -520,7 +490,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
if (value == null) {
unsetOverrideManualScheduledParams();
} else {
- setOverrideManualScheduledParams((Boolean)value);
+ setOverrideManualScheduledParams((java.lang.Boolean)value);
}
break;
@@ -528,7 +498,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
if (value == null) {
unsetShareExperimentPublicly();
} else {
- setShareExperimentPublicly((Boolean)value);
+ setShareExperimentPublicly((java.lang.Boolean)value);
}
break;
@@ -544,7 +514,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
if (value == null) {
unsetThrottleResources();
} else {
- setThrottleResources((Boolean)value);
+ setThrottleResources((java.lang.Boolean)value);
}
break;
@@ -552,7 +522,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
if (value == null) {
unsetUserDN();
} else {
- setUserDN((String)value);
+ setUserDN((java.lang.String)value);
}
break;
@@ -560,7 +530,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
if (value == null) {
unsetGenerateCert();
} else {
- setGenerateCert((Boolean)value);
+ setGenerateCert((java.lang.Boolean)value);
}
break;
@@ -568,7 +538,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
if (value == null) {
unsetStorageId();
} else {
- setStorageId((String)value);
+ setStorageId((java.lang.String)value);
}
break;
@@ -576,7 +546,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
if (value == null) {
unsetExperimentDataDir();
} else {
- setExperimentDataDir((String)value);
+ setExperimentDataDir((java.lang.String)value);
}
break;
@@ -584,14 +554,14 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
if (value == null) {
unsetUseUserCRPref();
} else {
- setUseUserCRPref((Boolean)value);
+ setUseUserCRPref((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AIRAVATA_AUTO_SCHEDULE:
return isAiravataAutoSchedule();
@@ -624,13 +594,13 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return isUseUserCRPref();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -655,11 +625,11 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
case USE_USER_CRPREF:
return isSetUseUserCRPref();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof UserConfigurationDataModel)
@@ -670,6 +640,8 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
public boolean equals(UserConfigurationDataModel that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_airavataAutoSchedule = true;
boolean that_present_airavataAutoSchedule = true;
@@ -766,59 +738,45 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_airavataAutoSchedule = true;
- list.add(present_airavataAutoSchedule);
- if (present_airavataAutoSchedule)
- list.add(airavataAutoSchedule);
+ hashCode = hashCode * 8191 + ((airavataAutoSchedule) ? 131071 : 524287);
- boolean present_overrideManualScheduledParams = true;
- list.add(present_overrideManualScheduledParams);
- if (present_overrideManualScheduledParams)
- list.add(overrideManualScheduledParams);
+ hashCode = hashCode * 8191 + ((overrideManualScheduledParams) ? 131071 : 524287);
- boolean present_shareExperimentPublicly = true && (isSetShareExperimentPublicly());
- list.add(present_shareExperimentPublicly);
- if (present_shareExperimentPublicly)
- list.add(shareExperimentPublicly);
+ hashCode = hashCode * 8191 + ((isSetShareExperimentPublicly()) ? 131071 : 524287);
+ if (isSetShareExperimentPublicly())
+ hashCode = hashCode * 8191 + ((shareExperimentPublicly) ? 131071 : 524287);
- boolean present_computationalResourceScheduling = true && (isSetComputationalResourceScheduling());
- list.add(present_computationalResourceScheduling);
- if (present_computationalResourceScheduling)
- list.add(computationalResourceScheduling);
+ hashCode = hashCode * 8191 + ((isSetComputationalResourceScheduling()) ? 131071 : 524287);
+ if (isSetComputationalResourceScheduling())
+ hashCode = hashCode * 8191 + computationalResourceScheduling.hashCode();
- boolean present_throttleResources = true && (isSetThrottleResources());
- list.add(present_throttleResources);
- if (present_throttleResources)
- list.add(throttleResources);
+ hashCode = hashCode * 8191 + ((isSetThrottleResources()) ? 131071 : 524287);
+ if (isSetThrottleResources())
+ hashCode = hashCode * 8191 + ((throttleResources) ? 131071 : 524287);
- boolean present_userDN = true && (isSetUserDN());
- list.add(present_userDN);
- if (present_userDN)
- list.add(userDN);
+ hashCode = hashCode * 8191 + ((isSetUserDN()) ? 131071 : 524287);
+ if (isSetUserDN())
+ hashCode = hashCode * 8191 + userDN.hashCode();
- boolean present_generateCert = true && (isSetGenerateCert());
- list.add(present_generateCert);
- if (present_generateCert)
- list.add(generateCert);
+ hashCode = hashCode * 8191 + ((isSetGenerateCert()) ? 131071 : 524287);
+ if (isSetGenerateCert())
+ hashCode = hashCode * 8191 + ((generateCert) ? 131071 : 524287);
- boolean present_storageId = true && (isSetStorageId());
- list.add(present_storageId);
- if (present_storageId)
- list.add(storageId);
+ hashCode = hashCode * 8191 + ((isSetStorageId()) ? 131071 : 524287);
+ if (isSetStorageId())
+ hashCode = hashCode * 8191 + storageId.hashCode();
- boolean present_experimentDataDir = true && (isSetExperimentDataDir());
- list.add(present_experimentDataDir);
- if (present_experimentDataDir)
- list.add(experimentDataDir);
+ hashCode = hashCode * 8191 + ((isSetExperimentDataDir()) ? 131071 : 524287);
+ if (isSetExperimentDataDir())
+ hashCode = hashCode * 8191 + experimentDataDir.hashCode();
- boolean present_useUserCRPref = true && (isSetUseUserCRPref());
- list.add(present_useUserCRPref);
- if (present_useUserCRPref)
- list.add(useUserCRPref);
+ hashCode = hashCode * 8191 + ((isSetUseUserCRPref()) ? 131071 : 524287);
+ if (isSetUseUserCRPref())
+ hashCode = hashCode * 8191 + ((useUserCRPref) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -829,7 +787,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAiravataAutoSchedule()).compareTo(other.isSetAiravataAutoSchedule());
+ lastComparison = java.lang.Boolean.valueOf(isSetAiravataAutoSchedule()).compareTo(other.isSetAiravataAutoSchedule());
if (lastComparison != 0) {
return lastComparison;
}
@@ -839,7 +797,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOverrideManualScheduledParams()).compareTo(other.isSetOverrideManualScheduledParams());
+ lastComparison = java.lang.Boolean.valueOf(isSetOverrideManualScheduledParams()).compareTo(other.isSetOverrideManualScheduledParams());
if (lastComparison != 0) {
return lastComparison;
}
@@ -849,7 +807,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetShareExperimentPublicly()).compareTo(other.isSetShareExperimentPublicly());
+ lastComparison = java.lang.Boolean.valueOf(isSetShareExperimentPublicly()).compareTo(other.isSetShareExperimentPublicly());
if (lastComparison != 0) {
return lastComparison;
}
@@ -859,7 +817,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetComputationalResourceScheduling()).compareTo(other.isSetComputationalResourceScheduling());
+ lastComparison = java.lang.Boolean.valueOf(isSetComputationalResourceScheduling()).compareTo(other.isSetComputationalResourceScheduling());
if (lastComparison != 0) {
return lastComparison;
}
@@ -869,7 +827,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetThrottleResources()).compareTo(other.isSetThrottleResources());
+ lastComparison = java.lang.Boolean.valueOf(isSetThrottleResources()).compareTo(other.isSetThrottleResources());
if (lastComparison != 0) {
return lastComparison;
}
@@ -879,7 +837,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUserDN()).compareTo(other.isSetUserDN());
+ lastComparison = java.lang.Boolean.valueOf(isSetUserDN()).compareTo(other.isSetUserDN());
if (lastComparison != 0) {
return lastComparison;
}
@@ -889,7 +847,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetGenerateCert()).compareTo(other.isSetGenerateCert());
+ lastComparison = java.lang.Boolean.valueOf(isSetGenerateCert()).compareTo(other.isSetGenerateCert());
if (lastComparison != 0) {
return lastComparison;
}
@@ -899,7 +857,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStorageId()).compareTo(other.isSetStorageId());
+ lastComparison = java.lang.Boolean.valueOf(isSetStorageId()).compareTo(other.isSetStorageId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -909,7 +867,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExperimentDataDir()).compareTo(other.isSetExperimentDataDir());
+ lastComparison = java.lang.Boolean.valueOf(isSetExperimentDataDir()).compareTo(other.isSetExperimentDataDir());
if (lastComparison != 0) {
return lastComparison;
}
@@ -919,7 +877,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUseUserCRPref()).compareTo(other.isSetUseUserCRPref());
+ lastComparison = java.lang.Boolean.valueOf(isSetUseUserCRPref()).compareTo(other.isSetUseUserCRPref());
if (lastComparison != 0) {
return lastComparison;
}
@@ -937,16 +895,16 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("UserConfigurationDataModel(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("UserConfigurationDataModel(");
boolean first = true;
sb.append("airavataAutoSchedule:");
@@ -1048,7 +1006,7 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1058,13 +1016,13 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
}
- private static class UserConfigurationDataModelStandardSchemeFactory implements SchemeFactory {
+ private static class UserConfigurationDataModelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UserConfigurationDataModelStandardScheme getScheme() {
return new UserConfigurationDataModelStandardScheme();
}
}
- private static class UserConfigurationDataModelStandardScheme extends StandardScheme<UserConfigurationDataModel> {
+ private static class UserConfigurationDataModelStandardScheme extends org.apache.thrift.scheme.StandardScheme<UserConfigurationDataModel> {
public void read(org.apache.thrift.protocol.TProtocol iprot, UserConfigurationDataModel struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1230,20 +1188,20 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
- private static class UserConfigurationDataModelTupleSchemeFactory implements SchemeFactory {
+ private static class UserConfigurationDataModelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UserConfigurationDataModelTupleScheme getScheme() {
return new UserConfigurationDataModelTupleScheme();
}
}
- private static class UserConfigurationDataModelTupleScheme extends TupleScheme<UserConfigurationDataModel> {
+ private static class UserConfigurationDataModelTupleScheme extends org.apache.thrift.scheme.TupleScheme<UserConfigurationDataModel> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, UserConfigurationDataModel struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBool(struct.airavataAutoSchedule);
oprot.writeBool(struct.overrideManualScheduledParams);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetShareExperimentPublicly()) {
optionals.set(0);
}
@@ -1297,12 +1255,12 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, UserConfigurationDataModel struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.airavataAutoSchedule = iprot.readBool();
struct.setAiravataAutoScheduleIsSet(true);
struct.overrideManualScheduledParams = iprot.readBool();
struct.setOverrideManualScheduledParamsIsSet(true);
- BitSet incoming = iprot.readBitSet(8);
+ java.util.BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.shareExperimentPublicly = iprot.readBool();
struct.setShareExperimentPubliclyIsSet(true);
@@ -1339,5 +1297,8 @@ public class UserConfigurationDataModel implements org.apache.thrift.TBase<UserC
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e775660/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java
index 4db9ae4..369efa6 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/GroupModel.java
@@ -16,42 +16,15 @@
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.model.group;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupModel._Fields>, java.io.Serializable, Cloneable, Comparable<GroupModel> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupModel");
@@ -61,17 +34,14 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
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)4);
private static final org.apache.thrift.protocol.TField MEMBERS_FIELD_DESC = new org.apache.thrift.protocol.TField("members", org.apache.thrift.protocol.TType.LIST, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new GroupModelStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GroupModelTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GroupModelStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GroupModelTupleSchemeFactory();
- private String id; // optional
- private String name; // optional
- private String ownerId; // optional
- private String description; // optional
- private List<String> members; // optional
+ private java.lang.String id; // optional
+ private java.lang.String name; // optional
+ private java.lang.String ownerId; // optional
+ private java.lang.String description; // optional
+ private java.util.List<java.lang.String> members; // 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 {
@@ -81,10 +51,10 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
DESCRIPTION((short)4, "description"),
MEMBERS((short)5, "members");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -115,21 +85,21 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -138,16 +108,16 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.ID,_Fields.NAME,_Fields.OWNER_ID,_Fields.DESCRIPTION,_Fields.MEMBERS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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.OPTIONAL,
@@ -159,7 +129,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
tmpMap.put(_Fields.MEMBERS, new org.apache.thrift.meta_data.FieldMetaData("members", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GroupModel.class, metaDataMap);
}
@@ -183,7 +153,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
this.description = other.description;
}
if (other.isSetMembers()) {
- List<String> __this__members = new ArrayList<String>(other.members);
+ java.util.List<java.lang.String> __this__members = new java.util.ArrayList<java.lang.String>(other.members);
this.members = __this__members;
}
}
@@ -201,11 +171,11 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
this.members = null;
}
- public String getId() {
+ public java.lang.String getId() {
return this.id;
}
- public void setId(String id) {
+ public void setId(java.lang.String id) {
this.id = id;
}
@@ -224,11 +194,11 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
}
}
- public String getName() {
+ public java.lang.String getName() {
return this.name;
}
- public void setName(String name) {
+ public void setName(java.lang.String name) {
this.name = name;
}
@@ -247,11 +217,11 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
}
}
- public String getOwnerId() {
+ public java.lang.String getOwnerId() {
return this.ownerId;
}
- public void setOwnerId(String ownerId) {
+ public void setOwnerId(java.lang.String ownerId) {
this.ownerId = ownerId;
}
@@ -270,11 +240,11 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
}
}
- public String getDescription() {
+ public java.lang.String getDescription() {
return this.description;
}
- public void setDescription(String description) {
+ public void setDescription(java.lang.String description) {
this.description = description;
}
@@ -297,22 +267,22 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
return (this.members == null) ? 0 : this.members.size();
}
- public java.util.Iterator<String> getMembersIterator() {
+ public java.util.Iterator<java.lang.String> getMembersIterator() {
return (this.members == null) ? null : this.members.iterator();
}
- public void addToMembers(String elem) {
+ public void addToMembers(java.lang.String elem) {
if (this.members == null) {
- this.members = new ArrayList<String>();
+ this.members = new java.util.ArrayList<java.lang.String>();
}
this.members.add(elem);
}
- public List<String> getMembers() {
+ public java.util.List<java.lang.String> getMembers() {
return this.members;
}
- public void setMembers(List<String> members) {
+ public void setMembers(java.util.List<java.lang.String> members) {
this.members = members;
}
@@ -331,13 +301,13 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ID:
if (value == null) {
unsetId();
} else {
- setId((String)value);
+ setId((java.lang.String)value);
}
break;
@@ -345,7 +315,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
if (value == null) {
unsetName();
} else {
- setName((String)value);
+ setName((java.lang.String)value);
}
break;
@@ -353,7 +323,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
if (value == null) {
unsetOwnerId();
} else {
- setOwnerId((String)value);
+ setOwnerId((java.lang.String)value);
}
break;
@@ -361,7 +331,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
if (value == null) {
unsetDescription();
} else {
- setDescription((String)value);
+ setDescription((java.lang.String)value);
}
break;
@@ -369,14 +339,14 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
if (value == null) {
unsetMembers();
} else {
- setMembers((List<String>)value);
+ setMembers((java.util.List<java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ID:
return getId();
@@ -394,13 +364,13 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
return getMembers();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -415,11 +385,11 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
case MEMBERS:
return isSetMembers();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof GroupModel)
@@ -430,6 +400,8 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
public boolean equals(GroupModel that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_id = true && this.isSetId();
boolean that_present_id = true && that.isSetId();
@@ -481,34 +453,29 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_id = true && (isSetId());
- list.add(present_id);
- if (present_id)
- list.add(id);
+ hashCode = hashCode * 8191 + ((isSetId()) ? 131071 : 524287);
+ if (isSetId())
+ hashCode = hashCode * 8191 + id.hashCode();
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
+ hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
+ if (isSetName())
+ hashCode = hashCode * 8191 + name.hashCode();
- boolean present_ownerId = true && (isSetOwnerId());
- list.add(present_ownerId);
- if (present_ownerId)
- list.add(ownerId);
+ hashCode = hashCode * 8191 + ((isSetOwnerId()) ? 131071 : 524287);
+ if (isSetOwnerId())
+ hashCode = hashCode * 8191 + ownerId.hashCode();
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
+ hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
+ if (isSetDescription())
+ hashCode = hashCode * 8191 + description.hashCode();
- boolean present_members = true && (isSetMembers());
- list.add(present_members);
- if (present_members)
- list.add(members);
+ hashCode = hashCode * 8191 + ((isSetMembers()) ? 131071 : 524287);
+ if (isSetMembers())
+ hashCode = hashCode * 8191 + members.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -519,7 +486,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
+ lastComparison = java.lang.Boolean.valueOf(isSetId()).compareTo(other.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -529,7 +496,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -539,7 +506,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ lastComparison = java.lang.Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -549,7 +516,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ lastComparison = java.lang.Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -559,7 +526,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMembers()).compareTo(other.isSetMembers());
+ lastComparison = java.lang.Boolean.valueOf(isSetMembers()).compareTo(other.isSetMembers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -577,16 +544,16 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("GroupModel(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("GroupModel(");
boolean first = true;
if (isSetId()) {
@@ -655,7 +622,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -663,13 +630,13 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
}
}
- private static class GroupModelStandardSchemeFactory implements SchemeFactory {
+ private static class GroupModelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupModelStandardScheme getScheme() {
return new GroupModelStandardScheme();
}
}
- private static class GroupModelStandardScheme extends StandardScheme<GroupModel> {
+ private static class GroupModelStandardScheme extends org.apache.thrift.scheme.StandardScheme<GroupModel> {
public void read(org.apache.thrift.protocol.TProtocol iprot, GroupModel struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -717,8 +684,8 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.members = new ArrayList<String>(_list0.size);
- String _elem1;
+ struct.members = new java.util.ArrayList<java.lang.String>(_list0.size);
+ java.lang.String _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readString();
@@ -777,7 +744,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
oprot.writeFieldBegin(MEMBERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.members.size()));
- for (String _iter3 : struct.members)
+ for (java.lang.String _iter3 : struct.members)
{
oprot.writeString(_iter3);
}
@@ -792,18 +759,18 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
}
- private static class GroupModelTupleSchemeFactory implements SchemeFactory {
+ private static class GroupModelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupModelTupleScheme getScheme() {
return new GroupModelTupleScheme();
}
}
- private static class GroupModelTupleScheme extends TupleScheme<GroupModel> {
+ private static class GroupModelTupleScheme extends org.apache.thrift.scheme.TupleScheme<GroupModel> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GroupModel struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetId()) {
optionals.set(0);
}
@@ -835,7 +802,7 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
if (struct.isSetMembers()) {
{
oprot.writeI32(struct.members.size());
- for (String _iter4 : struct.members)
+ for (java.lang.String _iter4 : struct.members)
{
oprot.writeString(_iter4);
}
@@ -845,8 +812,8 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GroupModel struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.id = iprot.readString();
struct.setIdIsSet(true);
@@ -866,8 +833,8 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.members = new ArrayList<String>(_list5.size);
- String _elem6;
+ struct.members = new java.util.ArrayList<java.lang.String>(_list5.size);
+ java.lang.String _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = iprot.readString();
@@ -879,5 +846,8 @@ public class GroupModel implements org.apache.thrift.TBase<GroupModel, GroupMode
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e775660/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourcePermissionType.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourcePermissionType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourcePermissionType.java
index 558ed59..17fecdf 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourcePermissionType.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourcePermissionType.java
@@ -16,7 +16,7 @@
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/airavata/blob/8e775660/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourceType.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourceType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourceType.java
index e9b034a..7817ede 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourceType.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/group/ResourceType.java
@@ -16,7 +16,7 @@
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated