Repository: airavata Updated Branches: refs/heads/develop 668b54daa -> 9d4194497
setting shared count as long Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/bfc3a84c Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/bfc3a84c Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/bfc3a84c Branch: refs/heads/develop Commit: bfc3a84c745eefce1e89290e7319210b549de3b2 Parents: 668b54d Author: scnakandala <[email protected]> Authored: Thu Mar 23 16:58:05 2017 -0400 Committer: scnakandala <[email protected]> Committed: Thu Mar 23 16:58:05 2017 -0400 ---------------------------------------------------------------------- .../db/repositories/EntityRepository.java | 2 +- .../sharing/registry/models/Entity.java | 30 +++++++++----------- .../api-docs/sharing_models.html | 2 +- .../thrift_models/sharing_models.thrift | 2 +- 4 files changed, 17 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/bfc3a84c/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java index 15ac97a..6a1faf2 100644 --- a/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java +++ b/modules/sharing-registry/sharing-registry-server/src/main/java/org/apache/airavata/sharing/registry/db/repositories/EntityRepository.java @@ -151,7 +151,7 @@ public class EntityRepository extends AbstractRepository<Entity, EntityEntity, E entity.setDescription((String)(rs[6])); entity.setBinaryData((byte[]) (rs[7])); entity.setFullText((String) (rs[8])); - entity.setSharedCount((int) rs[9]); + entity.setSharedCount((long) rs[9]); entity.setOriginalEntityCreationTime((long) (rs[10])); entity.setCreatedTime((long) (rs[11])); entity.setUpdatedTime((long) (rs[12])); http://git-wip-us.apache.org/repos/asf/airavata/blob/bfc3a84c/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java index 4dd9aa2..a937c09 100644 --- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java +++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Entity.java @@ -17,7 +17,6 @@ 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; @@ -31,7 +30,6 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import javax.annotation.Generated; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -53,7 +51,7 @@ import org.slf4j.LoggerFactory; * <li>updatedTime : Will be set by the system</li> * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-03-23") public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, java.io.Serializable, Cloneable, Comparable<Entity> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Entity"); @@ -66,7 +64,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)7); private static final org.apache.thrift.protocol.TField BINARY_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryData", org.apache.thrift.protocol.TType.STRING, (short)8); private static final org.apache.thrift.protocol.TField FULL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("fullText", org.apache.thrift.protocol.TType.STRING, (short)9); - private static final org.apache.thrift.protocol.TField SHARED_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedCount", org.apache.thrift.protocol.TType.I32, (short) 10); + private static final org.apache.thrift.protocol.TField SHARED_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("sharedCount", org.apache.thrift.protocol.TType.I64, (short) 10); private static final org.apache.thrift.protocol.TField ORIGINAL_ENTITY_CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("originalEntityCreationTime", org.apache.thrift.protocol.TType.I64, (short) 11); private static final org.apache.thrift.protocol.TField CREATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTime", org.apache.thrift.protocol.TType.I64, (short)12); private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)13); @@ -86,7 +84,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, public String description; // optional public ByteBuffer binaryData; // optional public String fullText; // optional - public int sharedCount; // optional + public long sharedCount; // optional public long originalEntityCreationTime; // optional public long createdTime; // optional public long updatedTime; // optional @@ -214,7 +212,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, tmpMap.put(_Fields.FULL_TEXT, new org.apache.thrift.meta_data.FieldMetaData("fullText", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SHARED_COUNT, new org.apache.thrift.meta_data.FieldMetaData("sharedCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.ORIGINAL_ENTITY_CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("originalEntityCreationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CREATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("createdTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -226,7 +224,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, } public Entity() { - this.sharedCount = 0; + this.sharedCount = 0L; } @@ -283,7 +281,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, this.description = null; this.binaryData = null; this.fullText = null; - this.sharedCount = 0; + this.sharedCount = 0L; setOriginalEntityCreationTimeIsSet(false); this.originalEntityCreationTime = 0; @@ -519,11 +517,11 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, } } - public int getSharedCount() { + public long getSharedCount() { return this.sharedCount; } - public Entity setSharedCount(int sharedCount) { + public Entity setSharedCount(long sharedCount) { this.sharedCount = sharedCount; setSharedCountIsSet(true); return this; @@ -691,7 +689,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, if (value == null) { unsetSharedCount(); } else { - setSharedCount((Integer)value); + setSharedCount((Long)value); } break; @@ -1398,8 +1396,8 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, } break; case 10: // SHARED_COUNT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.sharedCount = iprot.readI32(); + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.sharedCount = iprot.readI64(); struct.setSharedCountIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -1509,7 +1507,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, } if (struct.isSetSharedCount()) { oprot.writeFieldBegin(SHARED_COUNT_FIELD_DESC); - oprot.writeI32(struct.sharedCount); + oprot.writeI64(struct.sharedCount); oprot.writeFieldEnd(); } if (struct.isSetOriginalEntityCreationTime()) { @@ -1613,7 +1611,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, oprot.writeString(struct.fullText); } if (struct.isSetSharedCount()) { - oprot.writeI32(struct.sharedCount); + oprot.writeI64(struct.sharedCount); } if (struct.isSetOriginalEntityCreationTime()) { oprot.writeI64(struct.originalEntityCreationTime); @@ -1667,7 +1665,7 @@ public class Entity implements org.apache.thrift.TBase<Entity, Entity._Fields>, struct.setFullTextIsSet(true); } if (incoming.get(9)) { - struct.sharedCount = iprot.readI32(); + struct.sharedCount = iprot.readI64(); struct.setSharedCountIsSet(true); } if (incoming.get(10)) { http://git-wip-us.apache.org/repos/asf/airavata/blob/bfc3a84c/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html index 3937299..b7e0c46 100644 --- a/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html +++ b/modules/sharing-registry/sharing-service-docs/api-docs/sharing_models.html @@ -251,7 +251,7 @@ regarding the user.</p> <tr> <td>10</td> <td>sharedCount</td> - <td><code>i32</code></td> + <td><code>i64</code></td> <td></td> <td>optional</td> <td><code>0</code></td> http://git-wip-us.apache.org/repos/asf/airavata/blob/bfc3a84c/modules/sharing-registry/thrift_models/sharing_models.thrift ---------------------------------------------------------------------- diff --git a/modules/sharing-registry/thrift_models/sharing_models.thrift b/modules/sharing-registry/thrift_models/sharing_models.thrift index 50518e1..25c6ea9 100644 --- a/modules/sharing-registry/thrift_models/sharing_models.thrift +++ b/modules/sharing-registry/thrift_models/sharing_models.thrift @@ -224,7 +224,7 @@ struct Entity { 7: optional string description, 8: optional binary binaryData, 9: optional string fullText, - 10: optional i32 sharedCount = 0, + 10: optional i64 sharedCount = 0, 11: optional i64 originalEntityCreationTime, 12: optional i64 createdTime, 13: optional i64 updatedTime
