|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.resource.ResourceList | +--com.ibm.as400.resource.BufferedResourceList
The BufferedResourceList class represents a subclass of the ResourceList class which manages a list of resources and buffers them efficiently. This class is intended to be extended and customized by subclasses.
The list is retrieved in pages, and each page contains multiple resources (those which make up the list). The higher that page size, the more resources are retrieved at once. While the page size does not affect functionality of the list, it may influence performance. For instance, setting the page size to match the number of rows presented in a GUI or servlet may improve overall response time. Call the setPageSize() method to set a specific page size.
Constructor Summary | |
BufferedResourceList()
Constructs a BufferedResourceList object. |
|
BufferedResourceList(Presentation presentation,
ResourceMetaData[] attributeMetaData,
ResourceMetaData[] selectionMetaData,
ResourceMetaData[] sortMetaData)
Constructs a BufferedResourceList object. |
Method Summary | |
void |
close()
Closes the list. |
protected void |
fireResourceAdded(Resource resource,
long index)
Fires a resourceAdded() ResourceListEvent. |
int |
getNumberOfPages()
Returns the number of pages in the list buffer. |
int |
getPageSize()
Returns the page size of the list buffer. |
boolean |
isResourceAvailable(long index)
Indicates if the resource is available. |
void |
open()
Opens the list. |
void |
refreshContents()
Refreshes the contents of the list. |
Resource |
resourceAt(long index)
Returns the resource specified by the index. |
void |
setNumberOfPages(int numberOfPages)
Sets the number of pages in the list buffer. |
void |
setPageSize(int pageSize)
Sets the page size of the list buffer. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public BufferedResourceList()
public BufferedResourceList(Presentation presentation, ResourceMetaData[] attributeMetaData, ResourceMetaData[] selectionMetaData, ResourceMetaData[] sortMetaData)
presentation
- The presentation.attributeMetaData
- The attribute meta data, or null if not applicable.selectionMetaData
- The selection meta data, or null if not applicable.sortMetaData
- The sort meta data, or null if not applicable.Method Detail |
public void close() throws ResourceException
protected void fireResourceAdded(Resource resource, long index)
resource
- The resource.index
- The index.public int getNumberOfPages()
public int getPageSize()
public boolean isResourceAvailable(long index) throws ResourceException
index
- The index.public void open() throws ResourceException
public void refreshContents() throws ResourceException
This will implicitly open the list if needed.
public Resource resourceAt(long index) throws ResourceException
This will implicitly open the list if needed.
index
- The index.public void setNumberOfPages(int numberOfPages)
numberOfPages
- The number of pages.public void setPageSize(int pageSize)
pageSize
- The page size, in number of resources.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |