fr.ifremer.allegro
Class PaginationResult

java.lang.Object
  extended by fr.ifremer.allegro.PaginationResult

public class PaginationResult
extends java.lang.Object

A class that represents a "paged result" of data out of a larger set, ie. a list of objects together with info to indicate the starting row and the full size of the dataset.


Constructor Summary
PaginationResult(java.lang.Object[] data, long totalSize)
          Create an object representing a sublist of a dataset.
 
Method Summary
 java.lang.Object[] getData()
          Return the array of objects held by this pagination rules, which is a continuous subset of the full dataset.
 long getTotalSize()
          Returns the number of items in the entire result.
 void setData(java.lang.Object[] data)
          Sets the data for this pagination result.
 void setTotalSize(long totalSize)
          Sets the total size of this pagination's complete set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaginationResult

public PaginationResult(java.lang.Object[] data,
                        long totalSize)
Create an object representing a sublist of a dataset.

Parameters:
totalSize - is the total number of matching rows available.
data - is a list of consecutive objects from the dataset.
Method Detail

getTotalSize

public long getTotalSize()
Returns the number of items in the entire result.

Returns:
the total size of items.

setTotalSize

public void setTotalSize(long totalSize)
Sets the total size of this pagination's complete set.

Parameters:
totalSize - the total size of objects contained in the complete set.

getData

public java.lang.Object[] getData()
Return the array of objects held by this pagination rules, which is a continuous subset of the full dataset.


setData

public void setData(java.lang.Object[] data)
Sets the data for this pagination result.

Parameters:
data - the subset of paginated data.


Copyright © 2008-2010 IFREMER. All Rights Reserved.