Class RedisGeoCommands.GeoSearchCommandArgs
java.lang.Object
org.springframework.data.redis.connection.RedisGeoCommands.GeoSearchCommandArgs
- All Implemented Interfaces:
Cloneable
,RedisGeoCommands.GeoCommandArgs
- Direct Known Subclasses:
RedisGeoCommands.GeoRadiusCommandArgs
- Enclosing interface:
- RedisGeoCommands
public static class RedisGeoCommands.GeoSearchCommandArgs
extends Object
implements RedisGeoCommands.GeoCommandArgs, Cloneable
Additional arguments (like count/sort/...) to be used with
RedisGeoCommands
.- Since:
- 2.6
- Author:
- Mark Paluch, Christoph Strobl
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisGeoCommands.GeoCommandArgs
RedisGeoCommands.GeoCommandArgs.GeoCommandFlag
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Set<RedisGeoCommands.GeoCommandArgs.GeoCommandFlag>
protected Long
protected Sort.Direction
-
Method Summary
Modifier and TypeMethodDescriptionprotected RedisGeoCommands.GeoSearchCommandArgs
clone()
getFlags()
getLimit()
boolean
Sets theRedisGeoCommands.GeoRadiusCommandArgs.Flag.WITHCOORD
flag to also return the longitude, latitude coordinates of the matching items.Sets theRedisGeoCommands.GeoRadiusCommandArgs.Flag.WITHDIST
flag to also return the distance of the returned items from the specified center.limit
(long count) Limit the results to the first N matching items.limit
(long count, boolean any) Limit the results to the first N matching items.Create newRedisGeoCommands.GeoSearchCommandArgs
.sort
(Sort.Direction direction) Apply a sort direction.Sort returned items from the nearest to the furthest, relative to the center.Sort returned items from the furthest to the nearest, relative to the center.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.redis.connection.RedisGeoCommands.GeoCommandArgs
hasFlags, hasLimit, hasSortDirection
-
Field Details
-
flags
-
limit
-
sortDirection
-
-
Method Details
-
newGeoSearchArgs
Create newRedisGeoCommands.GeoSearchCommandArgs
.- Returns:
- never null.
-
includeCoordinates
Sets theRedisGeoCommands.GeoRadiusCommandArgs.Flag.WITHCOORD
flag to also return the longitude, latitude coordinates of the matching items.- Returns:
-
includeDistance
Sets theRedisGeoCommands.GeoRadiusCommandArgs.Flag.WITHDIST
flag to also return the distance of the returned items from the specified center.- Returns:
- never null.
-
sort
Apply a sort direction.- Returns:
- never null.
-
sortAscending
Sort returned items from the nearest to the furthest, relative to the center.- Returns:
- never null.
-
sortDescending
Sort returned items from the furthest to the nearest, relative to the center.- Returns:
- never null.
-
limit
Limit the results to the first N matching items.- Parameters:
count
-- Returns:
- never null.
-
limit
Limit the results to the first N matching items.- Parameters:
count
-any
-- Returns:
- never null.
-
getFlags
- Specified by:
getFlags
in interfaceRedisGeoCommands.GeoCommandArgs
- Returns:
- never null.
-
getLimit
- Specified by:
getLimit
in interfaceRedisGeoCommands.GeoCommandArgs
- Returns:
- can be null.
-
getSortDirection
- Specified by:
getSortDirection
in interfaceRedisGeoCommands.GeoCommandArgs
- Returns:
- can be null.
-
hasAnyLimit
public boolean hasAnyLimit() -
clone
-