atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject incubator-atlas git commit: ATLAS-1547: update setter name for rename of EntityMutationResponse.mutatedEntities
Date Wed, 15 Feb 2017 21:33:14 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 9b8a5ddcb -> c5ea4f0e1


ATLAS-1547: update setter name for rename of EntityMutationResponse.mutatedEntities


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

Branch: refs/heads/master
Commit: c5ea4f0e1aa96add052adb63d41fa8c3bf2a18ec
Parents: 9b8a5dd
Author: Madhan Neethiraj <madhan@apache.org>
Authored: Wed Feb 15 13:26:09 2017 -0800
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Wed Feb 15 13:26:09 2017 -0800

----------------------------------------------------------------------
 .../model/instance/EntityMutationResponse.java  | 64 +++++++++++---------
 1 file changed, 35 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/c5ea4f0e/intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java
b/intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java
index 74acfdc..45b12e3 100644
--- a/intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java
+++ b/intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java
@@ -44,48 +44,61 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @XmlAccessorType(XmlAccessType.PROPERTY)
 public class EntityMutationResponse {
 
-    Map<EntityMutations.EntityOperation, List<AtlasEntityHeader>> entitiesMutated;
-    Map<String,String> guidAssignments;
+    Map<EntityMutations.EntityOperation, List<AtlasEntityHeader>> mutatedEntities;
+    Map<String,String>                                            guidAssignments;
 
     public EntityMutationResponse() {
     }
 
-    public EntityMutationResponse(final Map<EntityMutations.EntityOperation, List<AtlasEntityHeader>>
opVsEntityMap) {
-        this.entitiesMutated = opVsEntityMap;
+    public EntityMutationResponse(final Map<EntityMutations.EntityOperation, List<AtlasEntityHeader>>
mutatedEntities) {
+        this.mutatedEntities = mutatedEntities;
     }
 
     public Map<EntityMutations.EntityOperation, List<AtlasEntityHeader>> getMutatedEntities()
{
-        return entitiesMutated;
+        return mutatedEntities;
     }
 
-    public void setEntitiesMutated(final Map<EntityMutations.EntityOperation, List<AtlasEntityHeader>>
opVsEntityMap) {
-        this.entitiesMutated = opVsEntityMap;
+    public void setMutatedEntities(final Map<EntityMutations.EntityOperation, List<AtlasEntityHeader>>
mutatedEntities) {
+        this.mutatedEntities = mutatedEntities;
     }
 
+    public void setGuidAssignments(Map<String,String> guidAssignments) {
+        this.guidAssignments = guidAssignments;
+    }
+
+    public Map<String,String> getGuidAssignments() {
+        return guidAssignments;
+    }
+
+
+    @JsonIgnore
     public List<AtlasEntityHeader> getEntitiesByOperation(EntityMutations.EntityOperation
op) {
-        if ( entitiesMutated != null) {
-            return entitiesMutated.get(op);
+        if ( mutatedEntities != null) {
+            return mutatedEntities.get(op);
         }
         return null;
     }
 
+    @JsonIgnore
     public List<AtlasEntityHeader> getCreatedEntities() {
-        if ( entitiesMutated != null) {
-            return entitiesMutated.get(EntityMutations.EntityOperation.CREATE);
+        if ( mutatedEntities != null) {
+            return mutatedEntities.get(EntityMutations.EntityOperation.CREATE);
         }
         return null;
     }
 
+    @JsonIgnore
     public List<AtlasEntityHeader> getUpdatedEntities() {
-        if ( entitiesMutated != null) {
-            return entitiesMutated.get(EntityMutations.EntityOperation.UPDATE);
+        if ( mutatedEntities != null) {
+            return mutatedEntities.get(EntityMutations.EntityOperation.UPDATE);
         }
         return null;
     }
 
+    @JsonIgnore
     public List<AtlasEntityHeader> getDeletedEntities() {
-        if ( entitiesMutated != null) {
-            return entitiesMutated.get(EntityMutations.EntityOperation.DELETE);
+        if ( mutatedEntities != null) {
+            return mutatedEntities.get(EntityMutations.EntityOperation.DELETE);
         }
         return null;
     }
@@ -151,15 +164,15 @@ public class EntityMutationResponse {
     }
 
     public void addEntity(EntityMutations.EntityOperation op, AtlasEntityHeader header) {
-        if (entitiesMutated == null) {
-            entitiesMutated = new HashMap<>();
+        if (mutatedEntities == null) {
+            mutatedEntities = new HashMap<>();
         }
 
-        List<AtlasEntityHeader> opEntities = entitiesMutated.get(op);
+        List<AtlasEntityHeader> opEntities = mutatedEntities.get(op);
 
         if (opEntities == null) {
             opEntities = new ArrayList<>();
-            entitiesMutated.put(op, opEntities);
+            mutatedEntities.put(op, opEntities);
         }
 
         opEntities.add(header);
@@ -171,7 +184,7 @@ public class EntityMutationResponse {
             sb = new StringBuilder();
         }
 
-        AtlasBaseTypeDef.dumpObjects(entitiesMutated, sb);
+        AtlasBaseTypeDef.dumpObjects(mutatedEntities, sb);
 
         return sb;
     }
@@ -181,13 +194,13 @@ public class EntityMutationResponse {
         if (this == o) return true;
         if (o == null || getClass() != o.getClass()) return false;
         EntityMutationResponse that = (EntityMutationResponse) o;
-        return Objects.equals(entitiesMutated, that.entitiesMutated) &&
+        return Objects.equals(mutatedEntities, that.mutatedEntities) &&
                Objects.equals(guidAssignments, that.guidAssignments);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(entitiesMutated, guidAssignments);
+        return Objects.hash(mutatedEntities, guidAssignments);
     }
 
     @Override
@@ -231,11 +244,4 @@ public class EntityMutationResponse {
         }
         return null;
     }
-    public void setGuidAssignments(Map<String,String> guidAssignments) {
-        this.guidAssignments = guidAssignments;
-    }
-
-    public Map<String,String> getGuidAssignments() {
-        return guidAssignments;
-    }
 }


Mime
View raw message