Fix Reference Key columns persistence issue in db
[policy/models.git] / models-base / src / main / java / org / onap / policy / models / base / PfConceptGetterImpl.java
index c641a80..7a3e055 100644 (file)
@@ -23,7 +23,6 @@ package org.onap.policy.models.base;
 import java.util.NavigableMap;
 import java.util.Set;
 import java.util.TreeSet;
-
 import org.onap.policy.common.utils.validation.Assertions;
 
 /**
@@ -55,7 +54,7 @@ public class PfConceptGetterImpl<C> implements PfConceptGetter<C> {
         Assertions.argumentNotNull(conceptKeyName, "conceptKeyName may not be null");
 
         // The very fist key that could have this name
-        final PfConceptKey lowestArtifactKey = new PfConceptKey(conceptKeyName, "0.0.1");
+        final PfConceptKey lowestArtifactKey = new PfConceptKey(conceptKeyName, PfKey.NULL_KEY_VERSION);
 
         // Check if we found a key for our name
         PfConceptKey foundKey = conceptMap.ceilingKey(lowestArtifactKey);
@@ -70,8 +69,7 @@ public class PfConceptGetterImpl<C> implements PfConceptGetter<C> {
                 break;
             }
             foundKey = nextkey;
-        }
-        while (true);
+        } while (true);
 
         return conceptMap.get(foundKey);
     }
@@ -121,8 +119,7 @@ public class PfConceptGetterImpl<C> implements PfConceptGetter<C> {
                 break;
             }
             returnSet.add(conceptMap.get(foundKey));
-        }
-        while (true);
+        } while (true);
 
         return returnSet;
     }