Package org.apache.isis.runtimes.dflt.objectstores.dflt.internal

Examples of org.apache.isis.runtimes.dflt.objectstores.dflt.internal.ObjectStoreInstances


    protected void save(final ObjectAdapter adapter) throws ObjectPersistenceException {
        final ObjectSpecification specification = adapter.getSpecification();
        if (LOG.isDebugEnabled()) {
            LOG.debug("   saving object " + adapter + " as instance of " + specification.getShortIdentifier());
        }
        final ObjectStoreInstances ins = instancesFor(specification);
        ins.save(adapter); // also sets the version
    }
View Full Code Here


    protected void destroy(final ObjectAdapter adapter) {
        final ObjectSpecification specification = adapter.getSpecification();
        if (LOG.isDebugEnabled()) {
            LOG.debug("   destroy object " + adapter + " as instance of " + specification.getShortIdentifier());
        }
        final ObjectStoreInstances ins = instancesFor(specification);
        ins.remove(adapter.getOid());
    }
View Full Code Here

    // ///////////////////////////////////////////////////////

    @Override
    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

    @Override
    public void debugData(final DebugBuilder debug) {
        debug.appendTitle("Domain Objects");
        for (final ObjectSpecification spec : persistedObjects.specifications()) {
            debug.appendln(spec.getFullIdentifier());
            final ObjectStoreInstances instances = instancesFor(spec);
            instances.debugData(debug);
        }
        debug.unindent();
        debug.appendln();
    }
View Full Code Here

    // //////////////////////////////////////////////////////////////////
    // Helpers
    // //////////////////////////////////////////////////////////////////

    private ObjectStoreInstances getFromMap(final ObjectSpecification spec, final Map<ObjectSpecification, ObjectStoreInstances> map) {
        ObjectStoreInstances ins = map.get(spec);
        if (ins == null) {
            ins = new ObjectStoreInstances(spec);
            map.put(spec, ins);
        }
        return ins;
    }
View Full Code Here

    protected void save(final ObjectAdapter adapter) throws ObjectPersistenceException {
        final ObjectSpecification specification = adapter.getSpecification();
        if (LOG.isDebugEnabled()) {
            LOG.debug("   saving object " + adapter + " as instance of " + specification.getShortIdentifier());
        }
        final ObjectStoreInstances ins = instancesFor(specification);
        ins.save(adapter); // also sets the version
    }
View Full Code Here

    protected void destroy(final ObjectAdapter adapter) {
        final ObjectSpecification specification = adapter.getSpecification();
        if (LOG.isDebugEnabled()) {
            LOG.debug("   destroy object " + adapter + " as instance of " + specification.getShortIdentifier());
        }
        final ObjectStoreInstances ins = instancesFor(specification);
        ins.remove(adapter.getOid());
    }
View Full Code Here

    @Override
    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

    @Override
    public void debugData(final DebugBuilder debug) {
        debug.appendTitle("Domain Objects");
        for (final ObjectSpecification spec : persistedObjects.specifications()) {
            debug.appendln(spec.getFullIdentifier());
            final ObjectStoreInstances instances = instancesFor(spec);
            instances.debugData(debug);
        }
        debug.unindent();
        debug.appendln();
    }
View Full Code Here

    // Helpers
    // //////////////////////////////////////////////////////////////////

    private ObjectStoreInstances getFromMap(final ObjectSpecification spec,
        final Map<ObjectSpecification, ObjectStoreInstances> map) {
        ObjectStoreInstances ins = map.get(spec);
        if (ins == null) {
            ins = new ObjectStoreInstances(spec);
            map.put(spec, ins);
        }
        return ins;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.objectstores.dflt.internal.ObjectStoreInstances

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.