Creates a new instance of the subclassable ComponentRelationship class to be persisted in the specified object store. The presence of a classId parameter on a CreateInstance method indicates that the type of class being created is subclassable. The created object does not yet exist in an object store. To persist the created object to the object store, you must explicitly call the Save method, or commit the object via a batch operation. Both approaches cause a round-trip to the server.


Namespace: FileNet.Api.Core
Assembly: FileNet.Api (in filenet.api.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function CreateInstance( _ 
   ByVal os As IObjectStore,  _ 
   ByVal classId As String,  _ 
   ByVal type As ComponentRelationshipType,  _ 
   ByVal parentComponent As IDocument,  _ 
   ByVal name As String _ 
) As IComponentRelationship
C#
public static IComponentRelationship CreateInstance(
   IObjectStore os,
   string classId,
   ComponentRelationshipType type,
   IDocument parentComponent,
   string name
)
C++
public:
 static IComponentRelationship CreateInstance(
   IObjectStore os,
   String classId,
   ComponentRelationshipType type,
   IDocument parentComponent,
   String name
)
J#
public static IComponentRelationship CreateInstance(
   IObjectStore os,
   string classId,
   ComponentRelationshipType type,
   IDocument parentComponent,
   string name
)
JScript
public static  function CreateInstance(
   os : IObjectStore,
   classId : String,
   type : ComponentRelationshipType,
   parentComponent : IDocument,
   name : String
) : IComponentRelationship

Parameters

os
The ObjectStore object in which this class instance is located.
classId
A String identifier for the type of class to be created. The identifier can be specified as the class name constant or the symbolic name for the class. It can also be null, in which case an object of the base class type is returned.
type
A ComponentRelationshipType that specifies the type of compound document relationship between the child document and the parent document.
parentComponent
Specifies the parent document.
name
A String specifying the name of the class.

Return Value

An object reference to a new instance of this class.

See Also