|
ibi Patterns .NET API
|
Read compound records from a set of record sources. More...
Public Member Functions | |
| NetricsCompoundReader (String parent_tbl_name, NetricsTableRecSrc parent_recs, bool return_orphans) | |
| Create a compound record reader. This creates a compound record reader. It is created with a single parent table. Child tables must be added using the addChildTable method. | |
| void | addChildTable (String child_tbl_name, NetricsTableRecSrc child_recs) |
| override NetricsCompoundRecord | getNext () |
| override bool | hasNext () |
| Returns true if the source has more records. | |
| override void | reset () |
| Reset the source to the first record. | |
| int | getPosition () |
| |
| String | getParentTable () |
| |
| List< String > | getChildTables () |
| |
| abstract NetricsCompoundRecord | getNext () |
| Returns the next record. | |
| abstract bool | hasNext () |
| Returns true if the source has more records. | |
| abstract void | reset () |
| Reset the source to the first record. | |
| bool | hasNext () |
| Returns true if the source has more records. | |
| NetricsBaseRecord | getNext () |
| Returns the next record. | |
| void | reset () |
| Reset the source to the first record. | |
Read compound records from a set of record sources.
Objects of this class provide a means of reading in compound records. A compound record is a parent record along with a set of zero or more child records. It may also be an orphan child record. This class builds compound records from a set of record sources. One source represents the parent table, zero or more additional sources represent the child tables. Each source is associated with a table name, all table names must be unique.
To build compound records it is assumed that all sources are sorted by the parent record key. The child record sources are not sorted by their own key, they must be sorted by the parent record key. In this way the sources can be read in parallel and merged.
|
inline |
Create a compound record reader. This creates a compound record reader. It is created with a single parent table. Child tables must be added using the addChildTable method.
| parent_tbl_name | The name of the parent table. |
| parent_recs | A record source that provides parent records. The records MUST be provided in sort order of the record keys. |
| return_orphans | If true, orphan child records are returned as a NetricsCompoundRecord with no children. If false, orphan child records are quietly skipped. |
| ArgumentException | Thrown if any argument is null or the parent table name is empty (zero length). |
| NetricsRecSrcException | Thrown if there is an error reading the first parent record. |
|
inline |
add a new child table to this compound record reader. This is used to add a child table to this compound record reader. This call should be made before any records are read, but this is not enforced.
| child_tbl_name | the name of the child table. This must not be the same as the name of the parent table or any existing child table. |
| child_recs | this is the source of child records. The records returned by this source should be child records. The records must be returned in sort order of the parent key. |
| ArgumentException | if either argument is null, the table name is zero length, the table name is the same as the parent table or an existing child table. |
| NetricsRecSrcException | if there is an error reading the first record. |
|
inlinevirtual |
return the next record.
| NetricsRecSrcException | if there is an error on any of the underlying readers when reading the next record. |
Implements NetricsServerInterface.NetricsCompoundRecSrc.
|
inlinevirtual |
Returns true if the source has more records.
This may throw an exception if an underlying reader encounters an error.
Implements NetricsServerInterface.NetricsCompoundRecSrc.
|
inlinevirtual |
Reset the source to the first record.
This is only supported if it is supported by all the underlying readers.
Implements NetricsServerInterface.NetricsCompoundRecSrc.