Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr.query.qom
Class JcrLimit

    java.lang.Object
      org.modeshape.graph.query.model.Limit
          org.modeshape.jcr.query.qom.JcrLimit

All Implemented Interfaces:
  Serializable, LanguageObject, Visitable, Limit

    public class JcrLimit

extends Limit
implements Limit

Implementation of the equi-join condition for the extended JCR Query Object Model and the Graph API.

See Also:
  Serialized Form

Field Summary
`static JcrLimit` | `NONE`

Constructor Summary
`JcrLimit(int rowLimit)` Create a limit on the number of rows.
`JcrLimit(int rowLimit, int offset)` Create a limit on the number of rows and the number of initial rows to skip.

Method Summary
`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.
`JcrLimit` | `withOffset(int offset)`
`JcrLimit` | `withRowLimit(int rowLimit)`

Methods inherited from class org.modeshape.graph.query.model.Limit
`accept, equals, hashCode, hasRowLimited, isOffset, isUnlimited, offset, rowLimit, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.modeshape.jcr.api.query.qom.Limit
`isOffset, isUnlimited`

Field Detail

### NONE

    public static final JcrLimit NONE

Constructor Detail

### JcrLimit

    public JcrLimit(int rowLimit)

  Create a limit on the number of rows.

  Parameters:
    `rowLimit` - the maximum number of rows
  Throws:
    `IllegalArgumentException` - if the row limit is negative

### JcrLimit

    public JcrLimit(int rowLimit,
                    int offset)

  Create a limit on the number of rows and the number of initial rows to skip.

  Parameters:
    `rowLimit` - the maximum number of rows
    `offset` - the number of rows to skip before beginning the results
  Throws:
    `IllegalArgumentException` - if the row limit is negative, or if the offset is negative

Method Detail

### getOffset

    public int getOffset()

  Get the number of rows skipped before the results begin.

  Specified by:
    `getOffset` in interface `Limit`
  Returns:
    the offset; always 0 or a positive number
  See Also:
    `Limit.getOffset()`

### getRowLimit

    public int getRowLimit()

  Get the maximum number of rows that are to be returned.

  Specified by:
    `getRowLimit` in interface `Limit`
  Returns:
    the maximum number of rows; always positive, or equal to `Integer.MAX_VALUE` if there is no limit
  See Also:
    `Limit.getRowLimit()`

### withOffset

    public JcrLimit withOffset(int offset)

  Overrides:
    `withOffset` in class `Limit`
  See Also:
    `Limit.withOffset(int)`

### withRowLimit

    public JcrLimit withRowLimit(int rowLimit)

  Overrides:
    `withRowLimit` in class `Limit`
  See Also:
    `Limit.withRowLimit(int)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.