Browse Source

DATACMNS-937 - Document JavaSlang's Option type as query method return type.

Mentioned the support for Scala's Option type, too.
pull/186/head
Oliver Gierke 9 years ago
parent
commit
3cd76d200d
  1. 1
      src/main/asciidoc/repository-query-return-types-reference.adoc

1
src/main/asciidoc/repository-query-return-types-reference.adoc

@ -19,6 +19,7 @@ NOTE: Geospatial types like (`GeoResult`, `GeoResults`, `GeoPage`) are only avai
|`Collection<T>`|A `Collection`. |`Collection<T>`|A `Collection`.
|`List<T>`|A `List`. |`List<T>`|A `List`.
|`Optional<T>`|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`. |`Optional<T>`|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<T>`|An either Scala or JavaSlang `Option` type. Semantically same behavior as Java 8's `Optional` described above.
|`Stream<T>`|A Java 8 `Stream`. |`Stream<T>`|A Java 8 `Stream`.
|`Future<T>`|A `Future`. Expects method to be annotated with `@Async` and requires Spring's asynchronous method execution capability enabled. |`Future<T>`|A `Future`. Expects method to be annotated with `@Async` and requires Spring's asynchronous method execution capability enabled.
|`CompletableFuture<T>`|A Java 8 `CompletableFuture`. Expects method to be annotated with `@Async` and requires Spring's asynchronous method execution capability enabled. |`CompletableFuture<T>`|A Java 8 `CompletableFuture`. Expects method to be annotated with `@Async` and requires Spring's asynchronous method execution capability enabled.

Loading…
Cancel
Save