Examples of InMemoryPersistenceMechanismInstaller


Examples of org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller

    public PersistenceMechanismInstaller addPersistorAnnotatedOn(final Class<?> javaClass) throws InstantiationException, IllegalAccessException {
        final Persistor annotation = javaClass.getAnnotation(Persistor.class);
        if (annotation != null) {
            return addPersistorRepresentedBy(annotation);
        } else {
            return new InMemoryPersistenceMechanismInstaller();
        }

    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller

     */
    @Override
    protected PersistenceSessionFactory obtainPersistenceSessionFactory(DeploymentType deploymentType) throws IsisSystemException {
        PersistenceMechanismInstaller installer = obtainPersistenceMechanismInstaller(getConfiguration());
        if(installer == null) {
            final InMemoryPersistenceMechanismInstaller inMemoryPersistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
            inMemoryPersistenceMechanismInstaller.setConfiguration(getConfiguration());
            installer = inMemoryPersistenceMechanismInstaller;
        }
        return installer.createPersistenceSessionFactory(deploymentType);
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller

    /**
     * Optional hook; if returns <tt>null</tt> then the {@link #obtainPersistenceSessionFactory(DeploymentType)} is used.
     */
    protected PersistenceMechanismInstaller obtainPersistenceMechanismInstaller(IsisConfiguration configuration) throws IsisSystemException {
        InMemoryPersistenceMechanismInstaller installer = new InMemoryPersistenceMechanismInstaller();
        installer.setConfiguration(getConfiguration());
        return installer;
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller

     */
    @Override
    protected PersistenceSessionFactory obtainPersistenceSessionFactory(DeploymentType deploymentType) throws IsisSystemException {
        PersistenceMechanismInstaller installer = obtainPersistenceMechanismInstaller(getConfiguration());
        if(installer == null) {
            final InMemoryPersistenceMechanismInstaller inMemoryPersistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
            inMemoryPersistenceMechanismInstaller.setConfiguration(getConfiguration());
            installer = inMemoryPersistenceMechanismInstaller;
        }
        return installer.createPersistenceSessionFactory(deploymentType);
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller

    /**
     * Optional hook; if returns <tt>null</tt> then the {@link #obtainPersistenceSessionFactory(DeploymentType)} is used.
     */
    protected PersistenceMechanismInstaller obtainPersistenceMechanismInstaller(IsisConfiguration configuration) throws IsisSystemException {
        InMemoryPersistenceMechanismInstaller installer = new InMemoryPersistenceMechanismInstaller();
        installer.setConfiguration(getConfiguration());
        return installer;
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller

            return new SqlPersistorInstaller();
        }
       
        final String persistor = configuration.getString("isis.persistor");
        if (persistor.equals(InMemoryPersistenceMechanismInstaller.NAME)) {
            return new InMemoryPersistenceMechanismInstaller();
        }
        if (persistor.equals(XmlPersistenceMechanismInstaller.NAME)) {
            return new XmlPersistenceMechanismInstaller();
        }
        if (persistor.equals(SqlPersistorInstaller.NAME)) {
            return new SqlPersistorInstaller();
        }
        return new InMemoryPersistenceMechanismInstaller();
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller

    public PersistenceMechanismInstaller addPersistorAnnotatedOn(final Class<?> javaClass) throws InstantiationException, IllegalAccessException {
        final Persistor annotation = javaClass.getAnnotation(Persistor.class);
        if (annotation != null) {
            return addPersistorRepresentedBy(annotation);
        } else {
            return new InMemoryPersistenceMechanismInstaller();
        }

    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller

     */
    @Override
    protected PersistenceSessionFactory obtainPersistenceSessionFactory(DeploymentType deploymentType) throws IsisSystemException {
        PersistenceMechanismInstaller installer = obtainPersistenceMechanismInstaller(getConfiguration());
        if(installer == null) {
            final InMemoryPersistenceMechanismInstaller inMemoryPersistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
            inMemoryPersistenceMechanismInstaller.setConfiguration(getConfiguration());
            installer = inMemoryPersistenceMechanismInstaller;
        }
        return installer.createPersistenceSessionFactory(deploymentType);
    }
View Full Code Here

Examples of org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller

    /**
     * Optional hook; if returns <tt>null</tt> then the {@link #obtainPersistenceSessionFactory(DeploymentType)} is used.
     */
    protected PersistenceMechanismInstaller obtainPersistenceMechanismInstaller(IsisConfiguration configuration) throws IsisSystemException {
        InMemoryPersistenceMechanismInstaller installer = new InMemoryPersistenceMechanismInstaller();
        installer.setConfiguration(getConfiguration());
        return installer;
    }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.objectstores.dflt.InMemoryPersistenceMechanismInstaller

        javaReflectorInstaller.setConfiguration(configuration);
        mockSpecificationLoader = javaReflectorInstaller.createReflector();

        ((ObjectReflectorDefault) mockSpecificationLoader).setRuntimeContext(new RuntimeContextFromSession());

        final InMemoryPersistenceMechanismInstaller persistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
        persistenceMechanismInstaller.setConfiguration(configuration);
        final PersistenceSessionFactory mockPersistenceSessionFactory = persistenceMechanismInstaller.createPersistenceSessionFactory(DeploymentType.PROTOTYPE);

        // mockPersistenceSessionFactory.init();

        final IsisSessionFactoryDefault sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
        final IsisContext context = IsisContextStatic.createRelaxedInstance(sessionFactory);
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.