com.businessobjects.customds.common
Class Chunk

java.lang.Object
  extended by com.businessobjects.customds.common.Chunk

public class Chunk
extends java.lang.Object

The Chunk class contains the data provided by the plug-in.

Data contained in this object is presented in tabular format (columns and rows). A Chunk object must be created by specifying the collection of ColumnSpec. Rows of data are then added by calling the Chunk.addRow(Row) method.

NOTE: The plug-in must add rows with the same number of columns as length of ColumnSpec collection and similar data-types as specified in each ColumnSpec. The Framework throws an exception if the Row object is null, or if there is a mismatch between the row values and the ColumnSpec provided while creating the Chunk object.

Since:
12.2

Constructor Summary
Chunk(ColumnSpec[] arrColumnSpec)
          The Chunk class constructor creates data chunks with specified column information.
 
Method Summary
 void addRow(Row row)
          Adds a row of columnar data to the Chunk object.
 void addRows(java.util.Collection rows)
          Adds rows of columnar data to the Chunk object.
 void clear()
          Clears all the rows added to the Chunk object.
 java.util.Collection getChunkData()
          Internal Use Only
 ColumnSpec[] getColumnSpecs()
          Internal Use Only
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chunk

public Chunk(ColumnSpec[] arrColumnSpec)
      throws DataSourceException
The Chunk class constructor creates data chunks with specified column information.

Parameters:
arrColumnSpec - An array of ColumnSpec containing information about objects used for data provider creation.
Throws:
DataSourceException - if array of ColumnSpec is null, zero length, or if any of the ColumnSpecs is null.
See Also:
ColumnSpec, CustomDataSource, DataSourceException
Method Detail

addRow

public void addRow(Row row)
            throws DataSourceException
Adds a row of columnar data to the Chunk object.

The plug-in must add rows with the same number of columns and similar data-types for column values that confirm to the ColumnSpec provided while creating the Chunk object.

Parameters:
row - The Row of data to be added.
Throws:
DataSourceException - if the Row object is null, or if there is a mismatch between the row values and the ColumnSpec provided while creating the Chunk object.

See Also:
ColumnSpec, Row, DataSourceException

addRows

public void addRows(java.util.Collection rows)
             throws DataSourceException
Adds rows of columnar data to the Chunk object.

The collection must consist of Row objects.

The plug-in must add rows with the same number of columns and similar data-types for column values that confirm to the ColumnSpec provided while creating the Chunk object.

Parameters:
rows - The collection containing Row(s) of data.
Throws:
DataSourceException -

In the following scenarios:

  • If the Collection is null.
  • If the collection contains object other than Row objects.
  • If the Row object in the collection is null.
  • If there is a mismatch between the row values and the ColumnSpec provided while creating the Chunk object.

See Also:
ColumnSpec, Row, DataSourceException

clear

public void clear()
Clears all the rows added to the Chunk object.


getChunkData

public java.util.Collection getChunkData()

Internal Use Only


getColumnSpecs

public ColumnSpec[] getColumnSpecs()

Internal Use Only