Package org.apache.isis.runtimes.dflt.runtime.persistence

Examples of org.apache.isis.runtimes.dflt.runtime.persistence.ObjectNotFoundException


    public ObjectAdapter getObject(final Oid oid, final ObjectSpecification hint) throws ObjectNotFoundException, ObjectPersistenceException {
        LOG.debug("getObject " + oid);
        final ObjectStoreInstances ins = instancesFor(hint);
        final ObjectAdapter object = ins.retrieveObject(oid);
        if (object == null) {
            throw new ObjectNotFoundException(oid);
        } else {
            setupReferencedObjects(object);
            return object;
        }
    }
View Full Code Here


        if (data instanceof ObjectData) {
            object = recreateObject((ObjectData) data);
        } else if (data instanceof CollectionData) {
            throw new IsisException();
        } else {
            throw new ObjectNotFoundException(oid);
        }
        return object;
    }
View Full Code Here

        if (status.equals("error")) {
            final String message = getResponseData();
            throw new RemotingException(message);
        } else if (status.equals("not-found")) {
            final String message = getResponseData();
            throw new ObjectNotFoundException(message);
        } else if (status.equals("concurrency")) {
            final String data = getResponseData();
            // TODO create better exceptions (requires way to restore
            // object/version)
            if (data.startsWith("{")) {
View Full Code Here

    public MongoStateReader(final DB db, final String specName, final String key) {
        final DBCollection instances = db.getCollection(specName);
        instance = instances.findOne(key);
        if (instance == null) {
            throw new ObjectNotFoundException(key);
        }
        LOG.debug("loading " + instance);
    }
View Full Code Here

        idMapping.appendWhereClause(connector, sql, oid);
        final Results rs = connector.select(completeSelectStatement(sql));
        if (rs.next()) {
            return loadObject(connector, hint, rs);
        } else {
            throw new ObjectNotFoundException("No object with with " + oid + " in table " + table);
        }
    }
View Full Code Here

        if (data instanceof ObjectData) {
            object = recreateObject((ObjectData) data);
        } else if (data instanceof CollectionData) {
            throw new IsisException();
        } else {
            throw new ObjectNotFoundException(oid);
        }
        return object;
    }
View Full Code Here

        ObjectPersistenceException {
        LOG.debug("getObject " + oid);
        final ObjectStoreInstances ins = instancesFor(hint);
        final ObjectAdapter object = ins.retrieveObject(oid);
        if (object == null) {
            throw new ObjectNotFoundException(oid);
        } else {
            setupReferencedObjects(object);
            return object;
        }
    }
View Full Code Here

        idMapping.appendWhereClause(connector, sql, oid);
        final Results rs = connector.select(completeSelectStatement(sql));
        if (rs.next()) {
            return loadObject(connector, hint, rs);
        } else {
            throw new ObjectNotFoundException("No object with with " + oid + " in table " + table);
        }
    }
View Full Code Here

        if (status.equals("error")) {
            final String message = getResponseData();
            throw new RemotingException(message);
        } else if (status.equals("not-found")) {
            final String message = getResponseData();
            throw new ObjectNotFoundException(message);
        } else if (status.equals("concurrency")) {
            final String data = getResponseData();
            // TODO create better exceptions (requires way to restore object/version)
            if (data.startsWith("{")) {
                throw new ConcurrencyException(data, (Throwable) null);
View Full Code Here

    public MongoStateReader(final DB db, final String specName, final String key) {
        final DBCollection instances = db.getCollection(specName);
        instance = instances.findOne(key);
        if (instance == null) {
            throw new ObjectNotFoundException(key);
        }
        LOG.debug("loading " + instance);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.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.