From 3cd76d200de3e04d788cb3dff10898a6723f5ad3 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Mon, 14 Nov 2016 15:38:40 +0100 Subject: [PATCH] DATACMNS-937 - Document JavaSlang's Option type as query method return type. Mentioned the support for Scala's Option type, too. --- src/main/asciidoc/repository-query-return-types-reference.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/asciidoc/repository-query-return-types-reference.adoc b/src/main/asciidoc/repository-query-return-types-reference.adoc index 48ed37239..12277e8e4 100644 --- a/src/main/asciidoc/repository-query-return-types-reference.adoc +++ b/src/main/asciidoc/repository-query-return-types-reference.adoc @@ -19,6 +19,7 @@ NOTE: Geospatial types like (`GeoResult`, `GeoResults`, `GeoPage`) are only avai |`Collection`|A `Collection`. |`List`|A `List`. |`Optional`|A Java 8 or Guava `Optional`. Expects the query method to return one result at most. In case no result is found `Optional.empty()`/`Optional.absent()` is returned. More than one result will trigger an `IncorrectResultSizeDataAccessException`. +|`Option`|An either Scala or JavaSlang `Option` type. Semantically same behavior as Java 8's `Optional` described above. |`Stream`|A Java 8 `Stream`. |`Future`|A `Future`. Expects method to be annotated with `@Async` and requires Spring's asynchronous method execution capability enabled. |`CompletableFuture`|A Java 8 `CompletableFuture`. Expects method to be annotated with `@Async` and requires Spring's asynchronous method execution capability enabled.