Repository: atlas
Updated Branches:
  refs/heads/branch-1.0 35f7b80f1 -> 6fd3805ae


ATLAS-2968: Update model files to include service-type for each entityDef - #2

(cherry picked from commit 84371bccc6bcfe8dec61508b4d52e28796d85370)


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

Branch: refs/heads/branch-1.0
Commit: 6fd3805aeeb27b607cc71b1335605ad76cee8118
Parents: 35f7b80
Author: Madhan Neethiraj <mad...@apache.org>
Authored: Mon Nov 19 15:04:32 2018 -0800
Committer: Madhan Neethiraj <mad...@apache.org>
Committed: Mon Nov 19 15:27:58 2018 -0800

----------------------------------------------------------------------
 .../repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/6fd3805a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
----------------------------------------------------------------------
diff --git 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
index 418ce49..c6cf2a0 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
@@ -184,7 +184,11 @@ public class AtlasTypeDefGraphStoreV2 extends 
AtlasTypeDefGraphStore {
         ret.setProperty(Constants.TYPENAME_PROPERTY_KEY, typeDef.getName());
         ret.setProperty(Constants.TYPEDESCRIPTION_PROPERTY_KEY,
                 StringUtils.isNotBlank(typeDef.getDescription()) ? 
typeDef.getDescription() : typeDef.getName());
-        ret.setProperty(Constants.TYPESERVICETYPE_PROPERTY_KEY, 
typeDef.getServiceType());
+
+        if (StringUtils.isNotEmpty(typeDef.getServiceType())) {
+            ret.setProperty(Constants.TYPESERVICETYPE_PROPERTY_KEY, 
typeDef.getServiceType());
+        }
+
         ret.setProperty(Constants.TYPEVERSION_PROPERTY_KEY, 
typeDef.getTypeVersion());
         ret.setProperty(Constants.GUID_PROPERTY_KEY, typeDef.getGuid());
         ret.setProperty(Constants.CREATED_BY_KEY, getCurrentUser());

Reply via email to