String entityClsName = (String) classVersionPairs[0];
PrimaryIndex<Object,RawObject> index =
store.getPrimaryIndex(entityClsName);
TestCase.assertNotNull(index);
RawObject obj = index.get(key);
TestCase.assertNotNull(obj);
checkRawType(obj.getType(), classVersionPairs);
RawObject superObj = obj.getSuper();
for (int i = 2; i < classVersionPairs.length; i += 2) {
Object[] a = new Object[classVersionPairs.length - i];
System.arraycopy(classVersionPairs, i, a, 0, a.length);
TestCase.assertNotNull(superObj);
checkRawType(superObj.getType(), a);
superObj = superObj.getSuper();
}
return obj;
}