Skip to content

Commit f08b24e

Browse files
authored
Expose template getScope(), getCollection() and potentiallyConvertRuntimeException. (#1317)
Closes #1310.
1 parent 7e45fa2 commit f08b24e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/org/springframework/data/couchbase/core/ReactiveCouchbaseTemplate.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors
2+
* Copyright 2012-2022 the original author or authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -165,7 +165,7 @@ public ReactiveTemplateSupport support() {
165165
*
166166
* @param ex the exception to translate
167167
*/
168-
RuntimeException potentiallyConvertRuntimeException(final RuntimeException ex) {
168+
protected RuntimeException potentiallyConvertRuntimeException(final RuntimeException ex) {
169169
RuntimeException resolved = exceptionTranslator.translateExceptionIfPossible(ex);
170170
return resolved == null ? ex : resolved;
171171
}

src/main/java/org/springframework/data/couchbase/repository/support/CouchbaseRepositoryBase.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 the original author or authors.
2+
* Copyright 2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -68,7 +68,7 @@ <S extends T> String getId(S entity) {
6868
* 1. repository.withCollection() 2. Annotation on the method
6969
*/
7070

71-
String getScope() {
71+
protected String getScope() {
7272
String fromAnnotation = OptionsBuilder.annotationString(Scope.class, CollectionIdentifier.DEFAULT_SCOPE,
7373
new AnnotatedElement[] { getJavaType(), repositoryInterface });
7474
String fromMetadata = crudMethodMetadata.getScope();
@@ -83,7 +83,7 @@ String getScope() {
8383
* This can be overriden in the operation method by<br>
8484
* 1. repository.withCollection()
8585
*/
86-
String getCollection() {
86+
protected String getCollection() {
8787
String fromAnnotation = OptionsBuilder.annotationString(Collection.class, CollectionIdentifier.DEFAULT_COLLECTION,
8888
new AnnotatedElement[] { getJavaType(), repositoryInterface });
8989
String fromMetadata = crudMethodMetadata.getCollection();

0 commit comments

Comments
 (0)