airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata git commit: adding owner id for entity search fields
Date Tue, 18 Oct 2016 20:20:07 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 1fcf8c2e8 -> afb9c6cac


adding owner id for entity search fields


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/afb9c6ca
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/afb9c6ca
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/afb9c6ca

Branch: refs/heads/develop
Commit: afb9c6cacf3584da8ee49efae2300e9dffcbda72
Parents: 1fcf8c2
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Tue Oct 18 16:20:02 2016 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Tue Oct 18 16:20:02 2016 -0400

----------------------------------------------------------------------
 .../db/repositories/EntityRepository.java       |  2 ++
 .../sharing/registry/models/Domain.java         | 25 ++++----------------
 .../registry/models/EntitySearchField.java      | 18 +++++++-------
 .../api-docs/sharing_models.html                |  9 ++++---
 .../thrift_models/sharing_models.thrift         |  2 ++
 5 files changed, 23 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/afb9c6ca/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 46a7cd0..0fb8b78 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
@@ -85,6 +85,8 @@ public class EntityRepository extends AbstractRepository<Entity, EntityEntity,
E
                 }
             }else if(searchCriteria.getSearchField().equals(EntitySearchField.PARRENT_ENTITY_ID)){
                 query += "E.PARENT_ENTITY_ID = '" + searchCriteria.getValue() + "' AND ";
+            }else if(searchCriteria.getSearchField().equals(EntitySearchField.OWNER_ID)){
+                query += "E.OWNER_ID = '" + searchCriteria.getValue() + "' AND ";
             }else if(searchCriteria.getSearchField().equals(EntitySearchField.CREATED_TIME)){
                 if(searchCriteria.getSearchCondition().equals(SearchCondition.GTE)){
                     query += "E.CREATED_TIME >= " + Integer.parseInt(searchCriteria.getValue().trim())
+ " AND ";

http://git-wip-us.apache.org/repos/asf/airavata/blob/afb9c6ca/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
index a0e89a5..1bcefc7 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/Domain.java
@@ -6,32 +6,15 @@
  */
 package org.apache.airavata.sharing.registry.models;
 
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
-
 import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.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;
+import java.util.*;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**

http://git-wip-us.apache.org/repos/asf/airavata/blob/afb9c6ca/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
----------------------------------------------------------------------
diff --git a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
index 4d322f2..581efc3 100644
--- a/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
+++ b/modules/sharing-registry/sharing-registry-stubs/src/main/java/org/apache/airavata/sharing/registry/models/EntitySearchField.java
@@ -7,16 +7,13 @@
 package org.apache.airavata.sharing.registry.models;
 
 
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
 /**
  * <p>This list of fields that can be used to search entities</p>
  * <li>NAME : Name of the entity</li>
  * <li>DESCRIPTION : Description of the entity</li>
  * <li>FULL_TEXT : Full text field of the entity</li>
  * <li>PARENT_ENTITY_ID : Parent entity id of the entity</li>
+ * <li>OWNER_ID : Owner of the entity</li>
  * <li>CREATED_TIME : Created time of the entity</li>
  * <li>UPDATED_TIME : Updated time of the entity</li>
  * 
@@ -26,9 +23,10 @@ public enum EntitySearchField implements org.apache.thrift.TEnum {
   DESCRIPTION(1),
   FULL_TEXT(2),
   PARRENT_ENTITY_ID(3),
-  PERMISSION_TYPE_ID(4),
-  CREATED_TIME(5),
-  UPDATED_TIME(6);
+  OWNER_ID(4),
+  PERMISSION_TYPE_ID(5),
+  CREATED_TIME(6),
+  UPDATED_TIME(7);
 
   private final int value;
 
@@ -58,10 +56,12 @@ public enum EntitySearchField implements org.apache.thrift.TEnum {
       case 3:
         return PARRENT_ENTITY_ID;
       case 4:
-        return PERMISSION_TYPE_ID;
+        return OWNER_ID;
       case 5:
-        return CREATED_TIME;
+        return PERMISSION_TYPE_ID;
       case 6:
+        return CREATED_TIME;
+      case 7:
         return UPDATED_TIME;
       default:
         return null;

http://git-wip-us.apache.org/repos/asf/airavata/blob/afb9c6ca/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 80384c8..2bd64ee 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
@@ -67,6 +67,7 @@ considered as a group in it's own right for implementation ease</p>
 <li>DESCRIPTION : Description of the entity</li>
 <li>FULL_TEXT : Full text field of the entity</li>
 <li>PARENT_ENTITY_ID : Parent entity id of the entity</li>
+<li>OWNER_ID : Owner of the entity</li>
 <li>CREATED_TIME : Created time of the entity</li>
 <li>UPDATED_TIME : Updated time of the entity</li>
 
@@ -79,11 +80,13 @@ considered as a group in it's own right for implementation ease</p>
 </td></tr>
 <tr><td><code>PARRENT_ENTITY_ID</code></td><td><code>3</code></td><td>
 </td></tr>
-<tr><td><code>PERMISSION_TYPE_ID</code></td><td><code>4</code></td><td>
+<tr><td><code>OWNER_ID</code></td><td><code>4</code></td><td>
 </td></tr>
-<tr><td><code>CREATED_TIME</code></td><td><code>5</code></td><td>
+<tr><td><code>PERMISSION_TYPE_ID</code></td><td><code>5</code></td><td>
 </td></tr>
-<tr><td><code>UPDATED_TIME</code></td><td><code>6</code></td><td>
+<tr><td><code>CREATED_TIME</code></td><td><code>6</code></td><td>
+</td></tr>
+<tr><td><code>UPDATED_TIME</code></td><td><code>7</code></td><td>
 </td></tr>
 </table></div>
 <div class="definition"><h3 id="Enum_SearchCondition">Enumeration: SearchCondition</h3>

http://git-wip-us.apache.org/repos/asf/airavata/blob/afb9c6ca/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 e34dc93..3216208 100644
--- a/modules/sharing-registry/thrift_models/sharing_models.thrift
+++ b/modules/sharing-registry/thrift_models/sharing_models.thrift
@@ -151,6 +151,7 @@ struct EntityType {
 * <li>DESCRIPTION : Description of the entity</li>
 * <li>FULL_TEXT : Full text field of the entity</li>
 * <li>PARENT_ENTITY_ID : Parent entity id of the entity</li>
+* <li>OWNER_ID : Owner of the entity</li>
 * <li>CREATED_TIME : Created time of the entity</li>
 * <li>UPDATED_TIME : Updated time of the entity</li>
 **/
@@ -159,6 +160,7 @@ enum EntitySearchField {
     DESCRIPTION,
     FULL_TEXT,
     PARRENT_ENTITY_ID,
+    OWNER_ID,
     PERMISSION_TYPE_ID,
     CREATED_TIME,
     UPDATED_TIME


Mime
View raw message