com.ibm.as400.resource
Class BufferedResourceList
- java.lang.Object
-
- com.ibm.as400.resource.ResourceList
-
- com.ibm.as400.resource.BufferedResourceList
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- SystemResourceList
Deprecated.Use packages com.ibm.as400.access and com.ibm.as400.access.list instead.
public class BufferedResourceList extends ResourceList
The BufferedResourceList class represents a subclass of theResourceList
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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BufferedResourceList()
Deprecated.Constructs a BufferedResourceList object.BufferedResourceList(Presentation presentation, ResourceMetaData[] attributeMetaData, ResourceMetaData[] selectionMetaData, ResourceMetaData[] sortMetaData)
Deprecated.Constructs a BufferedResourceList object.
-
Method Summary
Methods Modifier and Type Method and Description void
close()
Deprecated.Closes the list.protected void
fireResourceAdded(Resource resource, long index)
Deprecated.Fires a resourceAdded() ResourceListEvent.int
getNumberOfPages()
Deprecated.Returns the number of pages in the list buffer.int
getPageSize()
Deprecated.Returns the page size of the list buffer.boolean
isResourceAvailable(long index)
Deprecated.Indicates if the resource is available.void
open()
Deprecated.Opens the list.void
refreshContents()
Deprecated.Refreshes the contents of the list.Resource
resourceAt(long index)
Deprecated.Returns the resource specified by the index.void
setNumberOfPages(int numberOfPages)
Deprecated.Sets the number of pages in the list buffer.void
setPageSize(int pageSize)
Deprecated.Sets the page size of the list buffer.-
Methods inherited from class com.ibm.as400.resource.ResourceList
addActiveStatusListener, addPropertyChangeListener, addResourceListListener, addVetoableChangeListener, arePropertiesFrozen, establishConnection, fireBusy, fireIdle, fireLengthChanged, fireListClosed, fireListCompleted, fireListInError, fireListOpened, firePropertyChange, fireVetoableChange, freezeProperties, getAttributeMetaData, getAttributeMetaData, getListLength, getPresentation, getSelectionMetaData, getSelectionMetaData, getSelectionValue, getSelectionValue, getSortMetaData, getSortMetaData, getSortOrder, getSortValue, getSystem, isBidiEnabled, isComplete, isConnectionEstablished, isInError, isOpen, refreshStatus, removeActiveStatusListener, removePropertyChangeListener, removeResourceListListener, removeVetoableChangeListener, resources, setAttributeMetaData, setPresentation, setSelectionValue, setSelectionValue, setSortOrder, setSortValue, setSystem, toString, waitForComplete, waitForResource
-
-
-
-
Constructor Detail
-
BufferedResourceList
public BufferedResourceList()
Deprecated.Constructs a BufferedResourceList object.
-
BufferedResourceList
public BufferedResourceList(Presentation presentation, ResourceMetaData[] attributeMetaData, ResourceMetaData[] selectionMetaData, ResourceMetaData[] sortMetaData)
Deprecated.Constructs a BufferedResourceList object.- Parameters:
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
-
close
public void close() throws ResourceException
Deprecated.Closes the list. No further resources can be loaded. The list must be closed in order to clean up resources appropriately. This method has no effect if the list is already closed. This method fires a listClosed() ResourceListEvent.- Overrides:
close
in classResourceList
- Throws:
ResourceException
- If an error occurs.
-
fireResourceAdded
protected void fireResourceAdded(Resource resource, long index)
Deprecated.Fires a resourceAdded() ResourceListEvent.- Overrides:
fireResourceAdded
in classResourceList
- Parameters:
resource
- The resource.index
- The index.
-
getNumberOfPages
public int getNumberOfPages()
Deprecated.Returns the number of pages in the list buffer.- Returns:
- The number of pages in the list buffer.
-
getPageSize
public int getPageSize()
Deprecated.Returns the page size of the list buffer.- Returns:
- The page size, in number of resources, of the list buffer.
-
isResourceAvailable
public boolean isResourceAvailable(long index) throws ResourceException
Deprecated.Indicates if the resource is available. This means that the resource has been loaded.- Overrides:
isResourceAvailable
in classResourceList
- Parameters:
index
- The index.- Returns:
- true if the resource is available, false if the resource is not available or the list is not open.
- Throws:
ResourceException
- If an error occurs.
-
open
public void open() throws ResourceException
Deprecated.Opens the list. The list must be open in order to perform most operations. This method has no effect if the list is already opened.- Overrides:
open
in classResourceList
- Throws:
ResourceException
- If an error occurs.
-
refreshContents
public void refreshContents() throws ResourceException
Deprecated.Refreshes the contents of the list.This will implicitly open the list if needed.
- Overrides:
refreshContents
in classResourceList
- Throws:
ResourceException
- If an error occurs.
-
resourceAt
public Resource resourceAt(long index) throws ResourceException
Deprecated.Returns the resource specified by the index.This will implicitly open the list if needed.
- Overrides:
resourceAt
in classResourceList
- Parameters:
index
- The index.- Returns:
- The resource specified by the index, or null if the resource is not yet available.
- Throws:
ResourceException
- If an error occurs.
-
setNumberOfPages
public void setNumberOfPages(int numberOfPages)
Deprecated.Sets the number of pages in the list buffer. This cannot be set when the list is open.- Parameters:
numberOfPages
- The number of pages.
-
setPageSize
public void setPageSize(int pageSize)
Deprecated.Sets the page size of the list buffer. This cannot be set when the list is open.- Parameters:
pageSize
- The page size, in number of resources.
-
-