DATAKV-170 - Fix KeyValue.getCriteria() method name.
Introduce KeyValue.getCriteria() method and deprecate KeyValue.getCritieria() for later removal. Use fixed method in affected classes.
This commit is contained in:
@@ -216,7 +216,7 @@ public class KeyValueTemplateUnitTests {
|
||||
verify(adapterMock, times(1)).find(captor.capture(), eq(Foo.class.getName()), eq(Foo.class));
|
||||
assertThat(captor.getValue().getOffset(), is(1L));
|
||||
assertThat(captor.getValue().getRows(), is(5));
|
||||
assertThat(captor.getValue().getCritieria(), nullValue());
|
||||
assertThat(captor.getValue().getCriteria(), nullValue());
|
||||
}
|
||||
|
||||
@Test // DATACMNS-525
|
||||
|
||||
@@ -99,7 +99,7 @@ public class SpelQueryEngineUnitTests {
|
||||
SpelQueryCreator creator = new SpelQueryCreator(partTree, new ParametersParameterAccessor(
|
||||
new QueryMethod(method, metadata, new SpelAwareProxyProjectionFactory()).getParameters(), args));
|
||||
|
||||
return new SpelCriteria(creator.createQuery().getCritieria(), new StandardEvaluationContext(args));
|
||||
return new SpelCriteria(creator.createQuery().getCriteria(), new StandardEvaluationContext(args));
|
||||
}
|
||||
|
||||
static interface PersonRepository {
|
||||
|
||||
@@ -68,8 +68,8 @@ public class CachingKeyValuePartTreeQueryUnitTests {
|
||||
|
||||
Object[] args = new Object[] { "foo" };
|
||||
|
||||
SpelCriteria first = (SpelCriteria) query.prepareQuery(args).getCritieria();
|
||||
SpelCriteria second = (SpelCriteria) query.prepareQuery(args).getCritieria();
|
||||
SpelCriteria first = (SpelCriteria) query.prepareQuery(args).getCriteria();
|
||||
SpelCriteria second = (SpelCriteria) query.prepareQuery(args).getCriteria();
|
||||
|
||||
assertThat(first.getExpression(), sameInstance(second.getExpression()));
|
||||
assertThat(first.getContext(), not(sameInstance(second.getContext())));
|
||||
|
||||
@@ -64,8 +64,8 @@ public class KeyValuePartTreeQueryUnitTests {
|
||||
|
||||
Object[] args = new Object[] { "foo" };
|
||||
|
||||
Object first = query.prepareQuery(args).getCritieria();
|
||||
Object second = query.prepareQuery(args).getCritieria();
|
||||
Object first = query.prepareQuery(args).getCriteria();
|
||||
Object second = query.prepareQuery(args).getCriteria();
|
||||
|
||||
assertThat(first, not(sameInstance(second)));
|
||||
}
|
||||
@@ -121,9 +121,9 @@ public class KeyValuePartTreeQueryUnitTests {
|
||||
|
||||
KeyValueQuery<?> query = partTreeQuery.prepareQuery(new Object[] { "firstname" });
|
||||
|
||||
assertThat(query.getCritieria(), is(notNullValue()));
|
||||
assertThat(query.getCritieria(), IsInstanceOf.instanceOf(SpelCriteria.class));
|
||||
assertThat(((SpelCriteria) query.getCritieria()).getExpression().getExpressionString(),
|
||||
assertThat(query.getCriteria(), is(notNullValue()));
|
||||
assertThat(query.getCriteria(), IsInstanceOf.instanceOf(SpelCriteria.class));
|
||||
assertThat(((SpelCriteria) query.getCriteria()).getExpression().getExpressionString(),
|
||||
is("#it?.firstname?.equals([0])"));
|
||||
assertThat(query.getRows(), is(3));
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ public class SpelQueryCreatorUnitTests {
|
||||
}
|
||||
|
||||
private Evaluation evaluate(String methodName, Object... args) throws Exception {
|
||||
return new Evaluation((SpelExpression) createQueryForMethodWithArgs(methodName, args).getCritieria());
|
||||
return new Evaluation((SpelExpression) createQueryForMethodWithArgs(methodName, args).getCriteria());
|
||||
}
|
||||
|
||||
private KeyValueQuery<SpelExpression> createQueryForMethodWithArgs(String methodName, Object... args)
|
||||
@@ -329,7 +329,7 @@ public class SpelQueryCreatorUnitTests {
|
||||
new QueryMethod(method, metadataMock, new SpelAwareProxyProjectionFactory()).getParameters(), args));
|
||||
|
||||
KeyValueQuery<SpelExpression> q = creator.createQuery();
|
||||
q.getCritieria().setEvaluationContext(new StandardEvaluationContext(args));
|
||||
q.getCriteria().setEvaluationContext(new StandardEvaluationContext(args));
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user