本文整理汇总了Java中org.springframework.data.repository.query.parser.AbstractQueryCreator类的典型用法代码示例。如果您正苦于以下问题:Java AbstractQueryCreator类的具体用法?Java AbstractQueryCreator怎么用?Java AbstractQueryCreator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractQueryCreator类属于org.springframework.data.repository.query.parser包,在下文中一共展示了AbstractQueryCreator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createRepositoryFactory
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的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
示例2: TarantoolRepositoryFactory
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的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
示例3: ObjectifyRepositoryFactory
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的package包/类
public ObjectifyRepositoryFactory(Class<? extends AbstractQueryCreator<?, ?>> queryCreator,
Class<? extends RepositoryQuery> repositoryQueryType,
MappingContext<?, ?> mappingContext) {
this.queryCreator = queryCreator;
this.repositoryQueryType = repositoryQueryType;
this.mappingContext = mappingContext;
}
开发者ID:nhuttrung,项目名称:spring-data-objectify,代码行数:8,代码来源:ObjectifyRepositoryFactory.java
示例4: VaultPartTreeQuery
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的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.repository.query.parser.AbstractQueryCreator; //导入依赖的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.repository.query.parser.AbstractQueryCreator; //导入依赖的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.repository.query.parser.AbstractQueryCreator; //导入依赖的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: createQuery
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的package包/类
/**
* Create a {@link KeyValueQuery} given {@link ParameterAccessor}.
*
* @param accessor must not be {@literal null}.
* @return the {@link KeyValueQuery}.
*/
public KeyValueQuery<?> createQuery(ParameterAccessor accessor) {
PartTree tree = new PartTree(getQueryMethod().getName(), getQueryMethod().getEntityInformation().getJavaType());
AbstractQueryCreator<? extends KeyValueQuery<?>, ?> queryCreator = queryCreatorFactory.queryCreatorFor(tree,
accessor);
KeyValueQuery<?> query = queryCreator.createQuery();
if (tree.isLimiting()) {
query.setRows(tree.getMaxResults());
}
return query;
}
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:21,代码来源:KeyValuePartTreeQuery.java
示例9: queryCreatorFor
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的package包/类
@Override
public AbstractQueryCreator<KeyValueQuery<?>, ?> queryCreatorFor(PartTree partTree, ParameterAccessor accessor) {
Assert.state(constructor != null,
() -> String.format("No constructor (PartTree, ParameterAccessor) could be found on type %s!", type));
return (AbstractQueryCreator<KeyValueQuery<?>, ?>) BeanUtils.instantiateClass(constructor, partTree, accessor);
}
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:8,代码来源:KeyValuePartTreeQuery.java
示例10: KeyValueRepositoryFactory
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的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
示例11: KeyValueQueryLookupStrategy
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的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
示例12: rejectsInstanceWithoutKeyValueOperations
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Test(expected = IllegalArgumentException.class) // DATAKV-123
public void rejectsInstanceWithoutKeyValueOperations() {
Class<? extends AbstractQueryCreator<?, ?>> creatorType = (Class<? extends AbstractQueryCreator<?, ?>>) mock(
AbstractQueryCreator.class).getClass();
factoryBean.setQueryCreator(creatorType);
factoryBean.afterPropertiesSet();
}
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:11,代码来源:KeyValueRepositoryFactoryBeanUnitTests.java
示例13: createsRepositoryFactory
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的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
示例14: setQueryCreator
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的package包/类
/**
* Configures the {@link AbstractQueryCreator} to be used.
*
* @param queryCreator must not be {@literal null}.
*/
public void setQueryCreator(Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {
Assert.notNull(queryCreator, "Query creator type must not be null!");
this.queryCreator = queryCreator;
}
开发者ID:nhuttrung,项目名称:spring-data-objectify,代码行数:11,代码来源:ObjectifyRepositoryFactoryBean.java
示例15: createRepositoryFactory
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的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
示例16: MyTitleRepositoryFactory
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的package包/类
public MyTitleRepositoryFactory(KeyValueOperations keyValueOperations,
Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {
super(keyValueOperations, queryCreator);
this.keyValueOperations = keyValueOperations;
}
开发者ID:hazelcast,项目名称:spring-data-hazelcast,代码行数:6,代码来源:MyTitleRepositoryFactory.java
示例17: ConstructorCachingQueryCreatorFactory
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的package包/类
ConstructorCachingQueryCreatorFactory(Class<? extends AbstractQueryCreator<?, ?>> type) {
this.type = type;
this.constructor = ClassUtils.getConstructorIfAvailable(type, PartTree.class, ParameterAccessor.class);
}
开发者ID:spring-projects,项目名称:spring-data-keyvalue,代码行数:6,代码来源:KeyValuePartTreeQuery.java
示例18: CachingKeyValuePartTreeQuery
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的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
示例19: HazelcastPartTreeQuery
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的package包/类
/**
* <P>
* Create a {@link RepositoryQuery} implementation for each query method defined in a {@link HazelcastRepository}.
* </P>
*
* @param queryMethod Method defined in {@code HazelcastRepository}
* @param evalulationContextProvider Not used
* @param keyValueOperations Interface to Hazelcast
* @param queryCreator Not used
*/
public HazelcastPartTreeQuery(QueryMethod queryMethod, EvaluationContextProvider evaluationContextProvider,
KeyValueOperations keyValueOperations, Class<? extends AbstractQueryCreator<?, ?>> queryCreator) {
super(queryMethod, evaluationContextProvider, keyValueOperations, queryCreator);
this.queryMethod = queryMethod;
this.keyValueOperations = keyValueOperations;
this.isRearrangeKnown = false;
}
开发者ID:hazelcast,项目名称:spring-data-hazelcast,代码行数:19,代码来源:HazelcastPartTreeQuery.java
示例20: createRepositoryFactory
import org.springframework.data.repository.query.parser.AbstractQueryCreator; //导入依赖的package包/类
/**
* <P>
* Return a {@link HazelcastRepositoryFactory}.
* </P>
* <P>
* {@code super} would return {@link KeyValueRepositoryFactory} which in turn builds {@link KeyValueRepository}
* instances, and these have a private method that implement querying in a manner that does not fit with Hazelcast.
* More details are in {@link HazelcastRepositoryFactory}.
* </P>
*
* @param KeyValueOperations
* @param Query Creator
* @param RepositoryQueryType, not used
* @return A {@link HazelcastRepositoryFactory} that creates {@link HazelcastRepository} instances.
*/
@Override
protected KeyValueRepositoryFactory createRepositoryFactory(KeyValueOperations operations,
Class<? extends AbstractQueryCreator<?, ?>> queryCreator, Class<? extends RepositoryQuery> repositoryQueryType) {
return new HazelcastRepositoryFactory(operations, queryCreator);
}
开发者ID:hazelcast,项目名称:spring-data-hazelcast,代码行数:22,代码来源:HazelcastRepositoryFactoryBean.java
注:本文中的org.springframework.data.repository.query.parser.AbstractQueryCreator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论