Spring Data Key-Value

org.springframework.data.keyvalue.redis.connection
Class DefaultSortParameters

java.lang.Object
  extended by org.springframework.data.keyvalue.redis.connection.DefaultSortParameters
All Implemented Interfaces:
SortParameters

public class DefaultSortParameters
extends Object
implements SortParameters

Default implementation for SortParameters.

Author:
Costin Leau

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.springframework.data.keyvalue.redis.connection.SortParameters
SortParameters.Order, SortParameters.Range
 
Constructor Summary
DefaultSortParameters()
          Constructs a new DefaultSortParameters instance.
DefaultSortParameters(byte[] byPattern, SortParameters.Range limit, byte[] getPattern, SortParameters.Order order, Boolean alphabetic)
          Constructs a new DefaultSortParameters instance.
DefaultSortParameters(SortParameters.Range limit, SortParameters.Order order, Boolean alphabetic)
          Constructs a new DefaultSortParameters instance.
 
Method Summary
 SortParameters alpha()
           
 SortParameters by(byte[] pattern)
           
 SortParameters get(byte[] pattern)
           
 byte[] getByPattern()
          Returns the pattern (if set) for sorting by external keys (BY).
 byte[] getGetPattern()
          Returns the pattern (if set) for retrieving external keys (GET).
 SortParameters.Range getLimit()
          Returns the sorting limit (range or pagination).
 SortParameters.Order getOrder()
          Returns the sorting order.
 Boolean isAlphabetic()
          Indicates if the sorting is numeric (default) or alphabetical (lexicographical).
 SortParameters limit(long start, long count)
           
 SortParameters numeric()
           
 SortParameters order(SortParameters.Order order)
           
 void setAlphabetic(Boolean alphabetic)
           
 void setByPattern(byte[] byPattern)
           
 void setGetPattern(byte[] getPattern)
           
 void setLimit(SortParameters.Range limit)
           
 void setOrder(SortParameters.Order order)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSortParameters

public DefaultSortParameters()
Constructs a new DefaultSortParameters instance.


DefaultSortParameters

public DefaultSortParameters(SortParameters.Range limit,
                             SortParameters.Order order,
                             Boolean alphabetic)
Constructs a new DefaultSortParameters instance.

Parameters:
limit -
order -
alphabetic -

DefaultSortParameters

public DefaultSortParameters(byte[] byPattern,
                             SortParameters.Range limit,
                             byte[] getPattern,
                             SortParameters.Order order,
                             Boolean alphabetic)
Constructs a new DefaultSortParameters instance.

Parameters:
byPattern -
limit -
getPattern -
order -
alphabetic -
Method Detail

getByPattern

public byte[] getByPattern()
Description copied from interface: SortParameters
Returns the pattern (if set) for sorting by external keys (BY). Can be null if nothing is specified.

Specified by:
getByPattern in interface SortParameters
Returns:
BY pattern.

setByPattern

public void setByPattern(byte[] byPattern)

getLimit

public SortParameters.Range getLimit()
Description copied from interface: SortParameters
Returns the sorting limit (range or pagination). Can be null if nothing is specified.

Specified by:
getLimit in interface SortParameters
Returns:
sorting limit/range

setLimit

public void setLimit(SortParameters.Range limit)

getGetPattern

public byte[] getGetPattern()
Description copied from interface: SortParameters
Returns the pattern (if set) for retrieving external keys (GET). Can be null if nothing is specified.

Specified by:
getGetPattern in interface SortParameters
Returns:
GET pattern.

setGetPattern

public void setGetPattern(byte[] getPattern)

getOrder

public SortParameters.Order getOrder()
Description copied from interface: SortParameters
Returns the sorting order. Can be null if nothing is specified.

Specified by:
getOrder in interface SortParameters
Returns:
sorting order

setOrder

public void setOrder(SortParameters.Order order)

isAlphabetic

public Boolean isAlphabetic()
Description copied from interface: SortParameters
Indicates if the sorting is numeric (default) or alphabetical (lexicographical). Can be null if nothing is specified.

Specified by:
isAlphabetic in interface SortParameters
Returns:
the type of sorting

setAlphabetic

public void setAlphabetic(Boolean alphabetic)

order

public SortParameters order(SortParameters.Order order)

alpha

public SortParameters alpha()

numeric

public SortParameters numeric()

get

public SortParameters get(byte[] pattern)

by

public SortParameters by(byte[] pattern)

limit

public SortParameters limit(long start,
                            long count)

Spring Data Key-Value

Copyright © 2010-2011 SpringSource. All Rights Reserved.