static NamedQueries findNamedQueries(Class<?> repositoryClass) { try { RepositoryConfigurationExtension config = new SnowdropRepositoryConfigExtension(); String location = config.getDefaultNamedQueryLocation(); PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(repositoryClass.getClassLoader()); ResourceArrayPropertyEditor editor = new ResourceArrayPropertyEditor(resolver, null); editor.setAsText(location); Resource[] resources = (Resource[]) editor.getValue(); PropertiesFactoryBean pfb = new PropertiesFactoryBean(); pfb.setSingleton(false); pfb.setLocations(resources); pfb.setFileEncoding("UTF-8"); Properties properties = pfb.getObject(); return new PropertiesBasedNamedQueries(properties); } catch (IOException e) { throw new IllegalStateException(e); } }
@Override public void registerBeanDefinitions(AnnotationMetadata annotationMetadata, BeanDefinitionRegistry registry) { Assert.notNull(resourceLoader, "ResourceLoader must not be null!"); Assert.notNull(annotationMetadata, "AnnotationMetadata must not be null!"); Assert.notNull(registry, "BeanDefinitionRegistry must not be null!"); // Guard against calls for sub-classes if (annotationMetadata.getAnnotationAttributes(getAnnotation().getName()) == null) { return; } MybatisAnnotationRepositoryConfigurationSource configurationSource = new MybatisAnnotationRepositoryConfigurationSource( annotationMetadata, getAnnotation(), resourceLoader, environment, registry); RepositoryConfigurationExtension extension = getExtension(); RepositoryConfigurationUtils.exposeRegistration(extension, registry, configurationSource); RepositoryConfigurationDelegate delegate = new RepositoryConfigurationDelegate( configurationSource, resourceLoader, environment); delegate.registerRepositoriesIn(registry, extension); }
@Override public void init() { RepositoryConfigurationExtension extension = new SnowdropRepositoryConfigExtension(); RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension); registerBeanDefinitionParser("repositories", parser); }
@Override public void init() { RepositoryConfigurationExtension extension = new EbeanRepositoryConfigExtension(); RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension); registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser); }
private void initMongoRepository(AnnotationMetadata annotationMetadata, BeanDefinitionRegistry registry) { AnnotationRepositoryConfigurationSource configurationSource = new LodsveAnnotationRepositoryConfigurationSource(annotationMetadata, EnableMongo.class, resourceLoader, environment); RepositoryConfigurationExtension extension = new LodsveMongoRepositoryConfigurationExtension(MONGO_TEMPLATE_BEAN_NAME); RepositoryConfigurationUtils.exposeRegistration(extension, registry, configurationSource); RepositoryConfigurationDelegate delegate = new RepositoryConfigurationDelegate(configurationSource, resourceLoader, environment); delegate.registerRepositoriesIn(registry, extension); }
@Override public void init() { RepositoryConfigurationExtension extension = new SolrRepositoryConfigExtension(); RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension); registerBeanDefinitionParser("repositories", parser); registerBeanDefinitionParser("embedded-solr-server", new EmbeddedSolrServerBeanDefinitionParser()); registerBeanDefinitionParser("solr-client", new HttpSolrClientBeanDefinitionParser()); }
@Override public void init() { RepositoryConfigurationExtension extension = new CrateRepositoryConfigExtension(); RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension); registerBeanDefinitionParser("repositories", parser); registerBeanDefinitionParser("client", new CrateClientBeanDefinitionParser()); registerBeanDefinitionParser("schema-export", new CratePersistentEntitySchemaManagerBeanDefinitionParser()); }
@Override public void init() { RepositoryConfigurationExtension extension = new SolrRepositoryConfigExtension(); RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension); registerBeanDefinitionParser("repositories", parser); registerBeanDefinitionParser("embedded-solr-server", new EmbeddedSolrServerBeanDefinitionParser()); registerBeanDefinitionParser("solr-server", new HttpSolrServerBeanDefinitionParser()); }
@Override public void init() { RepositoryConfigurationExtension extension = new SimpleDbRepositoryConfigExtension(); RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension); registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser); }
@Override protected RepositoryConfigurationExtension getExtension() { return new JdbcRepositoryConfigExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new DocumentDbRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new SpannerRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new DocumentDbRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new TarantoolRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new SnowdropRepositoryConfigExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new MultitenancyConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new MultitenancyConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new ObjectifyRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new ObjectifyRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new GcloudDatastoreRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new JdbcTemplateRepositoryConfigExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new MapDbRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new EbeanRepositoryConfigExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new TarantoolRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new MybatisRepositoryConfigExtension(resourceLoader); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new MybatisRepositoryConfigExtension(resourceLoader); }
@Override protected RepositoryConfigurationExtension getExtension() { return new VaultRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new MongoRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new Neo4jRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new JpaRepositoryConfigExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new RedisRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new CouchbaseRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new CassandraRepositoryConfigurationExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new ElasticsearchRepositoryConfigExtension(); }
@Override protected RepositoryConfigurationExtension getRepositoryConfigurationExtension() { return new SolrRepositoryConfigExtension(); }
@Override protected RepositoryConfigurationExtension getExtension() { return new ArangoDbRepositoryConfigurationExtension(); }
@Override public void init() { final RepositoryConfigurationExtension extension = new MyBatisRepositoryConfigExtension(); final RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension); registerBeanDefinitionParser(REPOSITORIES, repositoryBeanDefinitionParser); }