/** * Create an {@link IndexManager} that allows index creation. * * @return */ @Bean(name = BeanNames.COUCHBASE_INDEX_MANAGER) public IndexManager indexManager() { return new IndexManager(true, true, false); }
/** * Create an {@link IndexManager} that allows index creation. * * @return */ @Bean(name = BeanNames.COUCHBASE_INDEX_MANAGER) public IndexManager indexManager() { return new IndexManager(true, true, false); }
@Override public IndexManager indexManager() { return new IndexManager(); }
/** * Register an {@link IndexManager} bean that will be used to process {@link ViewIndexed}, * {@link N1qlPrimaryIndexed} and {@link N1qlSecondaryIndexed} annotations on repositories * to automatically create indexes. By default, since such automatic creations are discouraged in * production envrironment, the configuration will assume the worst and will ignore these annotations. * <p/> * If you are sure this configuration used in a context where such automatic creations are desired (eg. * you want automatic index creation in Dev, just not in Prod, and this configuration is the Dev one), * override the bean and use the {@link IndexManager#IndexManager()} constructor (or * {@link IndexManager#IndexManager(boolean, boolean, boolean)} constructor with appropriate flags set to true to * activate). */ @Bean(name = BeanNames.COUCHBASE_INDEX_MANAGER) public IndexManager indexManager() { return new IndexManager(false, false, false); //this ignores view, N1QL primary and secondary annotations }
/** * Register an {@link IndexManager} bean that will be used to process {@link ViewIndexed}, * {@link N1qlPrimaryIndexed} and {@link N1qlSecondaryIndexed} annotations on repositories * to automatically create indexes. By default, since such automatic creations are discouraged in * production envrironment, the configuration will assume the worst and will ignore these annotations. * <p/> * If you are sure this configuration used in a context where such automatic creations are desired (eg. * you want automatic index creation in Dev, just not in Prod, and this configuration is the Dev one), * override the bean and use the {@link IndexManager#IndexManager()} constructor (or * {@link IndexManager#IndexManager(boolean, boolean, boolean)} constructor with appropriate flags set to true to * activate). */ @Bean(name = BeanNames.COUCHBASE_INDEX_MANAGER) public IndexManager indexManager() { return new IndexManager(false, false, false); //this ignores view, N1QL primary and secondary annotations }
@Override protected T create(CreationalContext<T> creationalContext, Class<T> repositoryType, Optional<Object> customImplementation) { RxJavaCouchbaseOperations reactiveCouchbaseOperations = getDependencyInstance(reactiveCouchbaseOperationsBean, RxJavaCouchbaseOperations.class); ReactiveRepositoryOperationsMapping reactiveCouchbaseOperationsMapping = new ReactiveRepositoryOperationsMapping(reactiveCouchbaseOperations); IndexManager indexManager = new IndexManager(); ReactiveCouchbaseRepositoryFactory factory = new ReactiveCouchbaseRepositoryFactory(reactiveCouchbaseOperationsMapping, indexManager); return customImplementation.map(o -> factory.getRepository(repositoryType, o)) .orElseGet(() -> factory.getRepository(repositoryType)); }
@Override protected T create(CreationalContext<T> creationalContext, Class<T> repositoryType, Optional<Object> customImplementation) { RxJavaCouchbaseOperations reactiveCouchbaseOperations = getDependencyInstance(reactiveCouchbaseOperationsBean, RxJavaCouchbaseOperations.class); ReactiveRepositoryOperationsMapping reactiveCouchbaseOperationsMapping = new ReactiveRepositoryOperationsMapping(reactiveCouchbaseOperations); IndexManager indexManager = new IndexManager(); ReactiveCouchbaseRepositoryFactory factory = new ReactiveCouchbaseRepositoryFactory(reactiveCouchbaseOperationsMapping, indexManager); return customImplementation.map(o -> factory.getRepository(repositoryType, o)) .orElseGet(() -> factory.getRepository(repositoryType)); }
@Override protected T create(CreationalContext<T> creationalContext, Class<T> repositoryType) { CouchbaseOperations couchbaseOperations = getDependencyInstance(couchbaseOperationsBean, CouchbaseOperations.class); RepositoryOperationsMapping couchbaseOperationsMapping = new RepositoryOperationsMapping(couchbaseOperations); IndexManager indexManager = new IndexManager(); return create(() -> new CouchbaseRepositoryFactory(couchbaseOperationsMapping, indexManager), repositoryType); }
@Override protected T create(CreationalContext<T> creationalContext, Class<T> repositoryType) { CouchbaseOperations couchbaseOperations = getDependencyInstance(couchbaseOperationsBean, CouchbaseOperations.class); RepositoryOperationsMapping couchbaseOperationsMapping = new RepositoryOperationsMapping(couchbaseOperations); IndexManager indexManager = new IndexManager(); return create(() -> new CouchbaseRepositoryFactory(couchbaseOperationsMapping, indexManager), repositoryType); }