Package org.apache.isis.core.runtime.system.persistence

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


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


     * 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();
        final IdentifierGenerator identifierGenerator = oidGenerator.getIdentifierGenerator();
        if (identifierGenerator instanceof IdentifierGeneratorDefault) {
            final IdentifierGeneratorDefault identifierGeneratorDefault = (IdentifierGeneratorDefault) identifierGenerator;
            persistedObjects.saveOidGeneratorMemento(identifierGeneratorDefault.getMemento());
        }
        this.persistedObjects = persistedObjects;
View Full Code Here

        }

        ObjectAdapterFactory adapterFactory = persistenceSessionFactory.getAdapterFactory();
        ObjectFactory objectFactory = persistenceSessionFactory.getObjectFactory();
        PojoRecreator pojoRecreator = persistenceSessionFactory.getPojoRecreator();
        IdentifierGenerator identifierGenerator = persistenceSessionFactory.getIdentifierGenerator();
        ServicesInjectorSpi servicesInjector = persistenceSessionFactory.getServicesInjector();
       
        final PersistAlgorithm persistAlgorithm = createPersistAlgorithm(getConfiguration());
        final AdapterManagerDefault adapterManager = new AdapterManagerDefault(pojoRecreator);
       
View Full Code Here

    @Override
    public PersistenceSession createPersistenceSession() {
        final PersistenceSession persistenceSession = super.createPersistenceSession();
        if (persistedObjects != null) {
            final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
            final IdentifierGenerator identifierGenerator = oidGenerator.getIdentifierGenerator();
            final IdentifierGeneratorDefault identifierGeneratorDefault = identifierGenerator.underlying(IdentifierGeneratorDefault.class);
            if(identifierGeneratorDefault != null) {
                identifierGeneratorDefault.resetTo(persistedObjects.getOidGeneratorMemento());
            }
        }
View Full Code Here

     * 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();
        final IdentifierGenerator identifierGenerator = oidGenerator.getIdentifierGenerator();

        final IdentifierGeneratorDefault identifierGeneratorDefault = identifierGenerator.underlying(IdentifierGeneratorDefault.class);
        if(identifierGeneratorDefault != null) {
            identifierGeneratorDefault.resetTo(persistedObjects.getOidGeneratorMemento());
            persistedObjects.saveOidGeneratorMemento(identifierGeneratorDefault.getMemento());
        }

View Full Code Here

        }

        ObjectAdapterFactory adapterFactory = persistenceSessionFactory.getAdapterFactory();
        ObjectFactory objectFactory = persistenceSessionFactory.getObjectFactory();
        PojoRecreator pojoRecreator = persistenceSessionFactory.getPojoRecreator();
        IdentifierGenerator identifierGenerator = persistenceSessionFactory.getIdentifierGenerator();
        ServicesInjectorSpi servicesInjector = persistenceSessionFactory.getServicesInjector();
       
        final PersistAlgorithm persistAlgorithm = createPersistAlgorithm(getConfiguration());
        final AdapterManagerDefault adapterManager = new AdapterManagerDefault(pojoRecreator);
       
View Full Code Here

TOP

Related Classes of org.apache.isis.core.runtime.system.persistence.IdentifierGenerator

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.