Examples of changeState()


Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

    }

    private ObjectAdapter createCollectionAdapterAndInferResolveState(final Object pojo, CollectionOid collectionOid) {
        Ensure.ensureThatArg(collectionOid, is(not(nullValue())));
        final ObjectAdapter collectionAdapter = getObjectAdapterFactory().createAdapter(pojo, collectionOid, this);
        collectionAdapter.changeState(collectionOid.isTransient() ? ResolveState.TRANSIENT : ResolveState.GHOST);
        return collectionAdapter;
    }

    private ObjectAdapter createAggregatedAdapter(final Object pojo, AggregatedOid aggregatedOid) {
        Ensure.ensureThatArg(aggregatedOid, is(not(nullValue())));
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

                for (final PersistenceCommand command : commandsPrior) {
                    if (command instanceof DestroyObjectCommand) {
                        final ObjectAdapter adapter = command.onAdapter();
                        adapter.setVersion(null);
                        if(!adapter.isDestroyed()) {
                            adapter.changeState(ResolveState.DESTROYED);
                        }
                    }
                }
                commands.removeAll(commandsPrior);
            } catch(final RuntimeException ex) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

        final Object pojo = objectSpec.createObject();
        final ObjectAdapter adapter = getAdapterManager().adapterFor(pojo, parentAdapter);
        // returned adapter's ResolveState will either be TRANSIENT or GHOST
        objectSpec.initialize(adapter);
        if (adapter.isGhost()) {
            adapter.changeState(ResolveState.RESOLVING);
            adapter.changeState(ResolveState.RESOLVED);
        }
        return adapter;
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

        final ObjectAdapter adapter = getAdapterManager().adapterFor(pojo, parentAdapter);
        // returned adapter's ResolveState will either be TRANSIENT or GHOST
        objectSpec.initialize(adapter);
        if (adapter.isGhost()) {
            adapter.changeState(ResolveState.RESOLVING);
            adapter.changeState(ResolveState.RESOLVED);
        }
        return adapter;
    }

    // ///////////////////////////////////////////////////////////////////////////
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

     * {@link #getAdapterFor(Object) mapped}, and for immutable value types
     * referenced.
     */
    private ObjectAdapter createStandaloneAdapterAndSetResolveState(final Object pojo) {
        final ObjectAdapter adapter = getObjectAdapterFactory().createAdapter(pojo, null, this);
        adapter.changeState(ResolveState.VALUE);
        return adapter;
    }

    /**
     * Creates (but does not {@link #mapAndInjectServices(ObjectAdapter) map}) a new
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

     * @see #createCollectionAdapterAndInferResolveState(Object, CollectionOid)
     */
    private ObjectAdapter createRootAdapterAndInferResolveState(final Object pojo, RootOid rootOid) {
        Ensure.ensureThatArg(rootOid, is(not(nullValue())));
        final ObjectAdapter rootAdapter = getObjectAdapterFactory().createAdapter(pojo, rootOid, this);
        rootAdapter.changeState(rootOid.isTransient() ? ResolveState.TRANSIENT : ResolveState.GHOST);
        doPostCreateRootAdapter(rootAdapter);
        return rootAdapter;
    }

    /**
 
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

    }

    private ObjectAdapter createCollectionAdapterAndInferResolveState(final Object pojo, CollectionOid collectionOid) {
        Ensure.ensureThatArg(collectionOid, is(not(nullValue())));
        final ObjectAdapter collectionAdapter = getObjectAdapterFactory().createAdapter(pojo, collectionOid, this);
        collectionAdapter.changeState(collectionOid.isTransient() ? ResolveState.TRANSIENT : ResolveState.GHOST);
        return collectionAdapter;
    }

    private ObjectAdapter createAggregatedAdapter(final Object pojo, AggregatedOid aggregatedOid) {
        Ensure.ensureThatArg(aggregatedOid, is(not(nullValue())));
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

        final Data fieldData = dataManager.loadData(referencedOid);

        final ObjectAdapter referencedAdapter = getAdapterManager().adapterFor(referencedOid);
        if (fieldData == null) {
            if (!referencedAdapter.isDestroyed()) {
                referencedAdapter.changeState(ResolveState.DESTROYED);
            }
            LOG.warn("No data found for " + referencedOid + " so field '" + field.getName() + "' not set in object '" + object.titleString() + "'");
        }
        ((OneToOneAssociation) field).initAssociation(object, referencedAdapter);
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

        final Object pojo = objectSpec.createObject();
        final ObjectAdapter adapter = getAdapterManager().adapterFor(pojo, parentAdapter);
        // returned adapter's ResolveState will either be TRANSIENT or GHOST
        objectSpec.initialize(adapter);
        if (adapter.isGhost()) {
            adapter.changeState(ResolveState.RESOLVING);
            adapter.changeState(ResolveState.RESOLVED);
        }
        return adapter;
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ObjectAdapter.changeState()

        final ObjectAdapter adapter = getAdapterManager().adapterFor(pojo, parentAdapter);
        // returned adapter's ResolveState will either be TRANSIENT or GHOST
        objectSpec.initialize(adapter);
        if (adapter.isGhost()) {
            adapter.changeState(ResolveState.RESOLVING);
            adapter.changeState(ResolveState.RESOLVED);
        }
        return adapter;
    }

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