com.crystaldecisions.sdk.occa.report.data
Class RecordBatch

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.data.RecordBatch
All Implemented Interfaces:
IRecordBatch, IClone

public class RecordBatch
extends java.lang.Object
implements IRecordBatch, IClone

This object stores a batch of records from the database. To navigate the records in the record batch you must use a cursor created using com.crystaldecisions.sdk.occa.report.application.RowsetController#createCursor(IGroupPath groupPath, IRowsetMetaData metaData). When possible, use the IRecordBatch interface to manipulate this object.


Constructor Summary
RecordBatch()
           
RecordBatch(IRecordBatch src)
           
 
Method Summary
 java.lang.Object clone(boolean deepClone)
           
 void copyTo(java.lang.Object destObject, boolean deepCopy)
           
 ICursor createCursor(CursorType cursorType, int reserved)
           Creates a cursor for this record batch.
 java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
           For internal use only.
 void endElement(java.lang.String eleName, java.util.Map objState)
           For internal use only.
 void ensureCapacity(int maxCapacity)
           Pre-allocates memory for the collection's array.
 int getFirstRecordKey()
           Returns the key of the first record in the record batch.
 Record getRecord(int index)
           Returns the record at the specified index.
 int getRecordCount()
           Returns the number of records in the record batch.
 boolean hasContent(java.lang.Object srcRecordBatch)
           
 void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
           For internal use only.
 void removeAll()
           Removes all records from this record batch.
 void save(com.crystaldecisions.xml.serialization.XMLWriter writer, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
           For internal use only.
 void save(com.crystaldecisions.xml.serialization.XMLWriter writer, java.lang.String sTag, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
           For internal use only.
 void saveContents(com.crystaldecisions.xml.serialization.XMLWriter writer, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
           For internal use only.
 void setFirstRecordKey(int firstRecordKey)
           Sets the key of the first record in the record batch.
 void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
           For internal use only.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordBatch

public RecordBatch(IRecordBatch src)

RecordBatch

public RecordBatch()
Method Detail

clone

public java.lang.Object clone(boolean deepClone)

copyTo

public void copyTo(java.lang.Object destObject,
                   boolean deepCopy)

createCursor

public ICursor createCursor(CursorType cursorType,
                            int reserved)
Description copied from interface: IRecordBatch

Creates a cursor for this record batch.

Specified by:
createCursor in interface IRecordBatch
Parameters:
cursorType - The type of cursor to be created.
reserved - Reserved for future use.
Returns:
A cursor for this record batch.

createMember

public java.lang.Object createMember(java.lang.String eleName,
                                     org.xml.sax.Attributes attrs,
                                     com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt,
                                     java.util.Map objState,
                                     boolean[] bLoaded)

For internal use only.


endElement

public void endElement(java.lang.String eleName,
                       java.util.Map objState)

For internal use only.


ensureCapacity

public void ensureCapacity(int maxCapacity)
Description copied from interface: IRecordBatch

Pre-allocates memory for the collection's array. Use this method if you know exactly how many items you will be adding after calling this method; doing so will improve performance. This method does not affect the RecordCount property until items have been added. If you call this method with maxCapacity = 10, the array for the collection will be increased to accommodate 10 items, but if you have not added any items, getRecordCount will still return zero.

Specified by:
ensureCapacity in interface IRecordBatch
Parameters:
maxCapacity - The size of the array.

getFirstRecordKey

public int getFirstRecordKey()
Description copied from interface: IRecordBatch

Returns the key of the first record in the record batch.

Specified by:
getFirstRecordKey in interface IRecordBatch
Returns:
An int that specifies the key of the first record in the record batch.

getRecord

public Record getRecord(int index)

Returns the record at the specified index.

Parameters:
index - The index of the desired record.
Returns:
The Record object at the specified index.

getRecordCount

public int getRecordCount()
Description copied from interface: IRecordBatch

Returns the number of records in the record batch. Use the RowsetController's getRowsetBatchSize method to specify the number of records in each batch in the rowset.

Specified by:
getRecordCount in interface IRecordBatch
Returns:
An int that specifies the number of records in the record batch.

hasContent

public boolean hasContent(java.lang.Object srcRecordBatch)

readElement

public void readElement(java.lang.String eleName,
                        java.lang.String sVal,
                        org.xml.sax.Attributes attrs,
                        java.util.Map objState)

For internal use only.


removeAll

public void removeAll()
Description copied from interface: IRecordBatch

Removes all records from this record batch.

Specified by:
removeAll in interface IRecordBatch

save

public void save(com.crystaldecisions.xml.serialization.XMLWriter writer,
                 com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

save

public void save(com.crystaldecisions.xml.serialization.XMLWriter writer,
                 java.lang.String sTag,
                 com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

saveContents

public void saveContents(com.crystaldecisions.xml.serialization.XMLWriter writer,
                         com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
                  throws java.io.IOException

For internal use only.

Throws:
java.io.IOException

setFirstRecordKey

public void setFirstRecordKey(int firstRecordKey)
Description copied from interface: IRecordBatch

Sets the key of the first record in the record batch.

Specified by:
setFirstRecordKey in interface IRecordBatch
Parameters:
firstRecordKey - An int that specifies the key of the first record in the record batch.

startElement

public void startElement(java.lang.String eleName,
                         java.util.Map objState,
                         org.xml.sax.Attributes attrs)

For internal use only.