Skip to content

Commit 039e59d

Browse files
authored
rename a couple of package private classes to a consistent naming scheme.
Original Pull Request #1869 Closes #1868
1 parent 2709472 commit 039e59d

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@
4646
* @author Sascha Woo
4747
* @since 4.0
4848
*/
49-
abstract class AbstractDefaultIndexOperations implements IndexOperations {
49+
abstract class AbstractIndexTemplate implements IndexOperations {
5050

51-
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractDefaultIndexOperations.class);
51+
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractIndexTemplate.class);
5252

5353
protected final ElasticsearchConverter elasticsearchConverter;
5454
protected final RequestFactory requestFactory;
5555

5656
@Nullable protected final Class<?> boundClass;
5757
@Nullable private final IndexCoordinates boundIndex;
5858

59-
public AbstractDefaultIndexOperations(ElasticsearchConverter elasticsearchConverter, Class<?> boundClass) {
59+
public AbstractIndexTemplate(ElasticsearchConverter elasticsearchConverter, Class<?> boundClass) {
6060

6161
Assert.notNull(boundClass, "boundClass may not be null");
6262

@@ -66,7 +66,7 @@ public AbstractDefaultIndexOperations(ElasticsearchConverter elasticsearchConver
6666
this.boundIndex = null;
6767
}
6868

69-
public AbstractDefaultIndexOperations(ElasticsearchConverter elasticsearchConverter, IndexCoordinates boundIndex) {
69+
public AbstractIndexTemplate(ElasticsearchConverter elasticsearchConverter, IndexCoordinates boundIndex) {
7070

7171
Assert.notNull(boundIndex, "boundIndex may not be null");
7272

src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ public IndexOperations indexOps(Class<?> clazz) {
131131

132132
Assert.notNull(clazz, "clazz must not be null");
133133

134-
return new DefaultIndexOperations(this, clazz);
134+
return new RestIndexTemplate(this, clazz);
135135
}
136136

137137
@Override
138138
public IndexOperations indexOps(IndexCoordinates index) {
139139

140140
Assert.notNull(index, "index must not be null");
141141

142-
return new DefaultIndexOperations(this, index);
142+
return new RestIndexTemplate(this, index);
143143
}
144144
// endregion
145145

src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ public IndexOperations indexOps(Class<?> clazz) {
134134

135135
Assert.notNull(clazz, "clazz must not be null");
136136

137-
return new DefaultTransportIndexOperations(client, elasticsearchConverter, clazz);
137+
return new TransportIndexTemplate(client, elasticsearchConverter, clazz);
138138
}
139139

140140
@Override
141141
public IndexOperations indexOps(IndexCoordinates index) {
142142

143143
Assert.notNull(index, "index must not be null");
144144

145-
return new DefaultTransportIndexOperations(client, elasticsearchConverter, index);
145+
return new TransportIndexTemplate(client, elasticsearchConverter, index);
146146
}
147147
// endregion
148148

src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -963,12 +963,12 @@ public ElasticsearchConverter getElasticsearchConverter() {
963963

964964
@Override
965965
public ReactiveIndexOperations indexOps(IndexCoordinates index) {
966-
return new DefaultReactiveIndexOperations(this, index);
966+
return new ReactiveIndexTemplate(this, index);
967967
}
968968

969969
@Override
970970
public ReactiveIndexOperations indexOps(Class<?> clazz) {
971-
return new DefaultReactiveIndexOperations(this, clazz);
971+
return new ReactiveIndexTemplate(this, clazz);
972972
}
973973

974974
@Override
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@
6363
* @author George Popides
6464
* @since 4.1
6565
*/
66-
class DefaultReactiveIndexOperations implements ReactiveIndexOperations {
66+
class ReactiveIndexTemplate implements ReactiveIndexOperations {
6767

68-
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultReactiveIndexOperations.class);
68+
private static final Logger LOGGER = LoggerFactory.getLogger(ReactiveIndexTemplate.class);
6969

7070
@Nullable private final Class<?> boundClass;
7171
private final IndexCoordinates boundIndex;
7272
private final RequestFactory requestFactory;
7373
private final ReactiveElasticsearchOperations operations;
7474
private final ElasticsearchConverter converter;
7575

76-
public DefaultReactiveIndexOperations(ReactiveElasticsearchOperations operations, IndexCoordinates index) {
76+
public ReactiveIndexTemplate(ReactiveElasticsearchOperations operations, IndexCoordinates index) {
7777

7878
Assert.notNull(operations, "operations must not be null");
7979
Assert.notNull(index, "index must not be null");
@@ -85,7 +85,7 @@ public DefaultReactiveIndexOperations(ReactiveElasticsearchOperations operations
8585
this.boundIndex = index;
8686
}
8787

88-
public DefaultReactiveIndexOperations(ReactiveElasticsearchOperations operations, Class<?> clazz) {
88+
public ReactiveIndexTemplate(ReactiveElasticsearchOperations operations, Class<?> clazz) {
8989

9090
Assert.notNull(operations, "operations must not be null");
9191
Assert.notNull(clazz, "clazz must not be null");

src/main/java/org/springframework/data/elasticsearch/core/DefaultIndexOperations.java renamed to src/main/java/org/springframework/data/elasticsearch/core/RestIndexTemplate.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@
6464
* @author George Popides
6565
* @since 4.0
6666
*/
67-
class DefaultIndexOperations extends AbstractDefaultIndexOperations implements IndexOperations {
67+
class RestIndexTemplate extends AbstractIndexTemplate implements IndexOperations {
6868

69-
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultIndexOperations.class);
69+
private static final Logger LOGGER = LoggerFactory.getLogger(RestIndexTemplate.class);
7070

7171
private final ElasticsearchRestTemplate restTemplate;
7272

73-
public DefaultIndexOperations(ElasticsearchRestTemplate restTemplate, Class<?> boundClass) {
73+
public RestIndexTemplate(ElasticsearchRestTemplate restTemplate, Class<?> boundClass) {
7474
super(restTemplate.getElasticsearchConverter(), boundClass);
7575
this.restTemplate = restTemplate;
7676
}
7777

78-
public DefaultIndexOperations(ElasticsearchRestTemplate restTemplate, IndexCoordinates boundIndex) {
78+
public RestIndexTemplate(ElasticsearchRestTemplate restTemplate, IndexCoordinates boundIndex) {
7979
super(restTemplate.getElasticsearchConverter(), boundIndex);
8080
this.restTemplate = restTemplate;
8181
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,20 @@
6969
* @author George Popides
7070
* @since 4.0
7171
*/
72-
class DefaultTransportIndexOperations extends AbstractDefaultIndexOperations implements IndexOperations {
72+
class TransportIndexTemplate extends AbstractIndexTemplate implements IndexOperations {
7373

74-
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultTransportIndexOperations.class);
74+
private static final Logger LOGGER = LoggerFactory.getLogger(TransportIndexTemplate.class);
7575

7676
private final Client client;
7777

78-
public DefaultTransportIndexOperations(Client client, ElasticsearchConverter elasticsearchConverter,
79-
Class<?> boundClass) {
78+
public TransportIndexTemplate(Client client, ElasticsearchConverter elasticsearchConverter,
79+
Class<?> boundClass) {
8080
super(elasticsearchConverter, boundClass);
8181
this.client = client;
8282
}
8383

84-
public DefaultTransportIndexOperations(Client client, ElasticsearchConverter elasticsearchConverter,
85-
IndexCoordinates boundIndex) {
84+
public TransportIndexTemplate(Client client, ElasticsearchConverter elasticsearchConverter,
85+
IndexCoordinates boundIndex) {
8686
super(elasticsearchConverter, boundIndex);
8787
this.client = client;
8888
}

0 commit comments

Comments
 (0)