Click or drag to resize
DynamicRecord Class

[This is preliminary documentation and is subject to change.]

Holds one record read from dynamic data model (and optionally relations to sub-records as described by DataDictionary structure).
Inheritance Hierarchy
SystemObject
  CSC.SC.TOPICA4.DynamicDataDynamicRecord

Namespace: CSC.SC.TOPICA4.DynamicData
Assembly: CSC.SC.TOPICA4.DynamicData (in CSC.SC.TOPICA4.DynamicData.dll) Version: 4.30.6239.27195
Syntax
C#
public class DynamicRecord

The DynamicRecord type exposes the following members.

Constructors
  NameDescription
Public methodDynamicRecord(DataRow)
Construct a DynamicRecord from a DataRow only. ONLY to be used for data that is NOT stored in table in Data Dictionary.
Public methodDynamicRecord(DataDictionaryTable)
Construct a DynamicRecord with field/column structure as specifed by DataDictionary table. The constructed record is empty, e.g. no fields have values.
Public methodDynamicRecord(DataDictionaryTable, Boolean)
Construct a DynamicRecord with field/column structure as specifed by DataDictionary table. The constructed record is empty, e.g. no fields have values.
Public methodDynamicRecord(DataDictionaryTable, DataRow)
Construct a DynamicRecord from a DataRow
Public methodDynamicRecord(Database, DataDictionaryTable, Int32)
Construct a DynamicRecord with field/column structure as specifed by DataDictionary table. The constructed record is read from database, e.g. fields have values corresponding to the database record/row.
Top
Methods
  NameDescription
Public methodAsDataTable
Construct a DataTable, with 2 columns (FieldName and FieldValue) and same number of rows as number of fields in this record
Public methodAsString
String representation for debugging etc.
Public methodContainsField
Check if record contains speficifed field name
Public methodDBDelete
Delete from database
Public methodDBGetAncestorRecords
Return all ancestor records
Public methodDBGetParentRecord
Return "parent record" (each record is supposed to be "owned" by one an only one record). Root record (e.g. a record belonging to the root table) will return null.
Public methodDBGetParentRecordIncludePatient
Return "parent record" (each record is supposed to be "owned" by one an only one record)
Public methodDBGetRoot
Return "root" record
Public methodDBGetStructureType
Get ancestor record that has matching structureType
Public methodDBGetSubrecordCount
Get number of subrecords from a specific table
Public methodDBGetSubrecords(Database, DataDictionary)
Read subrecords from database - read from all "child" tables according to DataDictionary
Public methodDBGetSubrecords(Database, DataDictionaryTable)
Read subrecords from database - read from one specified table
Public methodDBGetSubrecords(Database, DataDictionaryTable, String)
Read subrecords from database - read from one specified table
Public methodDBGetSubrecords(Database, DataDictionary, String, Boolean)
Read subrecords from database - read from all "child" tables according to DataDictionary. Sort by speficified fields - obviously this field is supposed to exist in all tables.
Public methodDBGetSubrecords(Database, DataDictionaryTable, String, Boolean)
Read subrecords from database - read from one specified table and sort by specified field
Public methodDBInsert
Insert into database
Public methodDBLoad
Load from DataRow
Public methodDBRead
Read from database by id
Public methodDBUpdate
Update in database
Public methodDebugPrintLong
Print to debug listener - long version
Public methodDebugPrintLong(String)
Print to debug listener - long version
Public methodDebugPrintShort
Print to debug listener - short version
Public methodDebugPrintShort(String)
Print to debug listener - short version
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsNull
Check if field fieldName is null (actually, DBNull)
Public methodLinkAllParentRecords
Establish relations to all ancestors records
Public methodLinkParentRecord
Establish relation to parent record
Public methodLinkPatient(Int32)
Link this to patient given by patientId
Public methodLinkPatient(DynamicRecord)
Link dynamicRecord to patinet given by this
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPrepareSubRecordsUpdate
This method returns an empty DynamicRecordCollection for a given dataDictionaryTable. When this DynamicRecord is saved the database will be updated to reflect that collection for the given dataDictionaryTable.
Public methodToString
String representation for debugging etc.
(Overrides ObjectToString.)
Public methodWriteLong(TextWriter, String)
Write to TextWriter - long version
Public methodWriteLong(TextWriter, String, Database, DataDictionary)
Write to TextWriter - long version
Public methodWriteShort(TextWriter, String)
Write to TextWriter - short version
Public methodWriteShort(TextWriter, String, Database, DataDictionary)
Write to TextWriter - short version
Top
Properties
  NameDescription
Public propertyCaption
Display name
Public propertyDataDictionaryTable
Reference to DataDictionary table
Public propertyDataRow
Field values
Public propertyHasID
Does this record have an ID? No ID means that it has not been read from database.
Public propertyID
Unique ID read from database. NB: will FAIL if ID is not set (typically because record has not been read from database)!
Public propertyTableName
Table name
Top
See Also