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

Java KeyValueOperations类代码示例

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

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



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

示例1: resolveQuery

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, ProjectionFactory factory,
		NamedQueries namedQueries) {

	QueryMethod queryMethod = new QueryMethod(method, metadata, factory);

	Constructor<? extends KeyValuePartTreeQuery> constructor = (Constructor<? extends KeyValuePartTreeQuery>) ClassUtils
			.getConstructorIfAvailable(this.repositoryQueryType, QueryMethod.class, EvaluationContextProvider.class,
					KeyValueOperations.class, Class.class);

	Assert.state(constructor != null,
			String.format(
					"Constructor %s(QueryMethod, EvaluationContextProvider, KeyValueOperations, Class) not available!",
					ClassUtils.getShortName(this.repositoryQueryType)));

	return BeanUtils.instantiateClass(constructor, queryMethod, evaluationContextProvider, this.keyValueOperations,
			this.queryCreator);
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:20,代码来源:KeyValueRepositoryFactory.java


示例2: createRepositoryFactory

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
@Override
protected TarantoolRepositoryFactory createRepositoryFactory(
        KeyValueOperations operations,
        Class<? extends AbstractQueryCreator<?, ?>> queryCreator,
        Class<? extends RepositoryQuery> repositoryQueryType
) {
    return new TarantoolRepositoryFactory(operations, queryCreator, repositoryQueryType);
}
 
开发者ID:saladinkzn,项目名称:spring-data-tarantool,代码行数:9,代码来源:TarantoolRepositoryFactoryBean.java


示例3: TarantoolRepositoryFactory

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
public TarantoolRepositoryFactory(
        KeyValueOperations keyValueOperations,
        Class<? extends AbstractQueryCreator<?, ?>> queryCreator,
        Class<? extends RepositoryQuery> repositoryQueryType
) {
    super(keyValueOperations, queryCreator, repositoryQueryType);
    this.keyValueOperations = keyValueOperations;
}
 
开发者ID:saladinkzn,项目名称:spring-data-tarantool,代码行数:9,代码来源:TarantoolRepositoryFactory.java


示例4: VaultPartTreeQuery

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
/**
 * Creates a new {@link VaultPartTreeQuery} for the given {@link QueryMethod},
 * {@link EvaluationContextProvider}, {@link KeyValueOperations} and query creator
 * type.
 *
 * @param queryMethod must not be {@literal null}.
 * @param evaluationContextProvider must not be {@literal null}.
 * @param keyValueOperations must not be {@literal null}.
 * @param queryCreator must not be {@literal null}.
 */
@SuppressWarnings("unchecked")
public VaultPartTreeQuery(QueryMethod queryMethod,
		EvaluationContextProvider evaluationContextProvider,
		KeyValueOperations keyValueOperations,
		Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {

	super(queryMethod, evaluationContextProvider, keyValueOperations,
			new VaultQueryCreatorFactory(
					(MappingContext) keyValueOperations.getMappingContext()));
}
 
开发者ID:spring-projects,项目名称:spring-vault,代码行数:21,代码来源:VaultPartTreeQuery.java


示例5: VaultRepositoryFactory

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
public VaultRepositoryFactory(KeyValueOperations keyValueOperations,
		Class<? extends AbstractQueryCreator<?, ?>> queryCreator,
		Class<? extends RepositoryQuery> repositoryQueryType) {
	super(keyValueOperations, queryCreator, repositoryQueryType);

	this.operations = keyValueOperations;
}
 
开发者ID:spring-projects,项目名称:spring-vault,代码行数:8,代码来源:VaultRepositoryFactory.java


示例6: createRepositoryFactory

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
@Override
protected VaultRepositoryFactory createRepositoryFactory(
		KeyValueOperations operations,
		Class<? extends AbstractQueryCreator<?, ?>> queryCreator,
		Class<? extends RepositoryQuery> repositoryQueryType) {

	return new VaultRepositoryFactory(operations, queryCreator, repositoryQueryType);
}
 
开发者ID:spring-projects,项目名称:spring-vault,代码行数:9,代码来源:VaultRepositoryFactoryBean.java


示例7: HazelcastRepositoryFactory

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
public HazelcastRepositoryFactory(KeyValueOperations keyValueOperations,
		Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {

	super(keyValueOperations, queryCreator);

	this.keyValueOperations = keyValueOperations;
	this.queryCreator = queryCreator;
}
 
开发者ID:hazelcast,项目名称:spring-data-hazelcast,代码行数:9,代码来源:HazelcastRepositoryFactory.java


示例8: KeyValuePartTreeQuery

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
/**
 * Creates a new {@link KeyValuePartTreeQuery} for the given {@link QueryMethod}, {@link EvaluationContextProvider},
 * {@link KeyValueOperations} using the given {@link QueryCreatorFactory} producing the {@link AbstractQueryCreator}
 * in charge of altering the query.
 *
 * @param queryMethod must not be {@literal null}.
 * @param evaluationContextProvider must not be {@literal null}.
 * @param keyValueOperations must not be {@literal null}.
 * @param queryCreatorFactory must not be {@literal null}.
 * @since 2.0
 */
public KeyValuePartTreeQuery(QueryMethod queryMethod, EvaluationContextProvider evaluationContextProvider,
		KeyValueOperations keyValueOperations, QueryCreatorFactory queryCreatorFactory) {

	Assert.notNull(queryMethod, "Query method must not be null!");
	Assert.notNull(evaluationContextProvider, "EvaluationContextprovider must not be null!");
	Assert.notNull(keyValueOperations, "KeyValueOperations must not be null!");
	Assert.notNull(queryCreatorFactory, "QueryCreatorFactory type must not be null!");

	this.queryMethod = queryMethod;
	this.keyValueOperations = keyValueOperations;
	this.evaluationContextProvider = evaluationContextProvider;
	this.queryCreatorFactory = queryCreatorFactory;
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:25,代码来源:KeyValuePartTreeQuery.java


示例9: SimpleKeyValueRepository

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
/**
 * Creates a new {@link SimpleKeyValueRepository} for the given {@link EntityInformation} and
 * {@link KeyValueOperations}.
 *
 * @param metadata must not be {@literal null}.
 * @param operations must not be {@literal null}.
 */
public SimpleKeyValueRepository(EntityInformation<T, ID> metadata, KeyValueOperations operations) {

	Assert.notNull(metadata, "EntityInformation must not be null!");
	Assert.notNull(operations, "KeyValueOperations must not be null!");

	this.entityInformation = metadata;
	this.operations = operations;
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:16,代码来源:SimpleKeyValueRepository.java


示例10: QuerydslKeyValueRepository

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
/**
 * Creates a new {@link QuerydslKeyValueRepository} for the given {@link EntityInformation},
 * {@link KeyValueOperations} and {@link EntityPathResolver}.
 *
 * @param entityInformation must not be {@literal null}.
 * @param operations must not be {@literal null}.
 * @param resolver must not be {@literal null}.
 */
public QuerydslKeyValueRepository(EntityInformation<T, ID> entityInformation, KeyValueOperations operations,
		EntityPathResolver resolver) {

	super(entityInformation, operations);

	Assert.notNull(resolver, "EntityPathResolver must not be null!");

	EntityPath<T> path = resolver.createPath(entityInformation.getJavaType());
	this.builder = new PathBuilder<>(path.getType(), path.getMetadata());
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:19,代码来源:QuerydslKeyValueRepository.java


示例11: KeyValueRepositoryFactory

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
/**
 * Creates a new {@link KeyValueRepositoryFactory} for the given {@link KeyValueOperations} and
 * {@link AbstractQueryCreator}-type.
 *
 * @param keyValueOperations must not be {@literal null}.
 * @param queryCreator must not be {@literal null}.
 * @param repositoryQueryType must not be {@literal null}.
 * @since 1.1
 */
public KeyValueRepositoryFactory(KeyValueOperations keyValueOperations,
		Class<? extends AbstractQueryCreator<?, ?>> queryCreator, Class<? extends RepositoryQuery> repositoryQueryType) {

	Assert.notNull(keyValueOperations, "KeyValueOperations must not be null!");
	Assert.notNull(queryCreator, "Query creator type must not be null!");
	Assert.notNull(repositoryQueryType, "RepositoryQueryType type must not be null!");

	this.queryCreator = queryCreator;
	this.keyValueOperations = keyValueOperations;
	this.context = keyValueOperations.getMappingContext();
	this.repositoryQueryType = repositoryQueryType;
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:22,代码来源:KeyValueRepositoryFactory.java


示例12: KeyValueQueryLookupStrategy

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
/**
 * @param key
 * @param evaluationContextProvider
 * @param keyValueOperations
 * @param queryCreator
 * @since 1.1
 */
public KeyValueQueryLookupStrategy(@Nullable Key key, EvaluationContextProvider evaluationContextProvider,
		KeyValueOperations keyValueOperations, Class<? extends AbstractQueryCreator<?, ?>> queryCreator,
		Class<? extends RepositoryQuery> repositoryQueryType) {

	Assert.notNull(evaluationContextProvider, "EvaluationContextProvider must not be null!");
	Assert.notNull(keyValueOperations, "KeyValueOperations must not be null!");
	Assert.notNull(queryCreator, "Query creator type must not be null!");
	Assert.notNull(repositoryQueryType, "RepositoryQueryType type must not be null!");

	this.evaluationContextProvider = evaluationContextProvider;
	this.keyValueOperations = keyValueOperations;
	this.queryCreator = queryCreator;
	this.repositoryQueryType = repositoryQueryType;
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:22,代码来源:KeyValueRepositoryFactory.java


示例13: setup

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
@Before
public void setup() {

	KeyValueOperations operations = new KeyValueTemplate(new MapKeyValueAdapter());
	KeyValueRepositoryFactory keyValueRepositoryFactory = createKeyValueRepositoryFactory(operations);

	this.repository = getRepository(keyValueRepositoryFactory);
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:9,代码来源:AbstractRepositoryUnitTests.java


示例14: createsRepositoryFactory

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
@Test // DATAKV-123
@SuppressWarnings("unchecked")
public void createsRepositoryFactory() {

	Class<? extends AbstractQueryCreator<?, ?>> creatorType = (Class<? extends AbstractQueryCreator<?, ?>>) mock(
			AbstractQueryCreator.class).getClass();
	Class<? extends RepositoryQuery> queryType = mock(KeyValuePartTreeQuery.class).getClass();

	factoryBean.setQueryCreator(creatorType);
	factoryBean.setKeyValueOperations(mock(KeyValueOperations.class));
	factoryBean.setQueryType(queryType);

	assertThat(factoryBean.createRepositoryFactory(), is(notNullValue()));
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:15,代码来源:KeyValueRepositoryFactoryBeanUnitTests.java


示例15: SimpleMapDbRepository

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
public SimpleMapDbRepository(EntityInformation<T, ID> metadata, KeyValueOperations operations) {
	super(metadata, operations);
}
 
开发者ID:mrfrag,项目名称:spring-data-mapdb,代码行数:4,代码来源:SimpleMapDbRepository.java


示例16: SimpleHazelcastRepository

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
public SimpleHazelcastRepository(EntityInformation<T, ID> metadata, KeyValueOperations operations) {
	super(metadata, operations);
}
 
开发者ID:hazelcast,项目名称:spring-data-hazelcast,代码行数:4,代码来源:SimpleHazelcastRepository.java


示例17: MyTitleRepositoryImpl

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
public MyTitleRepositoryImpl(EntityInformation<T, ID> metadata, KeyValueOperations keyValueOperations) {
	super(metadata, keyValueOperations);
}
 
开发者ID:hazelcast,项目名称:spring-data-hazelcast,代码行数:4,代码来源:MyTitleRepositoryImpl.java


示例18: createRepositoryFactory

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
@Override
protected MyTitleRepositoryFactory createRepositoryFactory(KeyValueOperations operations,
		Class<? extends AbstractQueryCreator<?, ?>> queryCreator, Class<? extends RepositoryQuery> repositoryQueryType) {

	return new MyTitleRepositoryFactory(operations, queryCreator);
}
 
开发者ID:hazelcast,项目名称:spring-data-hazelcast,代码行数:7,代码来源:MyTitleRepositoryFactoryBean.java


示例19: MyTitleRepositoryFactory

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
public MyTitleRepositoryFactory(KeyValueOperations keyValueOperations,
		Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {
	super(keyValueOperations, queryCreator);
	this.keyValueOperations = keyValueOperations;
}
 
开发者ID:hazelcast,项目名称:spring-data-hazelcast,代码行数:6,代码来源:MyTitleRepositoryFactory.java


示例20: CachingKeyValuePartTreeQuery

import org.springframework.data.keyvalue.core.KeyValueOperations; //导入依赖的package包/类
public CachingKeyValuePartTreeQuery(QueryMethod queryMethod, EvaluationContextProvider evaluationContextProvider,
		KeyValueOperations keyValueOperations, Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {
	super(queryMethod, evaluationContextProvider, keyValueOperations, queryCreator);
}
 
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:5,代码来源:CachingKeyValuePartTreeQuery.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java FindBundle类代码示例发布时间:2022-05-22
下一篇:
Java Worker类代码示例发布时间: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