An object context object acts as a source of objects from a session. The context component isolates its user against other changes made in the same session. It ensures that the objects returned from the context do not suffer from broken weak references.
Public Member Functions | |
HRESULT | AddChild ([in] IDSSObjectContext *pChild,[in, defaultvalue(0)] VARIANT_BOOL IsMerged) |
Add an existing object context to the collection of child contexts of this context. | |
HRESULT | ChildCount ([out, retval] Int32 *pCount) |
Get the number of immediate child contexts of this context. | |
HRESULT | ChildItem ([in] Int32 Index,[out, retval] IDSSObjectContext ppChild) |
Get a child context specified by its index number. | |
HRESULT | ClearChildren () |
Remove all child contexts from this context. | |
HRESULT | CopyContext ([in, defaultvalue(0)] EnumDSSContextFlags Flags,[out, defaultvalue(0)] IDSSObjectContext oppNewHeadEditContext,[out, defaultvalue(0), retval] IDSSObjectContext oppNewContext) |
Duplicate this object context component. | |
HRESULT | CopyObject ([in] IDSSObjectInfo *pKey,[in, defaultvalue(0)] IDSSObjectInfo *pProject,[in, defaultvalue(0)] EnumDSSContextFlags Flags,[out, retval] IDSSObjectInfo2 ppObject) |
Create a new object within this context by copying an existing object. | |
HRESULT | Count ([out, retval] Int32 *pCount) |
Get the number of objects about which the context directly records information. | |
HRESULT | EditContext ([in, defaultvalue(0)] VARIANT_BOOL EnsureContext,[out, retval] IDSSObjectContext ppEditContext) |
Get the edit context for this context. | |
HRESULT | ExecuteSearch ([in] IDSSSearch *pSearchObject,[in, defaultvalue(0)] Int32 pFlags,[in, defaultvalue(0)] IDSSFolder *pExistingFolder,[out, retval] IDSSFolder ppNewFolder) |
Search objects through the context and metadata together. | |
HRESULT | FindEmbeddedObjectByID ([in] BSTR ID,[in] EnumDSSObjectType Type,[in, defaultvalue("")] BSTR ContainerID,[in, defaultvalue(0)] EnumDSSObjectType ContainerType,[in, defaultvalue("")] BSTR ProjectID,[in, defaultvalue(1)] EnumDSSContextStatus Status,[in, defaultvalue(0)] EnumDSSContextFlags Flags,[out, retval] IDSSObjectInfo2 ppObject) |
Get an instance of an embedded object specified by ID. | |
HRESULT | FindObject ([in] IDSSObjectInfo *pKey,[in, defaultvalue(1)] EnumDSSContextStatus Status,[in, defaultvalue(0)] EnumDSSContextFlags Flags,[out, retval] IDSSObjectInfo2 ppObject) |
Get an instance of the specified object. | |
HRESULT | FindObjectByID ([in] BSTR ID,[in] EnumDSSObjectType Type,[in, defaultvalue("")] BSTR ProjectID,[in, defaultvalue(1)] EnumDSSContextStatus Status,[in, defaultvalue(0)] EnumDSSContextFlags Flags,[out, retval] IDSSObjectInfo2 ppObject) |
Get an instance of an object specified by ID. | |
HRESULT | GetContextInfo ([in] IDSSObjectInfo *pKey,[out, retval] IDSSObjectContextInfo ppContextInfo) |
Get information about a particular object in the context. | |
HRESULT | IsChildMerged ([in] IDSSObjectContext *pChild,[out, retval] VARIANT_BOOL *pIsMerged) |
Get whether the given context is merged with this context.. | |
HRESULT | IsMerged ([out, retval] VARIANT_BOOL *pIsMerged) |
Get whether this context has been merged with some other context. | |
HRESULT | IsReadOnly ([in] VARIANT_BOOL ReadOnly) |
Put whether this context is read-only. | |
HRESULT | IsReadOnly ([out, retval] VARIANT_BOOL *pReadOnly) |
Get whether this context is read-only. | |
HRESULT | NewContextCollection ([out, retval] IDSSContextCollection oppCollection) |
Construct a new context collection based on this context. | |
HRESULT | NewIterator ([in, defaultvalue(0)] EnumDSSContextFlags Flags,[out, retval] IDSSObjectContextIterator ppIterator) |
Get an iterator to walk through the members in the object context. | |
HRESULT | NewObject ([in] EnumDSSObjectType Type,[in, defaultvalue(0)] IDSSObjectInfo *pProject,[in, defaultvalue(0)] EnumDSSContextFlags Flags,[out, retval] IDSSObjectInfo2 ppObject) |
Create a new object within this context with the specified object type. | |
HRESULT | Remove ([in] IDSSObjectInfo *pObject,[in, defaultvalue(0)] EnumDSSContextFlags Flags) |
Remove a given object from the object context. | |
HRESULT | RemoveChild ([in] IDSSObjectContext *pChild) |
This context should no longer consider the given context as a child context. | |
HRESULT | SaveAll ([in, defaultvalue(0)] EnumDSSContextFlags Flags) |
Save all changes from this context to the object source. | |
HRESULT | Source ([out, retval] IDSSSource4 ppSource) |
Get the object source that backs up this context. | |
HRESULT | TakeOwnership ([in] IDSSObjectInfo *pObject,[in, defaultvalue(0)] EnumDSSContextFlags Flags) |
Move an owned object to a given merged context. | |
HRESULT | UserRuntime ([out, retval] IDSSUserRuntime ppRuntime) |
Get the user runtime for the user who made this context. |
|
Add an existing object context to the collection of child contexts of this context. This method has no effect if the context is already a child context of this context.
|
|
Get the number of immediate child contexts of this context. This count does not include grandchild contexts or any remoter descendents. It does not matter if a child context has been merged with this context.
|
|
Get a child context specified by its index number.
|
|
Remove all child contexts from this context. This method removes both read-only and merged child contexts.
|
|
Duplicate this object context component. The new object context component contains identical copies of all of the objects in the original object context. If we ever support sharing (to allow two unmodified objects in different contexts to share their data) then owned but not checked out objects would be shared between the original and new context.
|
|
Create a new object within this context by copying an existing object. A newly created object always has checked out status.
|
|
Get the number of objects about which the context directly records information. Only stand-alone and managed objects are included in the count. Embedded objects and objects held by child contexts are not included.
|
|
Get the edit context for this context. An edit context is a different object context with a single child (this context). Most object context methods can be used on an edit context. Objects can be checked out from the main context into its edit context. When objects are saved from the edit context they are put back into this context. An edit context can be created from an edit context. Only read-write contexts may have edit contexts.
|
|
Search objects through the context and metadata together.
|
|
Get an instance of an embedded object specified by ID. This method behaves the same as the FindObject method. The difference between the methods is how the user specifies which object should be returned.
|
|
Get an instance of the specified object. This method is used both to obtain an object and to change an object's status within the context. It requests an instance of an object and may also specify the desired status of the object. In some cases the context modifies the status of the object to satisfy the request.
|
|
Get an instance of an object specified by ID. This method behaves the same as the FindObject method. The difference between the methods is how the user specifies which object should be returned.
|
|
Get information about a particular object in the context. This method has no side effects on the state of the context component. This method will succeed if the context records that the object is missing.
|
|
Get whether the given context is merged with this context.. When two contexts are merged both of them can see objects in the other context.
|
|
Get whether this context has been merged with some other context.
|
|
Put whether this context is read-only. A read-only context cannot be modified. A user might want to make a context read-only in order to allow the context to be shared across threads without risking an AV.
|
|
Get whether this context is read-only. A read-only context cannot be modified. A user might want to make a context read-only in order to allow the context to be shared across threads without risking an AV.
|
|
Construct a new context collection based on this context. The collection is used to perform bulk load operation. That is a number of objects can be requested and then loaded together.
|
|
Get an iterator to walk through the members in the object context. The iterator will include all members of the collection in the context when it was constructed. If the context is modified, new members are not guaranteed to appear in the iterator, but might appear. It is safe to modify the context during iteration, even if the modification is done from another thread.
|
|
Create a new object within this context with the specified object type. A newly created object always has checked out status.
|
|
Remove a given object from the object context. Any object for the context is discarded.
|
|
This context should no longer consider the given context as a child context. This method can only be used to remove immediate child contexts of this context. Grandchild contexts can only be removed by modifying their own parents.
|
|
Save all changes from this context to the object source. This method saves all (non-temporary) objects checked out in this context. It does not matter if the object has been modified since it was checked out. The objects are saved with a single transaction. This method does nothing if no changes were made using this object context.
|
|
Get the object source that backs up this context. This is the source from makes the objects held by the context. If the user saves changes, then this source is invoked to perform the save.
|
|
Move an owned object to a given merged context. When two contexts are merged an owned object can only appear in one of the contexts. In most respects it does not make any difference which context contains the object. However the owner does make a difference when iterating through the context's objects and serializing. Occassionally it is useful to move an object between contexts.
|
|
Get the user runtime for the user who made this context. All requests from the context to the object source will be made on behalf of this user.
|