Chili.Opf3 Send comments on this topic.
IRelationsPopulateHelper Interface
See Also  Members   Example
Chili.Opf3 Namespace : IRelationsPopulateHelper Interface




Interface that is implemented to control the way how relations are loaded.

Syntax

Visual Basic (Declaration) 
Public Interface IRelationsPopulateHelper 
Visual Basic (Usage)Copy Code
Dim instance As IRelationsPopulateHelper
C# 
public interface IRelationsPopulateHelper 
Managed Extensions for C++ 
public __gc __interface IRelationsPopulateHelper 
C++/CLI 
public interface class IRelationsPopulateHelper 

Example

The following example shows how to implement the interface. In the following example all the related properties aren't populate.
C#Copy Code
             [Persistent("USER")] 
public class User : IRelationsPopulateHelper 

                   // ... Other properties and code. 
                     
   bool IRelationsPopulateHelper.RelationIsHandled(string relationName, RelationInformation info) 
   { 
       // Return true for all relations. Means all are handled by this interface. 
       return true; 
   } 
 
   object IRelationsPopulateHelper.GetRelatedObject(string relationName, RelationInformation info) 
   { 
      // Return null for all relations. No related object is going to be populated. 
      return null; 
   } 

    

Remarks

This interface is implemented by classes that won't let the framework automatically populate the relations with data.

If the framework encounters a persistent object that implements this interface it asks the persistent if to populate it. The persistent returns whether to do it on its own or to let the framework populate it. If the interface loads the related data a second method is invoked to do the loading.

Requirements

Namespace: Chili.Opf3

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Chili.Opf3 (in Chili.Opf3.dll)

See Also