diff options
author | rescobar | 2011-08-31 22:23:22 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2011-08-31 22:23:22 +0000 |
commit | 5d57744fd42b35ac2212ab97c948a606ca8f2dfa (patch) | |
tree | 173d5b28ae6edd3cba7260e3f0557584a24c5e14 /plugins/org.eclipse.osee.framework.branch.management/src | |
parent | 98fac6092ff450483539f604867f6155e683c540 (diff) | |
download | org.eclipse.osee-5d57744fd42b35ac2212ab97c948a606ca8f2dfa.tar.gz org.eclipse.osee-5d57744fd42b35ac2212ab97c948a606ca8f2dfa.tar.xz org.eclipse.osee-5d57744fd42b35ac2212ab97c948a606ca8f2dfa.zip |
feature[ats_M1Y56]: Change AbstractOseeCache.getByGuid to be parametrized
Diffstat (limited to 'plugins/org.eclipse.osee.framework.branch.management/src')
-rw-r--r-- | plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/handler/DbTableSaxHandler.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/handler/DbTableSaxHandler.java b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/handler/DbTableSaxHandler.java index 9fe246f9f6d..fe804001458 100644 --- a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/handler/DbTableSaxHandler.java +++ b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/exchange/handler/DbTableSaxHandler.java @@ -30,6 +30,7 @@ import org.eclipse.osee.framework.core.model.AbstractOseeType; import org.eclipse.osee.framework.core.model.cache.AbstractOseeCache; import org.eclipse.osee.framework.core.services.IOseeCachingService; import org.eclipse.osee.framework.core.util.Conditions; +import org.eclipse.osee.framework.core.util.HexUtil; import org.eclipse.osee.framework.jdk.core.type.PropertyStore; import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -97,11 +98,12 @@ public class DbTableSaxHandler extends BaseDbSaxHandler { } } - private int getTypeId(AbstractOseeCache<?, ? extends AbstractOseeType> cache, Map<String, String> fieldMap) throws OseeCoreException { + private int getTypeId(AbstractOseeCache<Long, ? extends AbstractOseeType<Long>> cache, Map<String, String> fieldMap) throws OseeCoreException { Conditions.checkNotNull(cache, "cache"); - String guid = fieldMap.get(ExchangeDb.TYPE_GUID); - AbstractOseeType<?> typeObject = cache.getByGuid(guid); - Conditions.checkNotNull(typeObject, "type", "type [%s] was not found in cache [%s]", guid, cache.getCacheId()); + String hexString = fieldMap.get(ExchangeDb.TYPE_GUID); + Long uuid = HexUtil.toLong(hexString); + AbstractOseeType<Long> typeObject = cache.getByGuid(uuid); + Conditions.checkNotNull(typeObject, "type", "type [%s] was not found in cache [%s]", uuid, cache.getCacheId()); return typeObject.getId(); } |