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 @@ -91,6 +91,9 @@ record BookWithAuthor(Book book, Author author) {}
@Insert
Uni<Publisher[]> insertAll(Publisher[] publishers);

@Delete
Uni<Void> deleteAll(List<Publisher> publishers);

@Save
Uni<Publisher> save(Publisher publisher);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private void delegateBlockingly(StringBuilder declaration) {
.append(sessionName)
.append('.')
.append("insert");
argument( declaration, "Multiple" );
argument( declaration );
declaration
.append(";\n")
.append("\t\telse\n\t");
Expand All @@ -151,28 +151,47 @@ private void delegateBlockingly(StringBuilder declaration) {
.append(sessionName)
.append('.')
.append(operationName);
argument( declaration, "Multiple" );
argument( declaration );
declaration
.append(";\n");
}

private void argument(StringBuilder declaration, String suffix) {
private void argument(StringBuilder declaration) {
switch ( parameterKind ) {
case LIST:
declaration
.append(suffix)
.append("(")
.append(parameterName)
.append(")");
if ( isReactive() ) {
declaration
.append("All")
.append("(")
.append(parameterName)
.append(".toArray()")
.append( ")" );
}
else {
declaration
.append("Multiple")
.append("(")
.append(parameterName)
.append(")");
}
break;
case ARRAY:
declaration
.append(suffix)
.append("(")
.append(annotationMetaEntity.importType(LIST))
.append(".of(")
.append(parameterName)
.append("))");
if ( isReactive() ) {
declaration
.append("All")
.append("(")
.append(parameterName)
.append(")");
}
else {
declaration
.append("Multiple")
.append("(")
.append(annotationMetaEntity.importType(LIST))
.append(".of(")
.append(parameterName)
.append("))");
}
break;
default:
declaration
Expand Down Expand Up @@ -212,7 +231,7 @@ private void delegateReactively(StringBuilder declaration) {
.append( '.' )
.append( operationName );
// note that there is no upsertAll() method
argument( declaration, "All" );
argument( declaration );
if ( isGeneratedIdUpsert() ) {
declaration
.append(')');
Expand Down
Loading