Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import java.time.LocalDate;
import java.util.List;
import java.util.Optional;

@Repository
public interface Library2 {
Expand All @@ -32,6 +33,9 @@ public interface Library2 {
@Find
Uni<Book> book(String isbn);

@Find
Uni<Optional<Book>> maybeBook(String isbn);

@Find
Uni<List<Book>> books(@By("isbn") List<String> isbns);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ public String getAttributeDeclarationString() {

private void throwIfNull(StringBuilder declaration) {
if (containerType != null) {
if ( isReactive() ) {
declaration
.append("\n\t\t\t.map(")
.append(annotationMetaEntity.importType(containerType))
.append("::")
.append("ofNullable");
}
declaration
.append(')');
}
Expand Down Expand Up @@ -157,7 +164,7 @@ private void varOrReturn(StringBuilder declaration) {
declaration
.append("\ttry {\n\t");
}
if (containerType != null) {
if (containerType != null && !isReactive()) {
declaration
.append("\treturn ")
.append(annotationMetaEntity.staticImport(containerType, "ofNullable"))
Expand Down
Loading