|
ModeShape Distribution 3.5.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.jcr.query.model.Limit
@Immutable public class Limit
A specification of the limit placed on a query, detailing the a maximum number of result rows and an offset for the first row in the results.
| Field Summary | |
|---|---|
static Limit |
NONE
|
| Constructor Summary | |
|---|---|
Limit(int rowLimit)
Create a limit on the number of rows. |
|
Limit(int rowLimit,
int offset)
Create a limit on the number of rows and the number of initial rows to skip. |
|
| Method Summary | |
|---|---|
void |
accept(Visitor visitor)
Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation. |
boolean |
equals(Object obj)
|
int |
getOffset()
Get the number of rows skipped before the results begin. |
int |
getRowLimit()
Get the maximum number of rows that are to be returned. |
int |
hashCode()
|
boolean |
hasRowLimited()
Determine whether this limit clause defines a maximum limit |
boolean |
isLimitedToSingleRowWithNoOffset()
|
boolean |
isOffset()
Determine whether this limit clause defines an offset. |
boolean |
isUnlimited()
Determine whether this limit clause is necessary. |
String |
toString()
|
Limit |
withOffset(int offset)
Create a new Limit object that contains the same maximum row count as this object but a new offset. |
Limit |
withRowLimit(int rowLimit)
Create a new Limit object that contains the same offset as this object but a new maximum row count. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Limit NONE
| Constructor Detail |
|---|
public Limit(int rowLimit)
rowLimit - the maximum number of rows
IllegalArgumentException - if the row limit is negative
public Limit(int rowLimit,
int offset)
rowLimit - the maximum number of rowsoffset - the number of rows to skip before beginning the results
IllegalArgumentException - if the row limit is negative, or if the offset is negative| Method Detail |
|---|
public final int getOffset()
Limit
getOffset in interface Limitpublic final int getRowLimit()
Limit
getRowLimit in interface LimitInteger.MAX_VALUE if there is no limitpublic final boolean isUnlimited()
Limit
isUnlimited in interface Limitpublic final boolean hasRowLimited()
public final boolean isLimitedToSingleRowWithNoOffset()
public final boolean isOffset()
Limit
isOffset in interface Limitpublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic void accept(Visitor visitor)
Visitable
accept in interface Visitablevisitor - the visitor; never nullpublic Limit withRowLimit(int rowLimit)
rowLimit - the maximum row count for the new Limit object
public Limit withOffset(int offset)
offset - the offset for the new Limit object
|
ModeShape Distribution 3.5.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||