Skip to content

Commit 155663e

Browse files
authored
Add missing hooks for callbacks. (#1142)
1) the previous change (#955) to CouchbaseAuditingRegister intended to register AuditingEntityCallback instead of AuditingEventListener but only changed the name that AuditingEventListener was registered with. Since AuditingEventListener does exactly the same thing as AuditingEntityCallback, it behaved as those AuditingEntityCallback was being used. 2) It seems that the two mechanisms - EntityCallback and EventListener both do more-or-less the same thing. I'm not sure why there are two mechanisms to do the same thing. 3) Although the ReactiveAuditingEntityCallback mechanism is triggered only for reactive operations and the non-reactive AuditingEntityCallback is triggered only for non-reactive operations, the events are triggered for both. Since there was a desire to have distinct callbacks for reactive/non-reactive operations, I also made distinct events for reactive/non-reactive operations. However both the reactive and non-reactive event mechanisms are triggered for either reactive and non-reactive operations, so it is necessary for the mechanism to determine if it should act on the event. 4) Although there is an AbstractCouchbaseEventListener that is extended by LoggingEventListener and ValidatingEventListener, AuditingEventListener does not extend it (maybe it should). Closes #1074. Co-authored-by: mikereiche <[email protected]>
1 parent 67a7937 commit 155663e

28 files changed

+751
-112
lines changed

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

+10-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentEntity;
2727
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty;
2828
import org.springframework.data.couchbase.core.mapping.event.AfterConvertCallback;
29+
import org.springframework.data.couchbase.core.mapping.event.AfterSaveEvent;
2930
import org.springframework.data.couchbase.core.mapping.event.BeforeConvertCallback;
3031
import org.springframework.data.couchbase.core.mapping.event.BeforeConvertEvent;
3132
import org.springframework.data.couchbase.core.mapping.event.BeforeSaveEvent;
@@ -95,16 +96,21 @@ public <T> T decodeEntity(String id, String source, long cas, Class<T> entityCla
9596
}
9697

9798
@Override
98-
public Object applyUpdatedCas(final Object entity, final long cas) {
99+
public Object applyUpdatedCas(final Object entity, CouchbaseDocument converted, final long cas) {
100+
Object returnValue;
99101
final ConvertingPropertyAccessor<Object> accessor = getPropertyAccessor(entity);
100102
final CouchbasePersistentEntity<?> persistentEntity = mappingContext.getRequiredPersistentEntity(entity.getClass());
101103
final CouchbasePersistentProperty versionProperty = persistentEntity.getVersionProperty();
102104

103105
if (versionProperty != null) {
104106
accessor.setProperty(versionProperty, cas);
105-
return accessor.getBean();
107+
returnValue = accessor.getBean();
108+
} else {
109+
returnValue = entity;
106110
}
107-
return entity;
111+
maybeEmitEvent(new AfterSaveEvent(returnValue, converted));
112+
113+
return returnValue;
108114
}
109115

110116
@Override
@@ -172,7 +178,7 @@ public void setEntityCallbacks(EntityCallbacks entityCallbacks) {
172178
this.entityCallbacks = entityCallbacks;
173179
}
174180

175-
void maybeEmitEvent(CouchbaseMappingEvent<?> event) {
181+
public void maybeEmitEvent(CouchbaseMappingEvent<?> event) {
176182
if (canPublishEvent()) {
177183
try {
178184
this.applicationContext.publishEvent(event);

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
1919

20+
import org.springframework.data.couchbase.core.mapping.event.CouchbaseMappingEvent;
2021
import reactor.core.publisher.Mono;
2122

2223
/**
@@ -44,8 +45,8 @@ public <T> Mono<T> decodeEntity(String id, String source, long cas, Class<T> ent
4445
}
4546

4647
@Override
47-
public Mono<Object> applyUpdatedCas(Object entity, long cas) {
48-
return Mono.fromSupplier(() -> support.applyUpdatedCas(entity, cas));
48+
public Mono<Object> applyUpdatedCas(Object entity, CouchbaseDocument converted, long cas) {
49+
return Mono.fromSupplier(() -> support.applyUpdatedCas(entity, converted, cas));
4950
}
5051

5152
@Override
@@ -62,4 +63,9 @@ public Long getCas(Object entity) {
6263
public String getJavaNameForEntity(Class<?> clazz) {
6364
return support.getJavaNameForEntity(clazz);
6465
}
66+
67+
@Override
68+
public void maybeEmitEvent(CouchbaseMappingEvent<?> event) {
69+
support.maybeEmitEvent(event);
70+
}
6571
}

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

+26-21
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
package org.springframework.data.couchbase.core;
1818

19+
import org.springframework.data.couchbase.core.mapping.event.AfterSaveEvent;
20+
import org.springframework.data.couchbase.core.mapping.event.ReactiveAfterSaveEvent;
21+
import reactor.core.publisher.Mono;
22+
1923
import org.slf4j.Logger;
2024
import org.slf4j.LoggerFactory;
2125
import org.springframework.beans.BeansException;
@@ -26,19 +30,18 @@
2630
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
2731
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentEntity;
2832
import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty;
29-
import org.springframework.data.couchbase.core.mapping.event.BeforeConvertEvent;
30-
import org.springframework.data.couchbase.core.mapping.event.BeforeSaveEvent;
3133
import org.springframework.data.couchbase.core.mapping.event.CouchbaseMappingEvent;
3234
import org.springframework.data.couchbase.core.mapping.event.ReactiveAfterConvertCallback;
3335
import org.springframework.data.couchbase.core.mapping.event.ReactiveBeforeConvertCallback;
36+
import org.springframework.data.couchbase.core.mapping.event.ReactiveBeforeConvertEvent;
37+
import org.springframework.data.couchbase.core.mapping.event.ReactiveBeforeSaveEvent;
3438
import org.springframework.data.couchbase.repository.support.MappingCouchbaseEntityInformation;
3539
import org.springframework.data.mapping.PersistentPropertyAccessor;
3640
import org.springframework.data.mapping.callback.EntityCallbacks;
3741
import org.springframework.data.mapping.callback.ReactiveEntityCallbacks;
3842
import org.springframework.data.mapping.context.MappingContext;
3943
import org.springframework.data.mapping.model.ConvertingPropertyAccessor;
4044
import org.springframework.util.Assert;
41-
import reactor.core.publisher.Mono;
4245

4346
/**
4447
* Internal encode/decode support for {@link ReactiveCouchbaseTemplate}.
@@ -65,16 +68,13 @@ public ReactiveCouchbaseTemplateSupport(final CouchbaseConverter converter,
6568

6669
@Override
6770
public Mono<CouchbaseDocument> encodeEntity(final Object entityToEncode) {
68-
return Mono.just(entityToEncode)
69-
.doOnNext(entity -> maybeEmitEvent(new BeforeConvertEvent<>(entity)))
70-
.flatMap(entity -> maybeCallBeforeConvert(entity, ""))
71-
.map(maybeNewEntity -> {
71+
return Mono.just(entityToEncode).doOnNext(entity -> maybeEmitEvent(new ReactiveBeforeConvertEvent<>(entity)))
72+
.flatMap(entity -> maybeCallBeforeConvert(entity, "")).map(maybeNewEntity -> {
7273
final CouchbaseDocument converted = new CouchbaseDocument();
7374
converter.write(maybeNewEntity, converted);
7475
return converted;
75-
})
76-
.flatMap(converted -> maybeCallAfterConvert(entityToEncode, converted, "").thenReturn(converted))
77-
.doOnNext(converted -> maybeEmitEvent(new BeforeSaveEvent<>(entityToEncode, converted)));
76+
}).flatMap(converted -> maybeCallAfterConvert(entityToEncode, converted, "").thenReturn(converted))
77+
.doOnNext(converted -> maybeEmitEvent(new ReactiveBeforeSaveEvent<>(entityToEncode, converted)));
7878
}
7979

8080
@Override
@@ -98,25 +98,31 @@ public <T> Mono<T> decodeEntity(String id, String source, long cas, Class<T> ent
9898
}
9999

100100
@Override
101-
public Mono<Object> applyUpdatedCas(final Object entity, final long cas) {
101+
public Mono<Object> applyUpdatedCas(final Object entity, CouchbaseDocument converted, final long cas) {
102102
return Mono.fromSupplier(() -> {
103+
Object returnValue;
103104
final ConvertingPropertyAccessor<Object> accessor = getPropertyAccessor(entity);
104-
final CouchbasePersistentEntity<?> persistentEntity = mappingContext.getRequiredPersistentEntity(entity.getClass());
105+
final CouchbasePersistentEntity<?> persistentEntity = mappingContext
106+
.getRequiredPersistentEntity(entity.getClass());
105107
final CouchbasePersistentProperty versionProperty = persistentEntity.getVersionProperty();
106108

107109
if (versionProperty != null) {
108110
accessor.setProperty(versionProperty, cas);
109-
return accessor.getBean();
111+
returnValue = accessor.getBean();
112+
} else {
113+
returnValue = entity;
110114
}
111-
return entity;
115+
maybeEmitEvent(new ReactiveAfterSaveEvent(returnValue, converted));
116+
return returnValue;
112117
});
113118
}
114119

115120
@Override
116121
public Mono<Object> applyUpdatedId(final Object entity, Object id) {
117122
return Mono.fromSupplier(() -> {
118123
final ConvertingPropertyAccessor<Object> accessor = getPropertyAccessor(entity);
119-
final CouchbasePersistentEntity<?> persistentEntity = mappingContext.getRequiredPersistentEntity(entity.getClass());
124+
final CouchbasePersistentEntity<?> persistentEntity = mappingContext
125+
.getRequiredPersistentEntity(entity.getClass());
120126
final CouchbasePersistentProperty idProperty = persistentEntity.getIdProperty();
121127

122128
if (idProperty != null) {
@@ -130,8 +136,7 @@ public Mono<Object> applyUpdatedId(final Object entity, Object id) {
130136
@Override
131137
public Long getCas(final Object entity) {
132138
final ConvertingPropertyAccessor<Object> accessor = getPropertyAccessor(entity);
133-
final CouchbasePersistentEntity<?> persistentEntity = mappingContext
134-
.getRequiredPersistentEntity(entity.getClass());
139+
final CouchbasePersistentEntity<?> persistentEntity = mappingContext.getRequiredPersistentEntity(entity.getClass());
135140
final CouchbasePersistentProperty versionProperty = persistentEntity.getVersionProperty();
136141

137142
long cas = 0;
@@ -166,9 +171,9 @@ public void setApplicationContext(ApplicationContext applicationContext) throws
166171
}
167172

168173
/**
169-
* Set the {@link ReactiveEntityCallbacks} instance to use when invoking {@link
170-
* org.springframework.data.mapping.callback.ReactiveEntityCallbacks callbacks} like the {@link
171-
* ReactiveBeforeConvertCallback}.
174+
* Set the {@link ReactiveEntityCallbacks} instance to use when invoking
175+
* {@link org.springframework.data.mapping.callback.ReactiveEntityCallbacks callbacks} like the
176+
* {@link ReactiveBeforeConvertCallback}.
172177
* <p/>
173178
* Overrides potentially existing {@link EntityCallbacks}.
174179
*
@@ -180,7 +185,7 @@ public void setReactiveEntityCallbacks(ReactiveEntityCallbacks reactiveEntityCal
180185
this.reactiveEntityCallbacks = reactiveEntityCallbacks;
181186
}
182187

183-
void maybeEmitEvent(CouchbaseMappingEvent<?> event) {
188+
public void maybeEmitEvent(CouchbaseMappingEvent<?> event) {
184189
if (canPublishEvent()) {
185190
try {
186191
this.applicationContext.publishEvent(event);

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,16 @@ static class ReactiveInsertByIdSupport<T> implements ReactiveInsertById<T> {
7878

7979
@Override
8080
public Mono<T> one(T object) {
81-
PseudoArgs<InsertOptions> pArgs = new PseudoArgs(template, scope, collection,
82-
options != null ? options : InsertOptions.insertOptions());
83-
LOG.trace("statement: {} scope: {} collection: {} options: {}", "insertById", pArgs.getScope(),
84-
pArgs.getCollection(), pArgs.getOptions());
81+
PseudoArgs<InsertOptions> pArgs = new PseudoArgs(template, scope, collection,
82+
options != null ? options : InsertOptions.insertOptions());
83+
LOG.trace("statement: {} scope: {} collection: {} options: {}", "insertById", pArgs.getScope(),
84+
pArgs.getCollection(), pArgs.getOptions());
8585
return Mono.just(object).flatMap(support::encodeEntity)
86-
.flatMap(converted -> template.getCouchbaseClientFactory().withScope(pArgs.getScope())
87-
.getCollection(pArgs.getCollection()).reactive()
88-
.insert(converted.getId(), converted.export(), buildOptions(pArgs.getOptions(), converted))
86+
.flatMap(converted -> template.getCouchbaseClientFactory().withScope(pArgs.getScope())
87+
.getCollection(pArgs.getCollection()).reactive()
88+
.insert(converted.getId(), converted.export(), buildOptions(pArgs.getOptions(), converted))
8989
.flatMap(result -> support.applyUpdatedId(object, converted.getId())
90-
.flatMap(insertedObject -> (Mono<T>) support.applyUpdatedCas(insertedObject, result.cas()))))
90+
.flatMap(updatedObject -> support.applyUpdatedCas(updatedObject, converted, result.cas()))))
9191
.onErrorMap(throwable -> {
9292
if (throwable instanceof RuntimeException) {
9393
return template.potentiallyConvertRuntimeException((RuntimeException) throwable);

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

+18-13
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package org.springframework.data.couchbase.core;
1717

18+
import org.springframework.data.couchbase.core.mapping.event.ReactiveAfterDeleteEvent;
19+
import org.springframework.data.couchbase.core.mapping.event.ReactiveBeforeDeleteEvent;
1820
import reactor.core.publisher.Flux;
1921
import reactor.core.publisher.Mono;
2022

@@ -68,19 +70,22 @@ static class ReactiveRemoveByIdSupport implements ReactiveRemoveById {
6870

6971
@Override
7072
public Mono<RemoveResult> one(final String id) {
71-
PseudoArgs<RemoveOptions> pArgs = new PseudoArgs(template, scope, collection,
72-
options != null ? options : RemoveOptions.removeOptions());
73-
return Mono.just(id)
74-
.flatMap(docId -> template.getCouchbaseClientFactory().withScope(pArgs.getScope())
75-
.getCollection(pArgs.getCollection()).reactive().remove(id, buildRemoveOptions(pArgs.getOptions()))
76-
.map(r -> RemoveResult.from(docId, r)))
77-
.onErrorMap(throwable -> {
78-
if (throwable instanceof RuntimeException) {
79-
return template.potentiallyConvertRuntimeException((RuntimeException) throwable);
80-
} else {
81-
return throwable;
82-
}
83-
});
73+
PseudoArgs<RemoveOptions> pArgs = new PseudoArgs(template, scope, collection,
74+
options != null ? options : RemoveOptions.removeOptions());
75+
return Mono.just(id).map(r -> {
76+
template.support().maybeEmitEvent(new ReactiveBeforeDeleteEvent<>(r));
77+
return r;
78+
}).flatMap(docId -> template.getCouchbaseClientFactory().withScope(pArgs.getScope())
79+
.getCollection(pArgs.getCollection()).reactive().remove(id, buildRemoveOptions(pArgs.getOptions())).map(r -> {
80+
template.support().maybeEmitEvent(new ReactiveAfterDeleteEvent<>(r));
81+
return RemoveResult.from(docId, r);
82+
})).onErrorMap(throwable -> {
83+
if (throwable instanceof RuntimeException) {
84+
return template.potentiallyConvertRuntimeException((RuntimeException) throwable);
85+
} else {
86+
return throwable;
87+
}
88+
});
8489
}
8590

8691
@Override

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ static class ReactiveReplaceByIdSupport<T> implements ReactiveReplaceById<T> {
7878

7979
@Override
8080
public Mono<T> one(T object) {
81-
PseudoArgs<ReplaceOptions> pArgs = new PseudoArgs<>(template, scope, collection,
82-
options != null ? options : ReplaceOptions.replaceOptions());
83-
LOG.trace("statement: {} pArgs: {}", "replaceById", pArgs);
84-
return Mono.just(object).flatMap(support::encodeEntity).flatMap(converted -> template.getCouchbaseClientFactory()
85-
.withScope(pArgs.getScope()).getCollection(pArgs.getCollection()).reactive()
86-
.replace(converted.getId(), converted.export(), buildReplaceOptions(pArgs.getOptions(), object, converted))
87-
.flatMap(result -> support.applyUpdatedId(object, converted.getId())
88-
.flatMap(replacedObject -> (Mono<T>) support.applyUpdatedCas(replacedObject, result.cas()))))
81+
PseudoArgs<ReplaceOptions> pArgs = new PseudoArgs<>(template, scope, collection,
82+
options != null ? options : ReplaceOptions.replaceOptions());
83+
LOG.trace("statement: {} pArgs: {}", "replaceById", pArgs);
84+
return Mono.just(object).flatMap(support::encodeEntity)
85+
.flatMap(converted -> template.getCouchbaseClientFactory().withScope(pArgs.getScope())
86+
.getCollection(pArgs.getCollection()).reactive()
87+
.replace(converted.getId(), converted.export(), buildReplaceOptions(pArgs.getOptions(), object, converted))
88+
.flatMap(result -> support.applyUpdatedCas(object, converted, result.cas())))
8989
.onErrorMap(throwable -> {
9090
if (throwable instanceof RuntimeException) {
9191
return template.potentiallyConvertRuntimeException((RuntimeException) throwable);

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
1919

20+
import org.springframework.data.couchbase.core.mapping.event.CouchbaseMappingEvent;
2021
import reactor.core.publisher.Mono;
2122

2223
public interface ReactiveTemplateSupport {
@@ -25,11 +26,13 @@ public interface ReactiveTemplateSupport {
2526

2627
<T> Mono<T> decodeEntity(String id, String source, long cas, Class<T> entityClass);
2728

28-
Mono<Object> applyUpdatedCas(Object entity, long cas);
29+
<T> Mono<T> applyUpdatedCas(T entity, CouchbaseDocument converted, long cas);
2930

30-
Mono<Object> applyUpdatedId(Object entity, Object id);
31+
<T> Mono<T> applyUpdatedId(T entity, Object id);
3132

3233
Long getCas(Object entity);
3334

3435
String getJavaNameForEntity(Class<?> clazz);
36+
37+
void maybeEmitEvent(CouchbaseMappingEvent<?> event);
3538
}

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ static class ReactiveUpsertByIdSupport<T> implements ReactiveUpsertById<T> {
7575

7676
@Override
7777
public Mono<T> one(T object) {
78-
PseudoArgs<UpsertOptions> pArgs = new PseudoArgs<>(template, scope, collection,
79-
options != null ? options : UpsertOptions.upsertOptions());
78+
PseudoArgs<UpsertOptions> pArgs = new PseudoArgs<>(template, scope, collection,
79+
options != null ? options : UpsertOptions.upsertOptions());
8080
return Mono.just(object).flatMap(support::encodeEntity)
81-
.flatMap(converted -> template.getCouchbaseClientFactory().withScope(pArgs.getScope())
82-
.getCollection(pArgs.getCollection()).reactive()
83-
.upsert(converted.getId(), converted.export(), buildUpsertOptions(pArgs.getOptions(), converted))
81+
.flatMap(converted -> template.getCouchbaseClientFactory().withScope(pArgs.getScope())
82+
.getCollection(pArgs.getCollection()).reactive()
83+
.upsert(converted.getId(), converted.export(), buildUpsertOptions(pArgs.getOptions(), converted))
8484
.flatMap(result -> support.applyUpdatedId(object, converted.getId())
85-
.flatMap(updatedObject -> (Mono<T>) support.applyUpdatedCas(updatedObject, result.cas()))))
85+
.flatMap(updatedObject -> support.applyUpdatedCas(updatedObject, converted, result.cas()))))
8686
.onErrorMap(throwable -> {
8787
if (throwable instanceof RuntimeException) {
8888
return template.potentiallyConvertRuntimeException((RuntimeException) throwable);

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,21 @@
1616
package org.springframework.data.couchbase.core;
1717

1818
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
19+
import org.springframework.data.couchbase.core.mapping.event.CouchbaseMappingEvent;
1920

2021
public interface TemplateSupport {
2122

2223
CouchbaseDocument encodeEntity(Object entityToEncode);
2324

2425
<T> T decodeEntity(String id, String source, long cas, Class<T> entityClass);
2526

26-
Object applyUpdatedCas(Object entity, long cas);
27+
<T> T applyUpdatedCas(T entity, CouchbaseDocument converted, long cas);
2728

28-
Object applyUpdatedId(Object entity, Object id);
29+
<T> T applyUpdatedId(T entity, Object id);
2930

3031
long getCas(Object entity);
3132

3233
String getJavaNameForEntity(Class<?> clazz);
34+
35+
void maybeEmitEvent(CouchbaseMappingEvent<?> event);
3336
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 the original author or authors.
2+
* Copyright 2020-2021 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.
@@ -15,29 +15,27 @@
1515
*/
1616
package org.springframework.data.couchbase.core.mapping.event;
1717

18-
import org.springframework.data.couchbase.core.mapping.Document;
18+
import org.springframework.data.couchbase.core.mapping.CouchbaseDocument;
1919
import org.springframework.data.mapping.callback.EntityCallback;
2020

2121
/**
22-
* Callback being invoked after a domain object is materialized from a {@link Document} when reading results.
22+
* Callback being invoked after a domain object is materialized from a {@link CouchbaseDocument} when reading results.
2323
*
24-
* @author Roman Puchkovskiy
25-
* @author Mark Paluch
2624
* @author Michael Reiche
2725
* @see org.springframework.data.mapping.callback.EntityCallbacks
28-
* @since 3.0
26+
* @since 4.2
2927
*/
3028
@FunctionalInterface
3129
public interface AfterConvertCallback<T> extends EntityCallback<T> {
3230

3331
/**
34-
* Entity callback method invoked after a domain object is materialized from a {@link Document}. Can return either the
35-
* same or a modified instance of the domain object.
32+
* Entity callback method invoked after a domain object is materialized from a {@link CouchbaseDocument}. Can return
33+
* either the same or a modified instance of the domain object.
3634
*
3735
* @param entity the domain object (the result of the conversion).
3836
* @param document must not be {@literal null}.
3937
* @param collection name of the collection.
40-
* @return the domain object that is the result of reading it from the {@link Document}.
38+
* @return the domain object that is the result of reading it from the {@link CouchbaseDocument}.
4139
*/
42-
T onAfterConvert(T entity, Document document, String collection);
40+
T onAfterConvert(T entity, CouchbaseDocument document, String collection);
4341
}

0 commit comments

Comments
 (0)