Package org.apache.isis.core.runtime.persistence

Examples of org.apache.isis.core.runtime.persistence.ObjectNotFoundException


        }
        final ObjectSpecification objectSpec = getSpecificationLookup().lookupBySpecId(oid.getObjectSpecId());
        final ObjectStoreInstances ins = instancesFor(objectSpec);
        final ObjectAdapter adapter = ins.getObjectAndMapIfRequired(oid);
        if (adapter == null) {
            throw new ObjectNotFoundException(oid);
        }
        return adapter;
    }
View Full Code Here


            // else recreate
            try {
                final Object pojo = pojoRecreator.recreatePojo(typedOid);
                adapter = mapRecreatedPojo(typedOid, pojo);
            } catch(RuntimeException ex) {
                throw new ObjectNotFoundException(typedOid, ex);
            }
        }

        // sync versions of original, with concurrency checking if required
        Oid adapterOid = adapter.getOid();
View Full Code Here

        } catch (final RuntimeException e) {
            throw e;
        }

        if (result == null) {
            throw new ObjectNotFoundException(oid);
        }
        return result;
    }
View Full Code Here

    public void refreshRoot(final ObjectAdapter adapter) {
       
        final Object domainObject = adapter.getObject();
    if (domainObject == null) {
        // REVIEW: is this possible?
            throw new ObjectNotFoundException(adapter.getOid());
        }

        try {
            getPersistenceManager().refresh(domainObject);
        } catch (final RuntimeException e) {
            throw new ObjectNotFoundException(adapter.getOid(), e);
        }

        // possibly redundant because also called in the post-load event
        // listener, but (with JPA impl) found it was required if we were ever to
        // get an eager left-outer-join as the result of a refresh (sounds possible).
View Full Code Here

TOP

Related Classes of org.apache.isis.core.runtime.persistence.ObjectNotFoundException

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.