Examples of OidGenerator


Examples of org.apache.isis.core.runtime.system.persistence.OidGenerator

                allowing(serviceSpecification).getSpecId();
                will(returnValue(serviceSpecId));
            }
        });

        store = new NoSqlObjectStore(db, new OidGenerator(new NoSqlIdentifierGenerator(db)), versionCreator, null, dataEncrypter);
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.system.persistence.OidGenerator

                        } else {
                            LOG.warn("concurrency conflict detected but suppressed, on " + thisOid + " (" + otherVersion + ")");
                        }
                    }
                } else {
                    final OidGenerator oidGenerator = getOidGenerator();
                    originalOid = oidGenerator.createPersistentOrViewModelOid(pojo, null);
                   
                    // it appears to be possible that there is already an adapter for this Oid,
                    // ie from ObjectStore#resolveImmediately()
                    originalAdapter = getAdapterManager().getAdapterFor(originalOid);
                    if(originalAdapter != null) {
View Full Code Here

Examples of org.apache.isis.core.runtime.system.persistence.OidGenerator

        servicesInjector = new ServicesInjectorDefault();
        servicesInjector.setContainer(container);

        adapterManager = new AdapterManagerDefault(new PojoRecreatorDefault());
        adapterFactory = new PojoAdapterFactory();
        persistenceSession = new PersistenceSession(mockPersistenceSessionFactory, adapterFactory, objectFactory, servicesInjector, new OidGenerator(new IdentifierGeneratorDefault()), adapterManager, mockPersistAlgorithm, mockObjectStore) {
            @Override
            protected SpecificationLoaderSpi getSpecificationLoader() {
                return isisMetaModel.getSpecificationLoader();
            }
           
View Full Code Here

Examples of org.apache.isis.core.runtime.system.persistence.OidGenerator

                        } else {
                            LOG.warn("concurrency conflict detected but suppressed, on " + thisOid + " (" + otherVersion + ")");
                        }
                    }
                } else {
                    final OidGenerator oidGenerator = getOidGenerator();
                    originalOid = oidGenerator.createPersistentOrViewModelOid(pojo, null);
                   
                    // it appears to be possible that there is already an adapter for this Oid,
                    // ie from ObjectStore#resolveImmediately()
                    originalAdapter = getAdapterManager().getAdapterFor(originalOid);
                    if(originalAdapter != null) {
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator

    @Override
    public PersistenceSession createPersistenceSession() {
        final PersistenceSession persistenceSession = super.createPersistenceSession();
        if (persistedObjects != null) {
            final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
            if (oidGenerator instanceof SimpleOidGenerator) {
                final SimpleOidGenerator simpleOidGenerator = (SimpleOidGenerator) oidGenerator;
                simpleOidGenerator.resetTo(persistedObjects.getOidGeneratorMemento());
            }
        }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator

    /**
     * Not API - called when {@link InMemoryObjectStore} is
     * {@link InMemoryObjectStore#close() close}d.
     */
    public void attach(final PersistenceSession persistenceSession, final ObjectStorePersistedObjects persistedObjects) {
        final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
        if (oidGenerator instanceof SimpleOidGenerator) {
            final SimpleOidGenerator simpleOidGenerator = (SimpleOidGenerator) oidGenerator;
            persistedObjects.saveOidGeneratorMemento(simpleOidGenerator.getMemento());
        }
        this.persistedObjects = persistedObjects;
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator

        }

        final AdapterManagerExtended adapterManager = createAdapterManager(getConfiguration());
        final ObjectAdapterFactory adapterFactory = createAdapterFactory(getConfiguration());
        final ObjectFactory objectFactory = createObjectFactory(getConfiguration());
        final OidGenerator oidGenerator = createOidGenerator(getConfiguration());

        final RuntimeContext runtimeContext = createRuntimeContext(getConfiguration());
        final DomainObjectContainer container = createContainer(getConfiguration());

        final ServicesInjector servicesInjector = createServicesInjector(getConfiguration());
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator

        }

        final AdapterManagerExtended adapterManager = createAdapterManager(getConfiguration());
        final ObjectAdapterFactory adapterFactory = createAdapterFactory(getConfiguration());
        final ObjectFactory objectFactory = createObjectFactory(getConfiguration());
        final OidGenerator oidGenerator = createOidGenerator(getConfiguration());

        final RuntimeContext runtimeContext = createRuntimeContext(getConfiguration());
        final DomainObjectContainer container = createContainer(getConfiguration());

        final ServicesInjector servicesInjector = createServicesInjector(getConfiguration());
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator

    @Override
    public PersistenceSession createPersistenceSession() {
        final PersistenceSession persistenceSession = super.createPersistenceSession();
        if (persistedObjects != null) {
            final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
            if (oidGenerator instanceof SimpleOidGenerator) {
                final SimpleOidGenerator simpleOidGenerator = (SimpleOidGenerator) oidGenerator;
                simpleOidGenerator.resetTo(persistedObjects.getOidGeneratorMemento());
            }
        }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.persistence.OidGenerator

    /**
     * Not API - called when {@link InMemoryObjectStore} is {@link InMemoryObjectStore#close() close}d.
     */
    public void attach(final PersistenceSession persistenceSession, final ObjectStorePersistedObjects persistedObjects) {
        final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
        if (oidGenerator instanceof SimpleOidGenerator) {
            final SimpleOidGenerator simpleOidGenerator = (SimpleOidGenerator) oidGenerator;
            persistedObjects.saveOidGeneratorMemento(simpleOidGenerator.getMemento());
        }
        this.persistedObjects = persistedObjects;
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.