Examples of ObjectStoreInstances


Examples of org.apache.isis.core.objectstore.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.getSpecId());
        ins.save(adapter); // also sets the version
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.internal.ObjectStoreInstances

    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.getSpecId());
        ins.remove(adapter.getOid());
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.internal.ObjectStoreInstances

    public ObjectAdapter loadInstanceAndAdapt(final TypedOid oid) throws ObjectNotFoundException, ObjectPersistenceException {
        if(LOG.isDebugEnabled()) {
            LOG.debug("getObject " + oid);
        }
        final ObjectSpecification objectSpec = getSpecificationLookup().lookupBySpecId(oid.getObjectSpecId());
        final ObjectStoreInstances ins = instancesFor(objectSpec.getSpecId());
        final ObjectAdapter adapter = ins.getObjectAndMapIfRequired(oid);
        if (adapter == null) {
            throw new ObjectNotFoundException(oid);
        }
        return adapter;
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.internal.ObjectStoreInstances

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

Examples of org.apache.isis.core.objectstore.internal.ObjectStoreInstances

    // //////////////////////////////////////////////////////////////////
    // 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

Examples of org.apache.isis.core.objectstore.internal.ObjectStoreInstances

    public ObjectAdapter loadInstanceAndAdapt(final TypedOid oid) throws ObjectNotFoundException, ObjectPersistenceException {
        if(LOG.isDebugEnabled()) {
            LOG.debug("getObject " + oid);
        }
        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

Examples of org.apache.isis.core.objectstore.internal.ObjectStoreInstances

    @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

Examples of org.apache.isis.core.objectstore.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

Examples of org.apache.isis.core.objectstore.internal.ObjectStoreInstances

    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

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
TOP
Copyright © 2018 www.massapi.com. 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.