Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 560AC200CF2 for ; Tue, 8 Aug 2017 20:48:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 54AC9167C57; Tue, 8 Aug 2017 18:48:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1ED4D167C53 for ; Tue, 8 Aug 2017 20:48:01 +0200 (CEST) Received: (qmail 28525 invoked by uid 500); 8 Aug 2017 18:48:01 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 28345 invoked by uid 99); 8 Aug 2017 18:48:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2017 18:48:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 39DF5F69AE; Tue, 8 Aug 2017 18:48:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: machristie@apache.org To: commits@airavata.apache.org Date: Tue, 08 Aug 2017 18:48:08 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [09/51] [abbrv] [partial] airavata git commit: AIRAVATA-2505 Upgrade Airavata to Thrift 0.10.0 archived-at: Tue, 08 Aug 2017 18:48:04 -0000 http://git-wip-us.apache.org/repos/asf/airavata/blob/8e775660/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataProductModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataProductModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataProductModel.java index 931e94c..ec1c1bb 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataProductModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataProductModel.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.data.replica; -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 DataProductModel implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataProductModel"); @@ -68,24 +41,21 @@ public class DataProductModel implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DataProductModelStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DataProductModelTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DataProductModelStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DataProductModelTupleSchemeFactory(); - private String productUri; // optional - private String gatewayId; // optional - private String parentProductUri; // optional - private String productName; // optional - private String productDescription; // optional - private String ownerName; // optional + private java.lang.String productUri; // optional + private java.lang.String gatewayId; // optional + private java.lang.String parentProductUri; // optional + private java.lang.String productName; // optional + private java.lang.String productDescription; // optional + private java.lang.String ownerName; // optional private DataProductType dataProductType; // optional private int productSize; // optional private long creationTime; // optional private long lastModifiedTime; // optional - private Map productMetadata; // optional - private List replicaLocations; // optional + private java.util.Map productMetadata; // optional + private java.util.List replicaLocations; // 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 { @@ -106,10 +76,10 @@ public class DataProductModel implements org.apache.thrift.TBase byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -154,21 +124,21 @@ public class DataProductModel implements org.apache.thrift.TBase 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.PRODUCT_URI, new org.apache.thrift.meta_data.FieldMetaData("productUri", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -218,7 +188,7 @@ public class DataProductModel implements org.apache.thrift.TBase __this__productMetadata = new HashMap(other.productMetadata); + java.util.Map __this__productMetadata = new java.util.HashMap(other.productMetadata); this.productMetadata = __this__productMetadata; } if (other.isSetReplicaLocations()) { - List __this__replicaLocations = new ArrayList(other.replicaLocations.size()); + java.util.List __this__replicaLocations = new java.util.ArrayList(other.replicaLocations.size()); for (DataReplicaLocationModel other_element : other.replicaLocations) { __this__replicaLocations.add(new DataReplicaLocationModel(other_element)); } @@ -290,11 +260,11 @@ public class DataProductModel implements org.apache.thrift.TBase(); + this.productMetadata = new java.util.HashMap(); } this.productMetadata.put(key, val); } - public Map getProductMetadata() { + public java.util.Map getProductMetadata() { return this.productMetadata; } - public void setProductMetadata(Map productMetadata) { + public void setProductMetadata(java.util.Map productMetadata) { this.productMetadata = productMetadata; } @@ -569,16 +539,16 @@ public class DataProductModel implements org.apache.thrift.TBase(); + this.replicaLocations = new java.util.ArrayList(); } this.replicaLocations.add(elem); } - public List getReplicaLocations() { + public java.util.List getReplicaLocations() { return this.replicaLocations; } - public void setReplicaLocations(List replicaLocations) { + public void setReplicaLocations(java.util.List replicaLocations) { this.replicaLocations = replicaLocations; } @@ -597,13 +567,13 @@ public class DataProductModel implements org.apache.thrift.TBase)value); + setProductMetadata((java.util.Map)value); } break; @@ -691,14 +661,14 @@ public class DataProductModel implements org.apache.thrift.TBase)value); + setReplicaLocations((java.util.List)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PRODUCT_URI: return getProductUri(); @@ -737,13 +707,13 @@ public class DataProductModel implements org.apache.thrift.TBase list = new ArrayList(); - - boolean present_productUri = true && (isSetProductUri()); - list.add(present_productUri); - if (present_productUri) - list.add(productUri); - - boolean present_gatewayId = true && (isSetGatewayId()); - list.add(present_gatewayId); - if (present_gatewayId) - list.add(gatewayId); - - boolean present_parentProductUri = true && (isSetParentProductUri()); - list.add(present_parentProductUri); - if (present_parentProductUri) - list.add(parentProductUri); - - boolean present_productName = true && (isSetProductName()); - list.add(present_productName); - if (present_productName) - list.add(productName); - - boolean present_productDescription = true && (isSetProductDescription()); - list.add(present_productDescription); - if (present_productDescription) - list.add(productDescription); - - boolean present_ownerName = true && (isSetOwnerName()); - list.add(present_ownerName); - if (present_ownerName) - list.add(ownerName); - - boolean present_dataProductType = true && (isSetDataProductType()); - list.add(present_dataProductType); - if (present_dataProductType) - list.add(dataProductType.getValue()); - - boolean present_productSize = true && (isSetProductSize()); - list.add(present_productSize); - if (present_productSize) - list.add(productSize); - - boolean present_creationTime = true && (isSetCreationTime()); - list.add(present_creationTime); - if (present_creationTime) - list.add(creationTime); - - boolean present_lastModifiedTime = true && (isSetLastModifiedTime()); - list.add(present_lastModifiedTime); - if (present_lastModifiedTime) - list.add(lastModifiedTime); - - boolean present_productMetadata = true && (isSetProductMetadata()); - list.add(present_productMetadata); - if (present_productMetadata) - list.add(productMetadata); - - boolean present_replicaLocations = true && (isSetReplicaLocations()); - list.add(present_replicaLocations); - if (present_replicaLocations) - list.add(replicaLocations); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetProductUri()) ? 131071 : 524287); + if (isSetProductUri()) + hashCode = hashCode * 8191 + productUri.hashCode(); + + hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287); + if (isSetGatewayId()) + hashCode = hashCode * 8191 + gatewayId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetParentProductUri()) ? 131071 : 524287); + if (isSetParentProductUri()) + hashCode = hashCode * 8191 + parentProductUri.hashCode(); + + hashCode = hashCode * 8191 + ((isSetProductName()) ? 131071 : 524287); + if (isSetProductName()) + hashCode = hashCode * 8191 + productName.hashCode(); + + hashCode = hashCode * 8191 + ((isSetProductDescription()) ? 131071 : 524287); + if (isSetProductDescription()) + hashCode = hashCode * 8191 + productDescription.hashCode(); + + hashCode = hashCode * 8191 + ((isSetOwnerName()) ? 131071 : 524287); + if (isSetOwnerName()) + hashCode = hashCode * 8191 + ownerName.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDataProductType()) ? 131071 : 524287); + if (isSetDataProductType()) + hashCode = hashCode * 8191 + dataProductType.getValue(); + + hashCode = hashCode * 8191 + ((isSetProductSize()) ? 131071 : 524287); + if (isSetProductSize()) + hashCode = hashCode * 8191 + productSize; + + hashCode = hashCode * 8191 + ((isSetCreationTime()) ? 131071 : 524287); + if (isSetCreationTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creationTime); + + hashCode = hashCode * 8191 + ((isSetLastModifiedTime()) ? 131071 : 524287); + if (isSetLastModifiedTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lastModifiedTime); + + hashCode = hashCode * 8191 + ((isSetProductMetadata()) ? 131071 : 524287); + if (isSetProductMetadata()) + hashCode = hashCode * 8191 + productMetadata.hashCode(); + + hashCode = hashCode * 8191 + ((isSetReplicaLocations()) ? 131071 : 524287); + if (isSetReplicaLocations()) + hashCode = hashCode * 8191 + replicaLocations.hashCode(); + + return hashCode; } @Override @@ -974,7 +934,7 @@ public class DataProductModel implements org.apache.thrift.TBase { + private static class DataProductModelStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, DataProductModel struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1350,9 +1310,9 @@ public class DataProductModel implements org.apache.thrift.TBase(2*_map10.size); - String _key11; - String _val12; + struct.productMetadata = new java.util.HashMap(2*_map10.size); + java.lang.String _key11; + java.lang.String _val12; for (int _i13 = 0; _i13 < _map10.size; ++_i13) { _key11 = iprot.readString(); @@ -1370,7 +1330,7 @@ public class DataProductModel implements org.apache.thrift.TBase(_list14.size); + struct.replicaLocations = new java.util.ArrayList(_list14.size); DataReplicaLocationModel _elem15; for (int _i16 = 0; _i16 < _list14.size; ++_i16) { @@ -1467,7 +1427,7 @@ public class DataProductModel implements org.apache.thrift.TBase _iter17 : struct.productMetadata.entrySet()) + for (java.util.Map.Entry _iter17 : struct.productMetadata.entrySet()) { oprot.writeString(_iter17.getKey()); oprot.writeString(_iter17.getValue()); @@ -1497,18 +1457,18 @@ public class DataProductModel implements org.apache.thrift.TBase { + private static class DataProductModelTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, DataProductModel 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.isSetProductUri()) { optionals.set(0); } @@ -1579,7 +1539,7 @@ public class DataProductModel implements org.apache.thrift.TBase _iter19 : struct.productMetadata.entrySet()) + for (java.util.Map.Entry _iter19 : struct.productMetadata.entrySet()) { oprot.writeString(_iter19.getKey()); oprot.writeString(_iter19.getValue()); @@ -1599,8 +1559,8 @@ public class DataProductModel implements org.apache.thrift.TBase(2*_map21.size); - String _key22; - String _val23; + struct.productMetadata = new java.util.HashMap(2*_map21.size); + java.lang.String _key22; + java.lang.String _val23; for (int _i24 = 0; _i24 < _map21.size; ++_i24) { _key22 = iprot.readString(); @@ -1659,7 +1619,7 @@ public class DataProductModel implements org.apache.thrift.TBase(_list25.size); + struct.replicaLocations = new java.util.ArrayList(_list25.size); DataReplicaLocationModel _elem26; for (int _i27 = 0; _i27 < _list25.size; ++_i27) { @@ -1673,5 +1633,8 @@ public class DataProductModel implements org.apache.thrift.TBase 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/data/replica/DataProductType.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataProductType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataProductType.java index db4895d..5de03d0 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataProductType.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataProductType.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/data/replica/DataReplicaLocationModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataReplicaLocationModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataReplicaLocationModel.java index 151f9c2..a2e763c 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataReplicaLocationModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/DataReplicaLocationModel.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.data.replica; -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 DataReplicaLocationModel implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataReplicaLocationModel"); @@ -68,24 +41,21 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DataReplicaLocationModelStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DataReplicaLocationModelTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DataReplicaLocationModelStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DataReplicaLocationModelTupleSchemeFactory(); - private String replicaId; // optional - private String productUri; // optional - private String replicaName; // optional - private String replicaDescription; // optional + private java.lang.String replicaId; // optional + private java.lang.String productUri; // optional + private java.lang.String replicaName; // optional + private java.lang.String replicaDescription; // optional private long creationTime; // optional private long lastModifiedTime; // optional private long validUntilTime; // optional private ReplicaLocationCategory replicaLocationCategory; // optional private ReplicaPersistentType replicaPersistentType; // optional - private String storageResourceId; // optional - private String filePath; // optional - private Map replicaMetadata; // optional + private java.lang.String storageResourceId; // optional + private java.lang.String filePath; // optional + private java.util.Map replicaMetadata; // 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 { @@ -110,10 +80,10 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -158,21 +128,21 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase 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.REPLICA_ID, new org.apache.thrift.meta_data.FieldMetaData("replicaId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PRODUCT_URI, new org.apache.thrift.meta_data.FieldMetaData("productUri", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -221,7 +191,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase __this__replicaMetadata = new HashMap(other.replicaMetadata); + java.util.Map __this__replicaMetadata = new java.util.HashMap(other.replicaMetadata); this.replicaMetadata = __this__replicaMetadata; } } @@ -289,11 +259,11 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase(); + this.replicaMetadata = new java.util.HashMap(); } this.replicaMetadata.put(key, val); } - public Map getReplicaMetadata() { + public java.util.Map getReplicaMetadata() { return this.replicaMetadata; } - public void setReplicaMetadata(Map replicaMetadata) { + public void setReplicaMetadata(java.util.Map replicaMetadata) { this.replicaMetadata = replicaMetadata; } @@ -589,13 +559,13 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase)value); + setReplicaMetadata((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case REPLICA_ID: return getReplicaId(); @@ -729,13 +699,13 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase list = new ArrayList(); - - boolean present_replicaId = true && (isSetReplicaId()); - list.add(present_replicaId); - if (present_replicaId) - list.add(replicaId); - - boolean present_productUri = true && (isSetProductUri()); - list.add(present_productUri); - if (present_productUri) - list.add(productUri); - - boolean present_replicaName = true && (isSetReplicaName()); - list.add(present_replicaName); - if (present_replicaName) - list.add(replicaName); - - boolean present_replicaDescription = true && (isSetReplicaDescription()); - list.add(present_replicaDescription); - if (present_replicaDescription) - list.add(replicaDescription); - - boolean present_creationTime = true && (isSetCreationTime()); - list.add(present_creationTime); - if (present_creationTime) - list.add(creationTime); - - boolean present_lastModifiedTime = true && (isSetLastModifiedTime()); - list.add(present_lastModifiedTime); - if (present_lastModifiedTime) - list.add(lastModifiedTime); - - boolean present_validUntilTime = true && (isSetValidUntilTime()); - list.add(present_validUntilTime); - if (present_validUntilTime) - list.add(validUntilTime); - - boolean present_replicaLocationCategory = true && (isSetReplicaLocationCategory()); - list.add(present_replicaLocationCategory); - if (present_replicaLocationCategory) - list.add(replicaLocationCategory.getValue()); - - boolean present_replicaPersistentType = true && (isSetReplicaPersistentType()); - list.add(present_replicaPersistentType); - if (present_replicaPersistentType) - list.add(replicaPersistentType.getValue()); - - boolean present_storageResourceId = true && (isSetStorageResourceId()); - list.add(present_storageResourceId); - if (present_storageResourceId) - list.add(storageResourceId); - - boolean present_filePath = true && (isSetFilePath()); - list.add(present_filePath); - if (present_filePath) - list.add(filePath); - - boolean present_replicaMetadata = true && (isSetReplicaMetadata()); - list.add(present_replicaMetadata); - if (present_replicaMetadata) - list.add(replicaMetadata); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetReplicaId()) ? 131071 : 524287); + if (isSetReplicaId()) + hashCode = hashCode * 8191 + replicaId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetProductUri()) ? 131071 : 524287); + if (isSetProductUri()) + hashCode = hashCode * 8191 + productUri.hashCode(); + + hashCode = hashCode * 8191 + ((isSetReplicaName()) ? 131071 : 524287); + if (isSetReplicaName()) + hashCode = hashCode * 8191 + replicaName.hashCode(); + + hashCode = hashCode * 8191 + ((isSetReplicaDescription()) ? 131071 : 524287); + if (isSetReplicaDescription()) + hashCode = hashCode * 8191 + replicaDescription.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCreationTime()) ? 131071 : 524287); + if (isSetCreationTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creationTime); + + hashCode = hashCode * 8191 + ((isSetLastModifiedTime()) ? 131071 : 524287); + if (isSetLastModifiedTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lastModifiedTime); + + hashCode = hashCode * 8191 + ((isSetValidUntilTime()) ? 131071 : 524287); + if (isSetValidUntilTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(validUntilTime); + + hashCode = hashCode * 8191 + ((isSetReplicaLocationCategory()) ? 131071 : 524287); + if (isSetReplicaLocationCategory()) + hashCode = hashCode * 8191 + replicaLocationCategory.getValue(); + + hashCode = hashCode * 8191 + ((isSetReplicaPersistentType()) ? 131071 : 524287); + if (isSetReplicaPersistentType()) + hashCode = hashCode * 8191 + replicaPersistentType.getValue(); + + hashCode = hashCode * 8191 + ((isSetStorageResourceId()) ? 131071 : 524287); + if (isSetStorageResourceId()) + hashCode = hashCode * 8191 + storageResourceId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetFilePath()) ? 131071 : 524287); + if (isSetFilePath()) + hashCode = hashCode * 8191 + filePath.hashCode(); + + hashCode = hashCode * 8191 + ((isSetReplicaMetadata()) ? 131071 : 524287); + if (isSetReplicaMetadata()) + hashCode = hashCode * 8191 + replicaMetadata.hashCode(); + + return hashCode; } @Override @@ -966,7 +926,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase { + private static class DataReplicaLocationModelStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, DataReplicaLocationModel struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1350,9 +1310,9 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase(2*_map0.size); - String _key1; - String _val2; + struct.replicaMetadata = new java.util.HashMap(2*_map0.size); + java.lang.String _key1; + java.lang.String _val2; for (int _i3 = 0; _i3 < _map0.size; ++_i3) { _key1 = iprot.readString(); @@ -1455,7 +1415,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase _iter4 : struct.replicaMetadata.entrySet()) + for (java.util.Map.Entry _iter4 : struct.replicaMetadata.entrySet()) { oprot.writeString(_iter4.getKey()); oprot.writeString(_iter4.getValue()); @@ -1471,18 +1431,18 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase { + private static class DataReplicaLocationModelTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, DataReplicaLocationModel 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.isSetReplicaId()) { optionals.set(0); } @@ -1556,7 +1516,7 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase _iter5 : struct.replicaMetadata.entrySet()) + for (java.util.Map.Entry _iter5 : struct.replicaMetadata.entrySet()) { oprot.writeString(_iter5.getKey()); oprot.writeString(_iter5.getValue()); @@ -1567,8 +1527,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase(2*_map6.size); - String _key7; - String _val8; + struct.replicaMetadata = new java.util.HashMap(2*_map6.size); + java.lang.String _key7; + java.lang.String _val8; for (int _i9 = 0; _i9 < _map6.size; ++_i9) { _key7 = iprot.readString(); @@ -1631,5 +1591,8 @@ public class DataReplicaLocationModel implements org.apache.thrift.TBase 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/data/replica/ReplicaLocationCategory.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/ReplicaLocationCategory.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/ReplicaLocationCategory.java index 6cf5a8e..b891ffe 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/ReplicaLocationCategory.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/ReplicaLocationCategory.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/data/replica/ReplicaPersistentType.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/ReplicaPersistentType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/ReplicaPersistentType.java index 518ca9f..705d024 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/ReplicaPersistentType.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/data/replica/ReplicaPersistentType.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/dbevent/CrudType.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/dbevent/CrudType.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/dbevent/CrudType.java index 23947b1..1500d20 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/dbevent/CrudType.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/dbevent/CrudType.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