Spring Data Document

org.springframework.data.mongodb.core.geo
Class GeoPage<T>

java.lang.Object
  extended by org.springframework.data.domain.PageImpl<GeoResult<T>>
      extended by org.springframework.data.mongodb.core.geo.GeoPage<T>
All Implemented Interfaces:
Serializable, Iterable<GeoResult<T>>, org.springframework.data.domain.Page<GeoResult<T>>

public class GeoPage<T>
extends org.springframework.data.domain.PageImpl<GeoResult<T>>

Custom Page to carry the average distance retrieved from the GeoResults the GeoPage is set up from.

Author:
Oliver Gierke
See Also:
Serialized Form

Constructor Summary
GeoPage(GeoResults<T> results)
          Creates a new GeoPage from the given GeoResults.
GeoPage(GeoResults<T> results, org.springframework.data.domain.Pageable pageable, long total)
          Creates a new GeoPage from the given GeoResults, Pageable and total.
 
Method Summary
 Distance getAverageDistance()
          Returns the average distance of the underlying results.
 
Methods inherited from class org.springframework.data.domain.PageImpl
equals, getContent, getNumber, getNumberOfElements, getSize, getSort, getTotalElements, getTotalPages, hasContent, hashCode, hasNextPage, hasPreviousPage, isFirstPage, isLastPage, iterator, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeoPage

public GeoPage(GeoResults<T> results)
Creates a new GeoPage from the given GeoResults.

Parameters:
content - must not be null.

GeoPage

public GeoPage(GeoResults<T> results,
               org.springframework.data.domain.Pageable pageable,
               long total)
Creates a new GeoPage from the given GeoResults, Pageable and total.

Parameters:
results - must not be null.
pageable - must not be null.
total -
Method Detail

getAverageDistance

public Distance getAverageDistance()
Returns the average distance of the underlying results.

Returns:
the averageDistance

Spring Data Document

Copyright © 2012. All Rights Reserved.