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

The mutable data model of IRecordV2 data based upon a Schema.ISchema. More...

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

Public Member Functions

IMutableRecordModel Set (string recordName, int recordIndex, string fieldName, int fieldIndex, string value)
 Sets a specified field value. More...
 
IMutableRecordModel Set (string key, string value)
 Sets a specified field value. More...
 
IMutableRecordModel Add (string recordName, int recordIndex, params string[] values)
 Adds new values to the end of a variable length field list. More...
 
IMutableRecordModel Add (params string[] values)
 Adds new values to the end of a variable length field list. More...
 
IMutableRecordModel AddRecord ()
 Adds a new initialized record occurrence to the end of a variable multiplicity record list. More...
 
IMutableRecordModel RemoveRecord (int index)
 Removes the specified occurrence of a variable multiplicity record. More...
 
IMutableRecordModel RemoveField (string recordName, int recordIndex, int fieldIndex)
 Removes the specified occurrence of a variable multiplicity field. More...
 
IMutableRecordModel ClearVariableRecords ()
 Removes all optional instances of a variable multiplicity record. More...
 
IMutableRecordModel ClearVariableFields (string recordName, int recordIndex)
 Remove all optional instances of a variable multiplicity field. More...
 
- Public Member Functions inherited from PushTechnology.ClientInterface.Data.Record.Model.IRecordModel
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

The mutable data model of IRecordV2 data based upon a Schema.ISchema.

An initial version of such a model can be created from a schema using the Schema.ISchema.CreateMutableModel method. A model created in this way will have all mandatory fields set to default values.

The model may then be updated as required and then at any time a IRecordV2 object can be generated from the current state using the IRecordModel.AsValue method. The IRecordV2 object may then be used to update a topic.

When values for integer or decimal type fields are supplied the values are validated and normalized.

All mutator methods return the model so that calls can be chained.

Implemented in Version 6.0.

Member Function Documentation

IMutableRecordModel PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel.Add ( string  recordName,
int  recordIndex,
params string[]  values 
)

Adds new values to the end of a variable length field list.

This can only be used for a variable multiplicity field which can only be the last field in a record and therefore the field does not need to be named.

Parameters
recordNameThe name of the record.
recordIndexThe index identifying the occurrence of the record.
valuesThe values to add.
Returns
The current model instance.
IMutableRecordModel PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel.Add ( params string[]  values)

Adds new values to the end of a variable length field list.

This is a convenience method for adding to the end of the last record and is therefore useful when there is only one record type.

Parameters
valuesThe values.
Returns
The current model instance.
IMutableRecordModel PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel.AddRecord ( )

Adds a new initialized record occurrence to the end of a variable multiplicity record list.

As the only variable multiplicity record can be the last one there is no need to name the record. This method will add to the list of occurrences of the last defined record. The record will be initialized with default values appropriate to the schema definition and may then have individual field items set separately.

Returns
The current model instance.
IMutableRecordModel PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel.ClearVariableFields ( string  recordName,
int  recordIndex 
)

Remove all optional instances of a variable multiplicity field.

As a variable repeating field can only be the last or only field within a record then the field name does not need to be specified.

This will only remove field occurrences down to the minimum number of occurrences specified by the schema.

If the last or only field within the record is not defined as variable multiplicity, this would have no effect.

Parameters
recordNameThe name of the record.
recordIndexThe index of the record.
Returns
The current model instance.
IMutableRecordModel PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel.ClearVariableRecords ( )

Removes all optional instances of a variable multiplicity record.

As a variable repeating record can only be the last or only record then the record name does not need to be specified.

This will only remove record occurrences down to the minimum number of occurrences specified by the schema.

If the last or only record is not defined as variable multiplicity, this would have no effect.

Returns
The current model instance.
IMutableRecordModel PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel.RemoveField ( string  recordName,
int  recordIndex,
int  fieldIndex 
)

Removes the specified occurrence of a variable multiplicity field.

A variable multiplicity field must be the last or only field within a record and therefore the field name is not required.

Parameters
recordNameThe name of the record.
recordIndexThe record index.
fieldIndexThe index of the field to remove.
Returns
The current model instance.
IMutableRecordModel PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel.RemoveRecord ( int  index)

Removes the specified occurrence of a variable multiplicity record.

A variable multiplicity record must be the last or only record within a schema and therefore the record name is not required.

Parameters
indexThe index of the record to remove.
Returns
The current model instance.
IMutableRecordModel PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel.Set ( string  recordName,
int  recordIndex,
string  fieldName,
int  fieldIndex,
string  value 
)

Sets a specified field value.

Parameters
recordNameThe name of the record containing the field.
recordIndexThe index of the record containing the field.
fieldNameThe name of the field.
fieldIndexThe index of the field.
valueThe new value.
Returns
The current model instance.
IMutableRecordModel PushTechnology.ClientInterface.Data.Record.Model.IMutableRecordModel.Set ( string  key,
string  value 
)

Sets a specified 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 field key.
valueThe field value.
Returns
The current model instance.

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