Provides access to method that indicates whether an object can be modified outside of an edit session.
Members
Name | Description | |
---|---|---|
CanBypassEditSession | Indicates if updates to objects can be safely made outside of an edit session. | |
CanBypassStoreMethod | Indicates if updates to objects can bypass the Store method and OnChange notifications for efficiency. |
IObjectClassInfo2.CanBypassEditSession Method
Indicates if updates to objects can be safely made outside of an edit session.
Public Function CanBypassEditSession ( _
) As Boolean
public bool CanBypassEditSession (
);
Remarks
CanBypassEditSessionis a convenience method that returns Trueif the instances of this object class may be created or updated outside of a Geodatabase edit session (an edit session is started by using the StartEditingmethod on the IWorkspaceEditor the StartMultiuserEditing method on the IMultiuserWorkspaceEdit interface).
If True , then applications may update the data in this object class using any of the data updating interfaces and methods described here without starting an edit session. In this case applications are responsible for starting host database transactions as appropriate and for discarding cached object states across transaction boundaries when running on an ArcSDE database.
If False, then applications should always make modifications to the data in this object class within an edit session for correct multi-user behavior and for correct management of database state internally cached by the Geodatabase for the objects in this object class.
This method returns Falsefor network feature classes. By default, this method returns Truefor non-network custom object classes. The developer of a non-network custom object class can change this behavior by implementing this interface on the class extension associated with the class and returning true for the method.
IObjectClassInfo2.CanBypassStoreMethod Method
Indicates if updates to objects can bypass the Store method and OnChange notifications for efficiency.
Public Function CanBypassStoreMethod ( _
) As Boolean
public bool CanBypassStoreMethod (
);
Remarks
CanBypassStoreis a convenience method that returns Trueif the instances of this object class have no custom behavior associated with creating or updating objects and if the object class does not participate in composite relationship classes or in relationship classes that require object notification. A return value of Trueimplies that insert cursors handed out by the geodatabase will internally bypass the CreateRowand Storemechanisms when creating objects. A return value of Falseindicates that insert cursors will not bypass custom Storeor OnChangedbehavior implemented by the custom row object for this class.
By default, this method returns Falsefor custom object classes. The developer of a custom object class can change this behavior by implementing this interface on the class extension associated with the class and returning Truefor the method.
In addition, a developer can implement this interface on the class extension of a simple class and set this property to False . Doing this will ensure that when features in the class are inserted, updated or deleted by editor tools that use insert and update cursors, such as Planarize, Create Features and the Object Loader do not bypass Storeor OnChanged behavior. By default, this property for a simple class is logically True, meaning these tools will not broacast Geodatabase events which in turn are not rebroadcast as editor events (for which a custom editor application may be listening). Set this to False for those classes for which you always want to have these events broadcast. Alternatively, this can be set globally for the entire edit session using the IWorkspaceEditControlinterface.
Classes that implement IObjectClassInfo2
Classes | Description |
---|---|
FeatureClass | Esri Feature Class object. |
ObjectClass | Esri Object Class object. |
RasterCatalog | A collection of raster datasets in a Geodatabase table. |
XYEventSource | XY event source object. |
Remarks
The IObjectClassInfoand IObjectClassInfo2interfaces provide some additional information to IObjectClasson object classes that may be of interest to some applications.
CanBypassStoreMethodis a convenience method that returns Trueif the instances of this object class have no custom behavior associated with creating or updating objects and if the object class does not participate in composite relationship classes or in relationship classes that require object notification. A return value of Trueimplies that insert cursors handed out by the geodatabase will internally bypass the CreateRowand Storemechanisms when creating objects. A return value of Falseindicates that insert cursors will not bypass custom Storeor OnChangedbehavior implemented by the custom row object for this class.
Several geoprocessing tools (i.e. Calculate Field, Append, and Add Field) use insert cursors. For an extended class with custom behavior defined by the IObjectClassEvents interface to operate correctly with these tools, CanBypassStoreMethod should return false.