Package org.datanucleus.exceptions

Examples of org.datanucleus.exceptions.NucleusObjectNotFoundException


            {
                // Try to derive the class name from the id, since not provided
                className = getStoreManager().getClassNameForObjectID(id, clr, this);
                if (className == null)
                {
                    throw new NucleusObjectNotFoundException(LOCALISER.msg("010026"), id);
                }
                if (id instanceof OID)
                {
                    // Try again using the derived class name
                    id = OIDFactory.getInstance(this, className, ((OID)id).getKeyValue());
View Full Code Here


                {
                    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
View Full Code Here

TOP

Related Classes of org.datanucleus.exceptions.NucleusObjectNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.