/** * Create an {@link IndexManager} that allows index creation. * * @return */ @Bean(name = BeanNames.COUCHBASE_INDEX_MANAGER) public IndexManager indexManager() { return new IndexManager(true, true, false); }
/** * Returns a factory instance. * * @return the factory instance. */ @Override protected RepositoryFactorySupport createRepositoryFactory() { return getFactoryInstance(operationsMapping, indexManager); }
/** * Get the factory instance for the operations. * * @param operationsMapping the reference to the template. * @param indexManager the reference to the {@link IndexManager}. * @return the factory instance. */ protected CouchbaseRepositoryFactory getFactoryInstance(final RepositoryOperationsMapping operationsMapping, IndexManager indexManager) { return new CouchbaseRepositoryFactory(operationsMapping, indexManager); }
@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); }
/** * Returns a factory instance. * * @return the factory instance. */ @Override protected RepositoryFactorySupport createRepositoryFactory() { return getFactoryInstance(couchbaseOperationsMapping, indexManager); }
/** * Get the factory instance for the operations. * * @param couchbaseOperationsMapping the reference to the template. * @param indexManager the reference to the {@link IndexManager}. * @return the factory instance. */ protected ReactiveCouchbaseRepositoryFactory getFactoryInstance(final ReactiveRepositoryOperationsMapping couchbaseOperationsMapping, IndexManager indexManager) { return new ReactiveCouchbaseRepositoryFactory(couchbaseOperationsMapping, indexManager); }
/** * Set the template reference. * * @param operations the reference to the operations template. */ public void setCouchbaseOperations(final CouchbaseOperations operations) { setCouchbaseOperationsMapping(new RepositoryOperationsMapping(operations)); }
/** * Set the template reference. * * @param couchbaseOperationsMapping the reference to the operations template. */ public void setCouchbaseOperations(final RxJavaCouchbaseOperations couchbaseOperationsMapping) { setCouchbaseOperationsMapping(new ReactiveRepositoryOperationsMapping(couchbaseOperationsMapping)); }
public void setCouchbaseOperationsMapping(final ReactiveRepositoryOperationsMapping couchbaseOperationsMapping) { this.couchbaseOperationsMapping = couchbaseOperationsMapping; setMappingContext(couchbaseOperationsMapping.getMappingContext()); }
@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); }
/** * Create an {@link IndexManager} that allows index creation. * * @return */ @Bean(name = BeanNames.COUCHBASE_INDEX_MANAGER) public IndexManager indexManager() { return new IndexManager(true, true, false); }
/** * Returns a factory instance. * * @return the factory instance. */ @Override protected RepositoryFactorySupport createRepositoryFactory() { return getFactoryInstance(operationsMapping, indexManager); }
/** * Get the factory instance for the operations. * * @param operationsMapping the reference to the template. * @param indexManager the reference to the {@link IndexManager}. * @return the factory instance. */ protected CouchbaseRepositoryFactory getFactoryInstance(final RepositoryOperationsMapping operationsMapping, IndexManager indexManager) { return new CouchbaseRepositoryFactory(operationsMapping, indexManager); }
/** * Returns a factory instance. * * @return the factory instance. */ @Override protected RepositoryFactorySupport createRepositoryFactory() { return getFactoryInstance(couchbaseOperationsMapping, indexManager); }
/** * Get the factory instance for the operations. * * @param couchbaseOperationsMapping the reference to the template. * @param indexManager the reference to the {@link IndexManager}. * @return the factory instance. */ protected ReactiveCouchbaseRepositoryFactory getFactoryInstance(final ReactiveRepositoryOperationsMapping couchbaseOperationsMapping, IndexManager indexManager) { return new ReactiveCouchbaseRepositoryFactory(couchbaseOperationsMapping, indexManager); }
/** * Set the template reference. * * @param operations the reference to the operations template. */ public void setCouchbaseOperations(final CouchbaseOperations operations) { setCouchbaseOperationsMapping(new RepositoryOperationsMapping(operations)); }
/** * Set the template reference. * * @param couchbaseOperationsMapping the reference to the operations template. */ public void setCouchbaseOperations(final RxJavaCouchbaseOperations couchbaseOperationsMapping) { setCouchbaseOperationsMapping(new ReactiveRepositoryOperationsMapping(couchbaseOperationsMapping)); }
@Override public IndexManager indexManager() { return new IndexManager(); }