@Test(expected=IllegalStateException.class) public void shouldFailAssertionOnNullQuery() throws Exception { try { new ElasticsearchItemReader<Object>(elasticsearchOperations, null, null).afterPropertiesSet(); fail("Assertion shold have thrown exception on null Query"); }catch(IllegalStateException e) { assertEquals("A query is required.", e.getMessage()); throw e; } }
@Override public void afterPropertiesSet() throws Exception { state(elasticsearchOperations != null, "An ElasticsearchOperations implementation is required."); state(query != null, "A query is required."); state(targetType != null, "A target type to convert the input into is required."); }
ElasticsearchItemReader extends AbstractPaginatedDataItemReader<T> implements InitializingBean { @Override public void afterPropertiesSet() throws Exception { state(elasticsearchOperations != null, "An ElasticsearchOperations implementation is required."); state(query != null, "A query is required."); state(targetType != null, "A target type to convert the input into is required."); } }
ElasticsearchItemReader extends AbstractPaginatedDataItemReader<T> implements InitializingBean { @Override public void afterPropertiesSet() throws Exception { state(elasticsearchOperations != null, "An ElasticsearchOperations implementation is required."); state(query != null, "A query is required."); state(targetType != null, "A target type to convert the input into is required."); } ElasticsearchItemReader(ElasticsearchOperations elasticsearchOperations, SearchQuery query, Class<? extends T> targetType); }
ElasticsearchItemReader extends AbstractPaginatedDataItemReader<T> implements InitializingBean { @Override public void afterPropertiesSet() throws Exception { state(elasticsearchOperations != null, "An ElasticsearchOperations implementation is required."); state(query != null, "A query is required."); state(targetType != null, "A target type to convert the input into is required."); } ElasticsearchItemReader(ElasticsearchOperations elasticsearchOperations, SearchQuery query, Class<? extends T> targetType); @Override void afterPropertiesSet(); }
ElasticsearchItemReader extends AbstractPaginatedDataItemReader<T> implements InitializingBean { @Override public void afterPropertiesSet() throws Exception { state(elasticsearchOperations != null, "An ElasticsearchOperations implementation is required."); state(query != null, "A query is required."); state(targetType != null, "A target type to convert the input into is required."); } ElasticsearchItemReader(ElasticsearchOperations elasticsearchOperations, SearchQuery query, Class<? extends T> targetType); @Override void afterPropertiesSet();  }