Click or drag to resize

RecordClass Class

This is a 'base' class for type strong SQL table record objects. RecordClass is a MustInherit class, only classes derived from RecordClass can access member of this class.

RecordClass has tree constructors. New(), New(DataRow) and New(IDataReader). Derived classes MUST call one of these constructors, typically using a MyBase.New(?) call.

Inheritance Hierarchy

Namespace:  Dynamicweb.News
Assembly:  Dynamicweb.News (in Dynamicweb.News.dll) Version: 1.0.10
Syntax
public abstract class RecordClass

The RecordClass type exposes the following members.

Constructors
  NameDescription
Public methodRecordClass
Initializes a new instance of the RecordClass class.
Public methodCode exampleRecordClass(DataRow)
Constructor that takes a DataRow as a input parameter. Assignment itself is done in the Sub AssignAllRow. The property Row contains the datarepresentation at the time of construction. Assignment of the derived classes properties in general use beyound the constructor is NOT reflected in the DataRow property Row.
Public methodRecordClass(IDataReader)
Constructor that takes a Datareader as a input parameter. Assignment itself is done in the Sub AssignAllReader. The DataRow property Row is not assigned any values sinces the IDataReader does not represent its data as a DataRow object.
Top
Properties
  NameDescription
Public propertyRow
This property handles the DataRow that the parrentclass assign when using the New(DataRow) constructor
Top
Methods
  NameDescription
Public methodCode exampleAssignAllReader
AssignAllReader is defined Overridable and is supposed to be overriden in the subclass
Public methodCode exampleAssignAllRow
AssignAllRow is defined Overridable and is supposed to be overriden in the subclass
Public methodFieldExists(DataRow, String)
Examines the DataRow (rwDataRow) passed in for the existance of strName. If the field exists and the field is 'something' as opposed to 'not Nothing' the function returns true. AssignAllRow for an example.
Public methodFieldExists(IDataReader, String)
Examines the IDataReader (drDataReader) passed in for the existance of strName. If the field exists and the field is 'something' as opposed to 'not Nothing' the function returns true. AssignAllReader for an example.
Top
Remarks
Examples
A short example that illustrates the context the class is used in.
Public Class TemplateClass
    Inherits RecordClass

    Private _TemplateID As System.Int32

    Property TemplateID() As System.Int32
        Get
           Return _TemplateID
        End Get
        Set(ByVal Value As System.Int32)
           _TemplateID = Value
        End Set
    End Property

    ' implementation details ...

End Class
See Also