com.businessobjects.customds
Class AbstractCustomDataProvider

java.lang.Object
  extended by com.businessobjects.customds.AbstractCustomDataProvider
All Implemented Interfaces:
CustomDataProvider

public abstract class AbstractCustomDataProvider
extends java.lang.Object
implements CustomDataProvider

AbstractCustomDataProvider is an abstract implementation class for CustomDataProvider.

This class provides default implementation for few methods in CustomDataProvider. Methods that require plug-in specific implementation must be implemented by plug-in developers.

Since:
12.2

Constructor Summary
AbstractCustomDataProvider()
           
 
Method Summary
 void cancel(int iterId)
          Default empty implementation.
 void closeIterator(int iterId)
          Removes the IteratorInfo object with the specified iterator ID from the iterator collection.
 void openIterator(IteratorInfo iteratorInfo, ColumnSpec[] columnSpecs)
          Stores the complete IteratorInfo information in the iterator collection.
 void setChunkSize(int iterId, int chunkSize)
          Sets the internal data chunk size value to the value specified by chunkSize.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.businessobjects.customds.CustomDataProvider
getNextChunk, hasNextChunk
 

Constructor Detail

AbstractCustomDataProvider

public AbstractCustomDataProvider()
Method Detail

cancel

public void cancel(int iterId)
Default empty implementation.

Specified by:
cancel in interface CustomDataProvider
Parameters:
iterId - The iterator ID.
See Also:
CustomDataProvider.cancel(int)

closeIterator

public void closeIterator(int iterId)
Removes the IteratorInfo object with the specified iterator ID from the iterator collection.

Sub-classes can access the iterator ID through the member variable iterators.

Specified by:
closeIterator in interface CustomDataProvider
Parameters:
iterId - The iterator ID.
See Also:
CustomDataProvider.closeIterator(int), IteratorInfo

openIterator

public void openIterator(IteratorInfo iteratorInfo,
                         ColumnSpec[] columnSpecs)
                  throws DataSourceException
Stores the complete IteratorInfo information in the iterator collection.

Sub-classes can access this information through the member variable iterators.

This method also sets the IteratorInfo.isRowCountBased property to false.

Specified by:
openIterator in interface CustomDataProvider
Parameters:
iteratorInfo - The iterator information.
columnSpecs - An array of ColumnSpec containing the information about objects used for data provider creation.
Throws:
DataSourceException - if the plug-in encounters any Exception while preparing itself to provide data. Plug-in must mask handled exceptions as DataSourceException by using one of its constructors.
See Also:
CustomDataProvider.openIterator(com.businessobjects.customds.common.IteratorInfo, com.businessobjects.customds.common.ColumnSpec[]), IteratorInfo, ColumnSpec, DataSourceException

setChunkSize

public void setChunkSize(int iterId,
                         int chunkSize)
                  throws DataSourceException
Sets the internal data chunk size value to the value specified by chunkSize.

Sub-classes can access this information through the member variable chunkSize.

The chunk size is similar for all Data Iterators. Hence, the chunk size is not linked with the individual IteratorInfo object.

Specified by:
setChunkSize in interface CustomDataProvider
Parameters:
iterId - The Data Iterator ID
chunkSize - The chunk size set by the Framework.
Throws:
DataSourceException - if the plug-in encounters any Exception while trying to set the chunk size. Plug-in must mask handled exceptions as DataSourceException by using one of its constructors.
See Also:
CustomDataProvider.setChunkSize(int, int), IteratorInfo, DataSourceException