{
throw new NucleusUserException(LOCALISER.msg("010006"));
}
else if (id instanceof DatastoreUniqueOID)
{
throw new NucleusObjectNotFoundException(LOCALISER.msg("010026"), id);
}
else if (id instanceof OID)
{
// OID, so check that the implied class is managed
originalClassName = getStoreManager().manageClassForIdentity(id, getClassLoaderResolver());
}
else if (api.isSingleFieldIdentity(id))
{
// SingleFieldIdentity, so check that the implied class is managed
originalClassName = getStoreManager().manageClassForIdentity(id, getClassLoaderResolver());
}
else if (objectClassName != null)
{
// Object class name specified so use that directly
originalClassName = objectClassName;
}
else
{
// We dont know the object class so try to deduce it from what is known by the StoreManager
originalClassName = getStoreManager().getClassNameForObjectID(id, clr, this);
checkedClassName = true;
}
if (checkInheritance)
{
// Verify if correct class inheritance level is set
if (!checkedClassName)
{
className = getStoreManager().getClassNameForObjectID(id, clr, this);
}
else
{
// We just checked the name of the class in the section above so just use that
className = originalClassName;
}
if (className == null)
{
throw new NucleusObjectNotFoundException(LOCALISER.msg("010026"), id);
}
if (originalClassName != null && !originalClassName.equals(className))
{
// Inheritance checking has found a different inherited