All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebeanservice.docstore.none.NoneDocStoreFactory Maven / Gradle / Ivy

There is a newer version: 15.8.1
Show newest version
package io.ebeanservice.docstore.none;

import io.ebean.DocumentStore;
import io.ebean.plugin.SpiServer;
import io.ebeaninternal.server.deploy.BeanDescriptor;
import io.ebeaninternal.server.deploy.meta.DeployBeanDescriptor;
import io.ebeanservice.docstore.api.DocStoreBeanAdapter;
import io.ebeanservice.docstore.api.DocStoreFactory;
import io.ebeanservice.docstore.api.DocStoreIntegration;
import io.ebeanservice.docstore.api.DocStoreUpdateProcessor;

/**
 * A stub implementation of DocStoreFactory that will barf if the docStore features are used.
 */
public class NoneDocStoreFactory implements DocStoreFactory {

  @Override
  public DocStoreIntegration create(SpiServer server) {
    return new NoneIntegration();
  }

  @Override
  public  DocStoreBeanAdapter createAdapter(BeanDescriptor desc, DeployBeanDescriptor deploy) {
    return new NoneDocStoreBeanAdapter<>(desc, deploy);
  }

  static class NoneIntegration implements DocStoreIntegration {

    @Override
    public DocStoreUpdateProcessor updateProcessor() {
      return new NoneDocStoreUpdateProcessor();
    }

    @Override
    public DocumentStore documentStore() {
      return new NoneDocStore();
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy