com.mysema.query
Class QueryModifiers

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

@Immutable
public final class QueryModifiers
extends Object
implements Serializable

QueryModifiers combines limit and offset info into a single type.

Author:
tiwe
See Also:
Serialized Form

Constructor Summary
QueryModifiers()
          Instantiates a new query modifiers.
QueryModifiers(Long limit, Long offset)
          Instantiates a new query modifiers.
QueryModifiers(QueryModifiers modifiers)
           
 
Method Summary
 boolean equals(Object o)
           
 Long getLimit()
          Gets the limit.
 Long getOffset()
          Gets the offset.
 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
 

Constructor Detail

QueryModifiers

public QueryModifiers()
Instantiates a new query modifiers.


QueryModifiers

public QueryModifiers(@Nullable
                      Long limit,
                      @Nullable
                      Long offset)
Instantiates a new query modifiers.

Parameters:
limit - the limit
offset - the offset

QueryModifiers

public QueryModifiers(QueryModifiers modifiers)
Parameters:
modifiers -
Method Detail

limit

public static QueryModifiers limit(@Nonnegative
                                   long limit)

offset

public static QueryModifiers offset(@Nonnegative
                                    long offset)

getLimit

@Nullable
public Long getLimit()
Gets the limit.

Returns:
the limit

getOffset

@Nullable
public Long getOffset()
Gets the offset.

Returns:
the offset

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-2010 Mysema Ltd. All Rights Reserved.