Diffusion .NET Client Library  6.1.5
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
PushTechnology.ClientInterface.Data.Record.Model.IRecordModel Interface Reference

IRecordV2 data model. More...

Inheritance diagram for PushTechnology.ClientInterface.Data.Record.Model.IRecordModel:
PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel

Public Member Functions

string Get (string recordName, int recordIndex, string fieldName, int fieldIndex)
 Returns a field value. More...
 
string Get (string key)
 Returns a field value. More...
 
int RecordCount (string recordName)
 Returns the actual number of occurrences of a named record. More...
 
int FieldCount (string recordName, int recordIndex, string fieldName)
 Returns the actual number of occurrences of a named field within a specified record occurrences. More...
 
IRecordV2 AsValue ()
 Creates an immutable IRecordV2 object generated from the model. More...
 

Detailed Description

IRecordV2 data model.

A read only model can be created from any IRecordV2 object using the IRecordV2.AsModel(Schema.ISchema) method. The model then provides direct access to the fields within the data. Fields may be accessed either by explicitly specifying the record and field occurrence or by specifying a key of the form: "RecordName(RecordIndex).FieldName(fieldIndex)".

Indexes start from 0 and if omitted then 0 is assumed. The record name may also be omitted, in which case the first record definition will be used. This form of addressing is useful when there is only one record definition.

So valid keys would be:

Key
Description

<decription>Address(4).AddressLine(3)</decription> <decription>The 4th AddressLine occurrence within the 5th Address record</decription> <decription>Address.Name</decription> <decription>The first (or only) Name field within the first (or only) Address record</decription> <decription>AddressLine(1)</decription> <decription>The 2nd AddressLine field within the first (or only) record</decription> <decription>Name</decription> <decription>The first (or only) Name field within the first (or only) record</decription>

The RecordCount(string) and FieldCount(string, int, string) methods are useful for determining the actual number of occurrences of variable multiplicity items.

Implemented in Version 6.0.

Member Function Documentation

IRecordV2 PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.AsValue ( )

Creates an immutable IRecordV2 object generated from the model.

Returns
The new immutable IRecordV2 object.
int PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.FieldCount ( string  recordName,
int  recordIndex,
string  fieldName 
)

Returns the actual number of occurrences of a named field within a specified record occurrences.

For all but variable fields this simply returns the schema defined number of occurrences of the field.

Parameters
recordNameThe record name.
recordIndexThe record index.
fieldNameThe field name.
Returns
The actual number of occurrences of the field.
string PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.Get ( string  recordName,
int  recordIndex,
string  fieldName,
int  fieldIndex 
)

Returns a field value.

Parameters
recordNameThe name of the record.
recordIndexThe index of the record.
fieldNameThe name of the field.
fieldIndexThe index of the field.
Returns
The field value.
string PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.Get ( string  key)

Returns a field value.

This allows an item to be addressed using a key of the form "RecordName(RecordIndex).FieldName(FieldIndex)". Indices may be omitted in which case 0 is assumed. The record part may also be omitted in which case the first occurrence of the first record is assumed.

Parameters
keyThe filed key.
Returns
The field value.
int PushTechnology.ClientInterface.Data.Record.Model.IRecordModel.RecordCount ( string  recordName)

Returns the actual number of occurrences of a named record.

If the record is not variable, this is the same as the defined number of occurrences in the schema.

Parameters
recordNameThe record name.
Returns
The actual number of occurrences of the record.

The documentation for this interface was generated from the following file: