• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SolrOperations类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.data.solr.core.SolrOperations的典型用法代码示例。如果您正苦于以下问题:Java SolrOperations类的具体用法?Java SolrOperations怎么用?Java SolrOperations使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SolrOperations类属于org.springframework.data.solr.core包,在下文中一共展示了SolrOperations类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getTargetRepository

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
protected Object getTargetRepository(RepositoryMetadata metadata) {

	SolrOperations operations = this.solrOperations;
	if (factory != null) {
		SolrTemplate template = new SolrTemplate(factory);
		template.setSolrCore(SolrServerUtils.resolveSolrCoreName(metadata.getDomainType()));
		addSchemaCreationFeaturesIfEnabled(template);
		template.afterPropertiesSet();
		operations = template;
	}

	SimpleSolrRepository repository = new SimpleSolrRepository(getEntityInformation(metadata.getDomainType()),
			operations);
	repository.setEntityClass(metadata.getDomainType());

	this.templateHolder.add(metadata.getDomainType(), operations);
	return repository;
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:21,代码来源:SolrRepositoryFactory.java


示例2: resolveQuery

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
@Override
public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, NamedQueries namedQueries) {

	SolrQueryMethod queryMethod = new SolrQueryMethod(method, metadata, entityInformationCreator);
	String namedQueryName = queryMethod.getNamedQueryName();

	SolrOperations solrOperations = selectSolrOperations(metadata);

	if (namedQueries.hasQuery(namedQueryName)) {
		String namedQuery = namedQueries.getQuery(namedQueryName);
		return new StringBasedSolrQuery(namedQuery, queryMethod, solrOperations);
	} else if (queryMethod.hasAnnotatedQuery()) {
		return new StringBasedSolrQuery(queryMethod, solrOperations);
	} else {
		return new PartTreeSolrQuery(queryMethod, solrOperations);
	}
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:18,代码来源:SolrRepositoryFactory.java


示例3: AbstractSolrQuery

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
/**
 * @param solrOperations must not be null
 * @param solrQueryMethod must not be null
 */
protected AbstractSolrQuery(SolrOperations solrOperations, SolrQueryMethod solrQueryMethod) {
	Assert.notNull(solrOperations);
	Assert.notNull(solrQueryMethod);
	this.solrOperations = solrOperations;
	this.solrQueryMethod = solrQueryMethod;
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:11,代码来源:AbstractSolrQuery.java


示例4: SolrUI

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
@Autowired
public SolrUI(SolrOperations solrOperations, PostDocService postDocService, SolrSettings solrSettings, PostService postService) {
    this.solrOperations = solrOperations;
    this.postDocService = postDocService;
    this.solrSettings = solrSettings;
    this.postService = postService;
}
 
开发者ID:mintster,项目名称:nixmash-blog,代码行数:8,代码来源:SolrUI.java


示例5: SolrRepositoryFactory

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
public SolrRepositoryFactory(SolrOperations solrOperations) {
	Assert.notNull(solrOperations);

	if (solrOperations instanceof SolrTemplate) {
		addSchemaCreationFeaturesIfEnabled((SolrTemplate) solrOperations);
	}

	this.solrOperations = solrOperations;
	this.entityInformationCreator = new SolrEntityInformationCreatorImpl(solrOperations.getConverter()
			.getMappingContext());
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:12,代码来源:SolrRepositoryFactory.java


示例6: selectSolrOperations

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
private SolrOperations selectSolrOperations(RepositoryMetadata metadata) {
	SolrOperations ops = templateHolder.getSolrOperations(metadata.getDomainType());
	if (ops == null) {
		ops = solrOperations;
	}
	return ops;
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:8,代码来源:SolrRepositoryFactory.java


示例7: SimpleSolrRepository

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
/**
 * @param metadata must not be null
 * @param solrOperations must not be null
 */
public SimpleSolrRepository(SolrEntityInformation<T, ?> metadata, SolrOperations solrOperations) {
	this(solrOperations);
	Assert.notNull(metadata);

	this.entityInformation = metadata;
	setIdFieldName(this.entityInformation.getIdAttribute());
	setEntityClass(this.entityInformation.getJavaType());
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:13,代码来源:SimpleSolrRepository.java


示例8: SolrRepositoryBean

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
public SolrRepositoryBean(Bean<SolrOperations> operations, Set<Annotation> qualifiers, Class<T> repositoryType,
		BeanManager beanManager) {
	super(qualifiers, repositoryType, beanManager);

	Assert.notNull(operations, "Cannot create repository with 'null' for SolrOperations.");
	this.solrOperationsBean = operations;
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:8,代码来源:SolrRepositoryBean.java


示例9: createRepositoryBean

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
private <T> Bean<T> createRepositoryBean(Class<T> repositoryType, Set<Annotation> qualifiers, BeanManager beanManager) {
	Bean<SolrOperations> solrOperationBeans = this.solrOperationsMap.get(qualifiers.toString());

	if (solrOperationBeans == null) {
		throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s.",
				SolrOperations.class.getName(), qualifiers));
	}

	return new SolrRepositoryBean<T>(solrOperationBeans, qualifiers, repositoryType, beanManager);
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:11,代码来源:SolrRepositoryExtension.java


示例10: createSolrTemplate

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
@Produces
public SolrOperations createSolrTemplate() throws IOException, ParserConfigurationException, SAXException {

	EmbeddedSolrServerFactory factory = new EmbeddedSolrServerFactory(ResourceUtils.getURL(
			"classpath:org/springframework/data/solr").getPath());

	SolrTemplate template = new SolrTemplate(factory);
	template.afterPropertiesSet();
	return template;
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:11,代码来源:SolrTemplateProducer.java


示例11: PostDocServiceImpl

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
@Autowired
public PostDocServiceImpl(SolrOperations solrOperations, PostService postService, ApplicationSettings applicationSettings) {
    this.solrOperations = solrOperations;
    this.postService = postService;
    this.applicationSettings = applicationSettings;
}
 
开发者ID:mintster,项目名称:nixmash-blog,代码行数:7,代码来源:PostDocServiceImpl.java


示例12: solrTemplate

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
@Bean
public SolrOperations solrTemplate(SolrClient server) throws Exception {
    return new SolrTemplate(server);
}
 
开发者ID:sburroughs,项目名称:Film-Suggestion,代码行数:5,代码来源:SolrRepositoryConfig.java


示例13: solrTemplate

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
@Bean
public SolrOperations solrTemplate() {
	return new SolrTemplate(solrServer());
}
 
开发者ID:guneriu,项目名称:rich-document-catalog,代码行数:5,代码来源:SearchContext.java


示例14: PartTreeSolrQuery

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
public PartTreeSolrQuery(SolrQueryMethod method, SolrOperations solrOperations) {
	super(solrOperations, method);
	this.tree = new PartTree(method.getName(), method.getEntityInformation().getJavaType());
	this.mappingContext = solrOperations.getConverter().getMappingContext();
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:6,代码来源:PartTreeSolrQuery.java


示例15: StringBasedSolrQuery

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
public StringBasedSolrQuery(SolrQueryMethod method, SolrOperations solrOperations) {
	this(method.getAnnotatedQuery(), method, solrOperations);
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:4,代码来源:StringBasedSolrQuery.java


示例16: add

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
void add(Class<?> domainType, SolrOperations repository) {
	operationsMap.put(domainType, repository);
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:4,代码来源:SolrRepositoryFactory.java


示例17: getSolrOperations

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
SolrOperations getSolrOperations(Class<?> type) {
	return operationsMap.get(type);
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:4,代码来源:SolrRepositoryFactory.java


示例18: getSolrOperations

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
/**
 * @return SolrOperations to be used for eg. custom implementation
 */
protected SolrOperations getSolrOperations() {
	return this.operations;
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:7,代码来源:SolrRepositoryFactoryBean.java


示例19: setSolrOperations

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
public final void setSolrOperations(SolrOperations solrOperations) {
	Assert.notNull(solrOperations, "SolrOperations must not be null.");

	this.solrOperations = solrOperations;
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:6,代码来源:SimpleSolrRepository.java


示例20: getSolrOperations

import org.springframework.data.solr.core.SolrOperations; //导入依赖的package包/类
public final SolrOperations getSolrOperations() {
	return solrOperations;
}
 
开发者ID:ramaava,项目名称:spring-data-solr,代码行数:4,代码来源:SimpleSolrRepository.java



注:本文中的org.springframework.data.solr.core.SolrOperations类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DiagramColorRegistry类代码示例发布时间:2022-05-22
下一篇:
Java ValueConverter类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap