com.mysema.query
Class QueryModifiers

java.lang.Object
  extended by com.mysema.query.QueryModifiers
All Implemented Interfaces:
Serializable

public final class QueryModifiers
extends Object
implements Serializable

QueryModifiers combines limit and offset info into a single type.

Author:
tiwe
See Also:
Serialized Form

Field Summary
static QueryModifiers EMPTY
           
 
Constructor Summary
QueryModifiers(Long limit, Long offset)
           
QueryModifiers(QueryModifiers modifiers)
           
 
Method Summary
 boolean equals(Object o)
           
 Long getLimit()
           
 Long getOffset()
           
 int hashCode()
           
 boolean isRestricting()
          Checks if is restricting.
static QueryModifiers limit(long limit)
           
static QueryModifiers offset(long offset)
           
<T> List<T>
subList(List<T> list)
          Get a sublist based on the restriction of limit and offset
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final QueryModifiers EMPTY
Constructor Detail

QueryModifiers

public QueryModifiers(@Nullable
                      Long limit,
                      @Nullable
                      Long offset)

QueryModifiers

public QueryModifiers(QueryModifiers modifiers)
Method Detail

limit

public static QueryModifiers limit(@Nonnegative
                                   long limit)

offset

public static QueryModifiers offset(@Nonnegative
                                    long offset)

getLimit

@Nullable
public Long getLimit()

getOffset

@Nullable
public Long getOffset()

isRestricting

public boolean isRestricting()
Checks if is restricting.

Returns:
true, if is restricting

subList

public <T> List<T> subList(List<T> list)
Get a sublist based on the restriction of limit and offset

Type Parameters:
T -
Parameters:
list -
Returns:

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2007-2012 Mysema Ltd. All Rights Reserved.