|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.graph.query.model.Limit
@Immutable public class Limit
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 |
hashCode()
|
boolean |
hasRowLimited()
Determine whether this limit clause defines a maximum limit |
boolean |
isOffset()
Determine whether this limit clause defines an offset. |
boolean |
isUnlimited()
Determine whether this limit clause is necessary. |
int |
offset()
Get the number of rows skipped before the results begin. |
int |
rowLimit()
Get the maximum number of rows that are to be returned. |
String |
toString()
|
Limit |
withOffset(int offset)
|
Limit |
withRowLimit(int rowLimit)
|
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 negativepublic 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 negativeMethod Detail |
---|
public final int offset()
public final int rowLimit()
Integer.MAX_VALUE
if there is no limitpublic final boolean isUnlimited()
public final boolean hasRowLimited()
public final boolean isOffset()
public String toString()
toString
in class Object
Object.toString()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public void accept(Visitor visitor)
accept
in interface Visitable
visitor
- the visitor; never nullVisitable.accept(org.modeshape.graph.query.model.Visitor)
public Limit withRowLimit(int rowLimit)
public Limit withOffset(int offset)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |