| ibi Patterns .NET API

Loading...
Searching...
No Matches
Public Member Functions | List of all members
NetricsServerInterface.NetricsCompoundRecord Class Reference

A parent record with zero or more child records. More...

## Public Member Functions
| NetricsCompoundRecord (String table, String key, String[] fields)
| Create a NetricsCompoundRecord object.
| NetricsCompoundRecord (String table, String key, String parent_key, String[] fields)
| Create a NetricsCompoundRecord object.
| NetricsCompoundRecord (String table, String key, String parent_key, String[] fields, String[] attr_names, String[] attr_values)
| Create a NetricsCompoundRecord object.
| NetricsCompoundRecord (String table, String key, String[] fields, String[] attr_names, String[] attr_values)
| Create a NetricsCompoundRecord object.
| NetricsCompoundRecord (String table, NetricsRecord record)
| Create a NetricsCompoundRecord object from a NetricsRecord.
NetricsRecord | toNetricsRecord ()
| Return this record as new new NetricsRecord object.
void | addChildren (params NetricsCompoundRecord[] children)
| Add zero or more child records to this compound record.
void | addChildren (String child_table, params NetricsRecord[] children)
| Add zero or more standard child records to this compound record.
String | getTable ()
| Get the table this record belongs to.
List< NetricsBaseRecord > | getChildren ()
| Get a list of all children of this record.
List< NetricsBaseRecord > | getChildren (String child_table)
| Get a list of all child records for a particular table.
List< String > | getChildTables ()
| Get a list of all child tables.
String | toBaseString ()
| Return just the base record string version.
override String | ToString ()
| Return a human readable string version of this record.
Public Member Functions inherited from NetricsServerInterface.NetricsBaseRecord
String | getKey ()
| Get the key of a record.
String | getParentKey ()
| Retrieve the parent key of a record.
int | numBytes ()
| Return the number of bytes of data in this record.
String[] | getFields ()
| Can be used to get the content of a record.
String[] | getAttrNames ()
| Returns the names of name/value attributes of the record.
String[] | getAttrValues ()
| Returns the values of name/value attributes of the record.
String | getAttribute (String attr_name)
| Gets the specified attribute value of the record.
override String | ToString ()

## Detailed Description

A parent record with zero or more child records.

A compound record is a joined set of records. It has a parent record, plus zero or more child records from zero or more child tables. Each record is associated with a table. This extends NetricsRecord.

As the child records in a compound record may themselves be compound records with child records of their own, this class supports an hierarchical structure of arbitrary depth. However ibi Patterns supports only a single depth. Hierarchies with a depth greater than two are never returned by ibi™ Patterns - Search.

## Constructor & Destructor Documentation

## ◆ NetricsCompoundRecord() [1/5]

NetricsServerInterface.NetricsCompoundRecord.NetricsCompoundRecord | ( | String | table,
|  | String | key,
|  | String[] | fields
| ) |  |
| inline

Create a NetricsCompoundRecord object.

Parameters

  table | the name of the table this record is associated with.
  key | A unique (user-specified) identifier for the record.
  fields | The actual content associated with the record, one String per field in the table. Use the empty string ("") for a field with no data in it. A field may be no longer than 2^16-3.

## ◆ NetricsCompoundRecord() [2/5]

NetricsServerInterface.NetricsCompoundRecord.NetricsCompoundRecord | ( | String | table,
|  | String | key,
|  | String | parent_key,
|  | String[] | fields
| ) |  |
| inline

Create a NetricsCompoundRecord object.

Parameters

  table | the name of the table this record is associated with.
  key | A unique (user-specified) identifier for the record.
  parent_key | Key of the record's parent. If this is null or empty a standard record is created instead of a child record.
  fields | The actual content associated with the record, one String per field in the table. Use the empty sting for a field with no data in it. A field may be no longer than 2^16-3.

## ◆ NetricsCompoundRecord() [3/5]

NetricsServerInterface.NetricsCompoundRecord.NetricsCompoundRecord | ( | String | table,
|  | String | key,
|  | String | parent_key,
|  | String[] | fields,
|  | String[] | attr_names,
|  | String[] | attr_values
| ) |  |
| inline

Create a NetricsCompoundRecord object.

Parameters

  table | the name of the table this record is associated with.
  key | A unique (user-specified) identifier for the record.
  parent_key | Key of the record's parent. If this is null or empty a standard record is created instead of a child record.
  fields | The actual content associated with the record, one String per field in the table. Use the empty sting for a field with no data in it. A field may be no longer than 2^16-3.
  attr_names | Names of attributes associated with this record.
  attr_values | Values of attributes associated with this record, in the same order as attr_names.

## ◆ NetricsCompoundRecord() [4/5]

NetricsServerInterface.NetricsCompoundRecord.NetricsCompoundRecord | ( | String | table,
|  | String | key,
|  | String[] | fields,
|  | String[] | attr_names,
|  | String[] | attr_values
| ) |  |
| inline

Create a NetricsCompoundRecord object.

Parameters

  table | the name of the table this record is associated with.
  key | A unique (user-specified) identifier for the record.
  fields | The actual content associated with the record, one String per field in the table. Use the empty sting for a field with no data in it. A field may be no longer than 2^16-3.
  attr_names | Names of attributes associated with this record.
  attr_values | Values of attributes associated with this record, in the same order as attr_names.

## ◆ NetricsCompoundRecord() [5/5]

NetricsServerInterface.NetricsCompoundRecord.NetricsCompoundRecord | ( | String | table,
|  | NetricsRecord | record
| ) |  |
| inline

Create a NetricsCompoundRecord object from a NetricsRecord.

This constructor is used to convert a standard record into a compound record.

Parameters

  table | the name of the table this record is associated with.
  record | the NetricsRecord object.

## Member Function Documentation

## ◆ addChildren() [1/2]

void NetricsServerInterface.NetricsCompoundRecord.addChildren | ( | params NetricsCompoundRecord[] | children | ) |
| inline

Add zero or more child records to this compound record.

>

This adds zero or more child records to this compound record. The child records must be children of this record (i.e. it's parent record key must be the key of this record.)

A particular child record for a particular table can appear only once. If a child with this key already exists for the given table it is replaced.

Parameters

  children | the child records to be added.

## ◆ addChildren() [2/2]

void NetricsServerInterface.NetricsCompoundRecord.addChildren | ( | String | child_table,
|  | params NetricsRecord[] | children
| ) |  |
| inline

Add zero or more standard child records to this compound record.

This adds zero or more child records to this compound record. The child records are standard NetricsRecord objects. They are all associated with a specific named child table. The child records must be children of this record (i.e. it's parent record key must be the key of this record.)

A particular child record for a particular table can appear only once. If a child with this key already exists for the given table it is replaced.

Parameters

  child_table | the child table for all child records.
  children | the child records to be added.

## ◆ getChildren() [1/2]

List< NetricsBaseRecord > NetricsServerInterface.NetricsCompoundRecord.getChildren | ( |  | ) |
| inline

Get a list of all children of this record.

This returns only the top level children, it does not recursively decend the record tree to return a flattened list of the entire tree.

Returns
  null if this record has no children, list of all child records otherwise.

## ◆ getChildren() [2/2]

List< NetricsBaseRecord > NetricsServerInterface.NetricsCompoundRecord.getChildren | ( | String | child_table | ) |
| inline

Get a list of all child records for a particular table.

Parameters

  child_table | the name of the child table.

Returns
  null if no children exists for the given table, a list of all child records for the table otherwise.

## ◆ getChildTables()

List< String > NetricsServerInterface.NetricsCompoundRecord.getChildTables | ( |  | ) |
| inline

Get a list of all child tables.

Returns
  a list of all the different child tables the children of this record belong to. A zero length list if this record has no children.

## ◆ getTable()

String NetricsServerInterface.NetricsCompoundRecord.getTable | ( |  | ) |
| inline

Get the table this record belongs to.

Returns
  the name of the table this record belongs to.

## ◆ toBaseString()

String NetricsServerInterface.NetricsCompoundRecord.toBaseString | ( |  | ) |
| inline

Return just the base record string version.

This returns the NetricsRecord.toString output without any of the additional information.

Returns
  as described above.

## ◆ toNetricsRecord()

NetricsRecord NetricsServerInterface.NetricsCompoundRecord.toNetricsRecord | ( |  | ) |
| inline

Return this record as new new NetricsRecord object.

This is used to convert this back to a base NetricsRecord. All table and child record information is of course lost in such a conversion.

Returns
  a NetricsRecord object with the same keys and field values.

## ◆ ToString()

override String NetricsServerInterface.NetricsCompoundRecord.ToString | ( |  | ) |
| inline

Return a human readable string version of this record.

This converts the current compound record into a human readable string. The format is the parent record table name, followed by a comma and the NetricsRecord format string version of the parent record. The child records are then printed out, each proceeded by a new-line and a tab character. The format is recursive, so children of the child record are printed out after the child each with a new-line and an additional tab character.

Returns
  the human readable string form as described above.