Should return an instance of the class that is associated with this collection of objects. The associated class must implement the IDatabaseObjectMultipleSubclass interface.

Namespace: DatabaseObjects.Generic
Assembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0

Syntax

C#
protected abstract T ItemInstanceForSubclass_(
	SQLFieldValues objFieldValues
)
Visual Basic
Protected MustOverride Function ItemInstanceForSubclass_ ( _
	objFieldValues As SQLFieldValues _
) As T
Visual C++
protected:
virtual T ItemInstanceForSubclass_(
	SQLFieldValues^ objFieldValues
) abstract

Parameters

objFieldValues
Type: DatabaseObjects.SQL..::..SQLFieldValues
The database record field values that can be used to determine the type of subclass to be loaded. Do NOT call ObjectFromFieldValues() or ObjectLoad(). These functions are called after ItemInstanceForSubclass returns. from this function.

Return Value

[Missing <returns> documentation for "M:DatabaseObjects.Generic.DatabaseObjectsMultipleSubclass`1.ItemInstanceForSubclass_(DatabaseObjects.SQL.SQLFieldValues)"]

Examples

CopyC#
Protected Overrides Function ItemInstanceForSubclass_(ByVal objFieldValues As SQL.SQLFieldValues) 

    If objSubclassRecord("Type") = "Special" Then
        Return New SpecialisedProduct
    Else
        Return New Product
    End If

End Function

See Also