Compoze Software, Inc.

com.compoze.exchange.webdav
Class RowRange


java.lang.Object

  |

  +--com.compoze.exchange.webdav.RowRange


public class RowRange
extends java.lang.Object

This class is used to specify which rows are to be returned from SEARCH request to Exchange. The following are examples of how to set a range of rows:

To create a range from 1 to 25:

   RowRange range = RowRange.create(1, 25);
 
To return first 10 rows:
   RowRange range = RowRange.create(10);
 
To return last 10 rows:
   RowRange range = RowRange.create(-10);
 
To return a discontinuous set of rows:
   RowRange range = RowRange.create(1, 5);
   range.add(10, 15);
   range.add(20, 25);
   range.add(30, 35);
 
To return the first and last 5 rows:
   RowRange range = RowRange.create(1, 5);
   range.add(-5);
 
To return all rows from the 5th to the end:
   RowRange range = RowRange.create(5, true);
 


Method Summary
 void add(int iNumberRows)
          Adds a RowRange object that represents the number of rows to return.
 void add(int iRangeStart, boolean bEndOfResult)
          Adds a RowRange object representing a set of rows specified with a start value.
 void add(int iRangeStart, int iRangeEnd)
          Adds a RowRange object that represents a set of rows between the specified start and end value to return.
static RowRange create(int iNumberRows)
          Creates a RowRange object that represents the number of rows to return.
static RowRange create(int iRangeStart, boolean bEndOfResult)
          Creates a RowRange object representing a set of rows specified with a start value.
static RowRange create(int iRangeStart, int iRangeEnd)
          Creates a RowRange object that represents a set of rows between the specified start and end value to return.
 int getNumberOfRows()
          Gets the number of rows to return
 int getRangeEnd()
          Gets the end value of the range
 int getRangeStart()
          Gets the start value of the range
static void main(java.lang.String[] args)
           
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create


public static RowRange create(int iRangeStart,
                              int iRangeEnd)
Creates a RowRange object that represents a set of rows between the specified start and end value to return.
Parameters:
iRangeStart - start of range of rows
iRangeEnd - end of range of rows
Throws:
java.lang.IllegalArgumentException - if the start row range or the end row range are <= 0 or start row range > end row range

create


public static RowRange create(int iNumberRows)
Creates a RowRange object that represents the number of rows to return.
Parameters:
iNumberRows - number of rows
Throws:
java.lang.IllegalArgumentException - if the start row range = 0

create


public static RowRange create(int iRangeStart,
                              boolean bEndOfResult)
Creates a RowRange object representing a set of rows specified with a start value. If bEndofResult is true, then the rows returned will be from the specified start value to the end of the result set. If bEndofResult is false, then the the specified row is returned.
Parameters:
iRangeStart - start of range of rows
bEndOfResult - true to return from specified start value to end of result set; false to return that row
Throws:
java.lang.IllegalArgumentException - if the start row range <= 0

add


public void add(int iRangeStart,
                int iRangeEnd)
Adds a RowRange object that represents a set of rows between the specified start and end value to return.
Parameters:
iRangeStart - start of range of rows
iRangeEnd - end of range of rows
Throws:
java.lang.IllegalArgumentException - if the start row range or the end row range are <= 0 or start row range > end row range

add


public void add(int iNumberRows)
Adds a RowRange object that represents the number of rows to return.
Parameters:
iNumberRows - number of rows
Throws:
java.lang.IllegalArgumentException - if the start row range = 0

add


public void add(int iRangeStart,
                boolean bEndOfResult)
Adds a RowRange object representing a set of rows specified with a start value. If bEndofResult is true, then the rows returned will be from the specified start value to the end of the result set. If bEndofResult is false, then the the specified row is returned.
Parameters:
iRangeStart - start of range of rows
bEndOfResult - true to return from specified start value to end of result set; true to return that row
Throws:
java.lang.IllegalArgumentException - if the start row range <= 0

getNumberOfRows


public int getNumberOfRows()
Gets the number of rows to return
Returns:
number of rows

getRangeStart


public int getRangeStart()
Gets the start value of the range
Returns:
start value of range

getRangeEnd


public int getRangeEnd()
Gets the end value of the range
Returns:
end value of range

toString


public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of the object

main


public static void main(java.lang.String[] args)

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.