Package org.apache.isis.core.metamodel.adapter.oid

Examples of org.apache.isis.core.metamodel.adapter.oid.CollectionOid


        Assert.assertNotNull(pojo);

        final Oid parentOid = parentAdapter.getOid();

        // persistence of collection follows the parent
        final CollectionOid collectionOid = new CollectionOid((TypedOid) parentOid, otma);
        final ObjectAdapter collectionAdapter = createCollectionAdapterAndInferResolveState(pojo, collectionOid);

        // we copy over the type onto the adapter itself
        // [not sure why this is really needed, surely we have enough info in
        // the adapter
View Full Code Here


        final ObjectAdapter createdAdapter;
        if(oid instanceof RootOid) {
            final RootOid rootOid = (RootOid) oid;
            createdAdapter = createRootAdapterAndInferResolveState(pojo, rootOid);
        } else if (oid instanceof CollectionOid){
            final CollectionOid collectionOid = (CollectionOid) oid;
            createdAdapter = createCollectionAdapterAndInferResolveState(pojo, collectionOid);
        } else {
            final AggregatedOid aggregatedOid = (AggregatedOid) oid;
            createdAdapter = createAggregatedAdapter(pojo, aggregatedOid);
        }
View Full Code Here

        // associate the collection adapters with new Oids, and re-map
        if (LOG.isDebugEnabled()) {
            LOG.debug("replacing Oids for collection adapter(s) and re-adding into maps");
        }
        for (final ObjectAdapter collectionAdapter : rootAndCollectionAdapters) {
            final CollectionOid previousCollectionOid = (CollectionOid) collectionAdapter.getOid();
            final CollectionOid persistedCollectionOid = previousCollectionOid.asPersistent(persistedRootOid);
            oidAdapterMap.add(persistedCollectionOid, collectionAdapter);
        }

       
        // some object store implementations may replace collection instances (eg ORM may replace with a cglib-enhanced
View Full Code Here

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

    private void addCollectionAdapters(AdapterManager objectAdapterLookup) {
        for (final OneToManyAssociation otma : parentAdapter.getSpecification().getCollections(Contributed.EXCLUDED)) {
            final CollectionOid collectionOid = new CollectionOid((TypedOid) rootAdapterOid, otma);
            final ObjectAdapter collectionAdapter = objectAdapterLookup.getAdapterFor(collectionOid);
            if (collectionAdapter != null) {
                // collection adapters are lazily created and so there may not be one.
                addCollectionAdapter(otma, collectionAdapter);
            }
View Full Code Here

        Assert.assertNotNull(pojo);

        final Oid parentOid = parentAdapter.getOid();

        // persistence of collection follows the parent
        final CollectionOid collectionOid = new CollectionOid((TypedOid) parentOid, otma);
        final ObjectAdapter collectionAdapter = createCollectionAdapterAndInferResolveState(pojo, collectionOid);

        // we copy over the type onto the adapter itself
        // [not sure why this is really needed, surely we have enough info in
        // the adapter
View Full Code Here

        final ObjectAdapter createdAdapter;
        if(oid instanceof RootOid) {
            final RootOid rootOid = (RootOid) oid;
            createdAdapter = createRootAdapterAndInferResolveState(pojo, rootOid);
        } else if (oid instanceof CollectionOid){
            final CollectionOid collectionOid = (CollectionOid) oid;
            createdAdapter = createCollectionAdapterAndInferResolveState(pojo, collectionOid);
        } else {
            final AggregatedOid aggregatedOid = (AggregatedOid) oid;
            createdAdapter = createAggregatedAdapter(pojo, aggregatedOid);
        }
View Full Code Here

        // associate the collection adapters with new Oids, and re-map
        if (LOG.isDebugEnabled()) {
            LOG.debug("replacing Oids for collection adapter(s) and re-adding into maps");
        }
        for (final ObjectAdapter collectionAdapter : rootAndCollectionAdapters) {
            final CollectionOid previousCollectionOid = (CollectionOid) collectionAdapter.getOid();
            final CollectionOid persistedCollectionOid = previousCollectionOid.asPersistent(persistedRootOid);
            oidAdapterMap.add(persistedCollectionOid, collectionAdapter);
        }

       
        // some object store implementations may replace collection instances (eg ORM may replace with a cglib-enhanced
View Full Code Here

        Assert.assertNotNull(pojo);

        final Oid parentOid = parentAdapter.getOid();

        // persistence of collection follows the parent
        final CollectionOid collectionOid = new CollectionOid((TypedOid) parentOid, otma);
        final ObjectAdapter collectionAdapter = createCollectionAdapterAndInferResolveState(pojo, collectionOid);

        // we copy over the type onto the adapter itself
        // [not sure why this is really needed, surely we have enough info in
        // the adapter
View Full Code Here

        final ObjectAdapter createdAdapter;
        if(oid instanceof RootOid) {
            final RootOid rootOid = (RootOid) oid;
            createdAdapter = createRootAdapterAndInferResolveState(pojo, rootOid);
        } else if (oid instanceof CollectionOid){
            final CollectionOid collectionOid = (CollectionOid) oid;
            createdAdapter = createCollectionAdapterAndInferResolveState(pojo, collectionOid);
        } else {
            final AggregatedOid aggregatedOid = (AggregatedOid) oid;
            createdAdapter = createAggregatedAdapter(pojo, aggregatedOid);
        }
View Full Code Here

        // associate the collection adapters with new Oids, and re-map
        if (LOG.isDebugEnabled()) {
            LOG.debug("replacing Oids for collection adapter(s) and re-adding into maps");
        }
        for (final ObjectAdapter collectionAdapter : rootAndCollectionAdapters) {
            final CollectionOid previousCollectionOid = (CollectionOid) collectionAdapter.getOid();
            final CollectionOid persistedCollectionOid = previousCollectionOid.asPersistent(persistedRootOid);
            oidAdapterMap.add(persistedCollectionOid, collectionAdapter);
        }

       
        // some object store implementations may replace collection instances (eg ORM may replace with a cglib-enhanced
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.adapter.oid.CollectionOid

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.