diff --git a/src/main/asciidoc/repository-query-return-types-reference.adoc b/src/main/asciidoc/repository-query-return-types-reference.adoc index 780999ba2..bab910458 100644 --- a/src/main/asciidoc/repository-query-return-types-reference.adoc +++ b/src/main/asciidoc/repository-query-return-types-reference.adoc @@ -5,6 +5,8 @@ == Supported query return types The following table lists the return types generally supported by Spring Data repositories. However, consult the store-specific documentation for the exact list of supported return types, because some listed here might not be supported in a particular store. +NOTE: Geospatial types like (`GeoResult`, `GeoResults`, `GeoPage`) are only available for data stores that support geospatial queries. + .Query return types [options="header", cols="1,3"] |=============== @@ -14,11 +16,14 @@ The following table lists the return types generally supported by Spring Data re |Wrapper types|Java wrapper types. |`T`|An unique entity. Expects the query method to return one result at most. In case no result is found `null` is returned. More than one result will trigger an `IncorrectResultSizeDataAccessException`. |`Iterator`|An `Iterator`. -|`Collection`|A`Collection`. +|`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`. |`Stream`|A Java 8 `Stream`. |`Slice`|A sized chunk of data with information whether there is more data available. Requires a `Pageable` method parameter. |`Page`|A Slice with additional information, e.g. the total number of results. Requires a `Pageable` method parameter. +|`GeoResult`|A result entry with additional information, e.g. distance to a reference location. +|`GeoResults`|A list of GeoResult with additional information, e.g. average distance to a reference location. +|`GeoPage`|A Page with GeoResult, e.g. average distance to a reference location. |=============== diff --git a/src/main/java/org/springframework/data/geo/GeoResult.java b/src/main/java/org/springframework/data/geo/GeoResult.java index bd4006060..aadc9f0b0 100644 --- a/src/main/java/org/springframework/data/geo/GeoResult.java +++ b/src/main/java/org/springframework/data/geo/GeoResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2014 the original author or authors. + * Copyright 2011-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import java.io.Serializable; import org.springframework.util.Assert; /** - * Calue object capturing some arbitrary object plus a distance. + * Value object capturing some arbitrary object plus a distance. * * @author Oliver Gierke * @author Thomas Darimont