mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-05-31 01:02:12 +00:00
rename a couple of package private classes to a consistent naming scheme.
Original Pull Request #1869 Closes #1868
This commit is contained in:
parent
27094724dc
commit
039e59d3c2
@ -46,9 +46,9 @@ import org.springframework.util.Assert;
|
||||
* @author Sascha Woo
|
||||
* @since 4.0
|
||||
*/
|
||||
abstract class AbstractDefaultIndexOperations implements IndexOperations {
|
||||
abstract class AbstractIndexTemplate implements IndexOperations {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractDefaultIndexOperations.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractIndexTemplate.class);
|
||||
|
||||
protected final ElasticsearchConverter elasticsearchConverter;
|
||||
protected final RequestFactory requestFactory;
|
||||
@ -56,7 +56,7 @@ abstract class AbstractDefaultIndexOperations implements IndexOperations {
|
||||
@Nullable protected final Class<?> boundClass;
|
||||
@Nullable private final IndexCoordinates boundIndex;
|
||||
|
||||
public AbstractDefaultIndexOperations(ElasticsearchConverter elasticsearchConverter, Class<?> boundClass) {
|
||||
public AbstractIndexTemplate(ElasticsearchConverter elasticsearchConverter, Class<?> boundClass) {
|
||||
|
||||
Assert.notNull(boundClass, "boundClass may not be null");
|
||||
|
||||
@ -66,7 +66,7 @@ abstract class AbstractDefaultIndexOperations implements IndexOperations {
|
||||
this.boundIndex = null;
|
||||
}
|
||||
|
||||
public AbstractDefaultIndexOperations(ElasticsearchConverter elasticsearchConverter, IndexCoordinates boundIndex) {
|
||||
public AbstractIndexTemplate(ElasticsearchConverter elasticsearchConverter, IndexCoordinates boundIndex) {
|
||||
|
||||
Assert.notNull(boundIndex, "boundIndex may not be null");
|
||||
|
@ -131,7 +131,7 @@ public class ElasticsearchRestTemplate extends AbstractElasticsearchTemplate {
|
||||
|
||||
Assert.notNull(clazz, "clazz must not be null");
|
||||
|
||||
return new DefaultIndexOperations(this, clazz);
|
||||
return new RestIndexTemplate(this, clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -139,7 +139,7 @@ public class ElasticsearchRestTemplate extends AbstractElasticsearchTemplate {
|
||||
|
||||
Assert.notNull(index, "index must not be null");
|
||||
|
||||
return new DefaultIndexOperations(this, index);
|
||||
return new RestIndexTemplate(this, index);
|
||||
}
|
||||
// endregion
|
||||
|
||||
|
@ -134,7 +134,7 @@ public class ElasticsearchTemplate extends AbstractElasticsearchTemplate {
|
||||
|
||||
Assert.notNull(clazz, "clazz must not be null");
|
||||
|
||||
return new DefaultTransportIndexOperations(client, elasticsearchConverter, clazz);
|
||||
return new TransportIndexTemplate(client, elasticsearchConverter, clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -142,7 +142,7 @@ public class ElasticsearchTemplate extends AbstractElasticsearchTemplate {
|
||||
|
||||
Assert.notNull(index, "index must not be null");
|
||||
|
||||
return new DefaultTransportIndexOperations(client, elasticsearchConverter, index);
|
||||
return new TransportIndexTemplate(client, elasticsearchConverter, index);
|
||||
}
|
||||
// endregion
|
||||
|
||||
|
@ -963,12 +963,12 @@ public class ReactiveElasticsearchTemplate implements ReactiveElasticsearchOpera
|
||||
|
||||
@Override
|
||||
public ReactiveIndexOperations indexOps(IndexCoordinates index) {
|
||||
return new DefaultReactiveIndexOperations(this, index);
|
||||
return new ReactiveIndexTemplate(this, index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReactiveIndexOperations indexOps(Class<?> clazz) {
|
||||
return new DefaultReactiveIndexOperations(this, clazz);
|
||||
return new ReactiveIndexTemplate(this, clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,9 +63,9 @@ import org.springframework.util.Assert;
|
||||
* @author George Popides
|
||||
* @since 4.1
|
||||
*/
|
||||
class DefaultReactiveIndexOperations implements ReactiveIndexOperations {
|
||||
class ReactiveIndexTemplate implements ReactiveIndexOperations {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultReactiveIndexOperations.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ReactiveIndexTemplate.class);
|
||||
|
||||
@Nullable private final Class<?> boundClass;
|
||||
private final IndexCoordinates boundIndex;
|
||||
@ -73,7 +73,7 @@ class DefaultReactiveIndexOperations implements ReactiveIndexOperations {
|
||||
private final ReactiveElasticsearchOperations operations;
|
||||
private final ElasticsearchConverter converter;
|
||||
|
||||
public DefaultReactiveIndexOperations(ReactiveElasticsearchOperations operations, IndexCoordinates index) {
|
||||
public ReactiveIndexTemplate(ReactiveElasticsearchOperations operations, IndexCoordinates index) {
|
||||
|
||||
Assert.notNull(operations, "operations must not be null");
|
||||
Assert.notNull(index, "index must not be null");
|
||||
@ -85,7 +85,7 @@ class DefaultReactiveIndexOperations implements ReactiveIndexOperations {
|
||||
this.boundIndex = index;
|
||||
}
|
||||
|
||||
public DefaultReactiveIndexOperations(ReactiveElasticsearchOperations operations, Class<?> clazz) {
|
||||
public ReactiveIndexTemplate(ReactiveElasticsearchOperations operations, Class<?> clazz) {
|
||||
|
||||
Assert.notNull(operations, "operations must not be null");
|
||||
Assert.notNull(clazz, "clazz must not be null");
|
@ -64,18 +64,18 @@ import org.springframework.util.Assert;
|
||||
* @author George Popides
|
||||
* @since 4.0
|
||||
*/
|
||||
class DefaultIndexOperations extends AbstractDefaultIndexOperations implements IndexOperations {
|
||||
class RestIndexTemplate extends AbstractIndexTemplate implements IndexOperations {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultIndexOperations.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RestIndexTemplate.class);
|
||||
|
||||
private final ElasticsearchRestTemplate restTemplate;
|
||||
|
||||
public DefaultIndexOperations(ElasticsearchRestTemplate restTemplate, Class<?> boundClass) {
|
||||
public RestIndexTemplate(ElasticsearchRestTemplate restTemplate, Class<?> boundClass) {
|
||||
super(restTemplate.getElasticsearchConverter(), boundClass);
|
||||
this.restTemplate = restTemplate;
|
||||
}
|
||||
|
||||
public DefaultIndexOperations(ElasticsearchRestTemplate restTemplate, IndexCoordinates boundIndex) {
|
||||
public RestIndexTemplate(ElasticsearchRestTemplate restTemplate, IndexCoordinates boundIndex) {
|
||||
super(restTemplate.getElasticsearchConverter(), boundIndex);
|
||||
this.restTemplate = restTemplate;
|
||||
}
|
@ -69,20 +69,20 @@ import org.springframework.util.Assert;
|
||||
* @author George Popides
|
||||
* @since 4.0
|
||||
*/
|
||||
class DefaultTransportIndexOperations extends AbstractDefaultIndexOperations implements IndexOperations {
|
||||
class TransportIndexTemplate extends AbstractIndexTemplate implements IndexOperations {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultTransportIndexOperations.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TransportIndexTemplate.class);
|
||||
|
||||
private final Client client;
|
||||
|
||||
public DefaultTransportIndexOperations(Client client, ElasticsearchConverter elasticsearchConverter,
|
||||
Class<?> boundClass) {
|
||||
public TransportIndexTemplate(Client client, ElasticsearchConverter elasticsearchConverter,
|
||||
Class<?> boundClass) {
|
||||
super(elasticsearchConverter, boundClass);
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
public DefaultTransportIndexOperations(Client client, ElasticsearchConverter elasticsearchConverter,
|
||||
IndexCoordinates boundIndex) {
|
||||
public TransportIndexTemplate(Client client, ElasticsearchConverter elasticsearchConverter,
|
||||
IndexCoordinates boundIndex) {
|
||||
super(elasticsearchConverter, boundIndex);
|
||||
this.client = client;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user