com.extjs.gxt.ui.client.data
Class BasePagingLoadResult<Data>

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.BaseListLoadResult<Data>
      extended by com.extjs.gxt.ui.client.data.BasePagingLoadResult<Data>
Type Parameters:
Data - the data type
All Implemented Interfaces:
ListLoadResult<Data>, PagingLoadResult<Data>, java.io.Serializable

public class BasePagingLoadResult<Data>
extends BaseListLoadResult<Data>
implements PagingLoadResult<Data>, java.io.Serializable

Default implementation of the PagingLoadResult interface.

See Also:
Serialized Form

Field Summary
protected  int offset
           
protected  int totalLength
           
 
Fields inherited from class com.extjs.gxt.ui.client.data.BaseListLoadResult
list
 
Constructor Summary
BasePagingLoadResult(java.util.List<Data> data)
          Creates a new paging load result.
BasePagingLoadResult(java.util.List<Data> data, int offset, int totalLength)
          Creates a new paging load result.
 
Method Summary
 int getOffset()
          Returns the current offset of the results.
 int getTotalLength()
          Returns the total count.
 void setOffset(int offset)
          Sets the offset.
 void setTotalLength(int totalLength)
          Sets the total length.
 
Methods inherited from class com.extjs.gxt.ui.client.data.BaseListLoadResult
getData, setData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.extjs.gxt.ui.client.data.ListLoadResult
getData
 

Field Detail

offset

protected int offset

totalLength

protected int totalLength
Constructor Detail

BasePagingLoadResult

public BasePagingLoadResult(java.util.List<Data> data)
Creates a new paging load result.

Parameters:
data - the data

BasePagingLoadResult

public BasePagingLoadResult(java.util.List<Data> data,
                            int offset,
                            int totalLength)
Creates a new paging load result.

Parameters:
data - the data
offset - the offset
totalLength - the total length
Method Detail

getOffset

public int getOffset()
Description copied from interface: PagingLoadResult
Returns the current offset of the results.

Specified by:
getOffset in interface PagingLoadResult<Data>
Returns:
the offset

getTotalLength

public int getTotalLength()
Description copied from interface: PagingLoadResult
Returns the total count. This value will not equal the number of records being returned when paging is used.

Specified by:
getTotalLength in interface PagingLoadResult<Data>
Returns:
the total count

setOffset

public void setOffset(int offset)
Description copied from interface: PagingLoadResult
Sets the offset.

Specified by:
setOffset in interface PagingLoadResult<Data>
Parameters:
offset - the offset

setTotalLength

public void setTotalLength(int totalLength)
Description copied from interface: PagingLoadResult
Sets the total length.

Specified by:
setTotalLength in interface PagingLoadResult<Data>
Parameters:
totalLength - the total length