Package com._1c.g5.v8.derived.context
Interface IObjectDerivedDataContext
- All Known Implementing Classes:
AbstractExportContext
,BasicObjectContext
,CleanResourcesContext
,CmiDerivedDataContext
,ExportBlobContext
,ExportObjectContext
,ExtObjectUpdateContext
,FormExtContext
,ImportDataContext
,LanguageCheckObjectContext
,MarkerCleanerContext
,MarkerReindexContext
,ModelCheckObjectContext
,ModelUpdaterContext
,NavigatorOrderContext
,OperationContext
,PartBasedObjectContext
,TextSearchIndexingContext
public interface IObjectDerivedDataContext
Derived data context for the object of the BM model stores the (transient) context being
accumulated while processing DD-enabling business scenarios.
The context object is stored in memory only and it shouldn't be restored from some external persistent store explicitly. In case of emergency restart the new context with "rebuild all" strategy enabled should be created by the DD calculation mechanics.
The context and corresponding object are bound with internal BM id, as there are no scenarios when we have id changes in model and need to add DD incrementally. Full object DD rebuild is required in this case.
The context object is stored in memory only and it shouldn't be restored from some external persistent store explicitly. In case of emergency restart the new context with "rebuild all" strategy enabled should be created by the DD calculation mechanics.
The context and corresponding object are bound with internal BM id, as there are no scenarios when we have id changes in model and need to add DD incrementally. Full object DD rebuild is required in this case.
-
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the identifier of the object the context belongs to.Gets the identifier of the session the context is being collected for.org.eclipse.emf.ecore.EClass
Gets the EClass of the target object.Gets the the object the context belongs to.Gets the derived data segment identifier this context is collected for.Gets the associated transaction handle (if any).long
Gets the current version of the context.boolean
Checks if the full rebuild mode is set for the object.boolean
Checks the inactivity status of this contextdefault void
loadData
(IContextDataInput dataInput) Loads previously stored data into this contextboolean
mergeUpdates
(IObjectDerivedDataContext context) Merges updates into the context.default void
saveData
(IContextDataOutput dataOutput) Saves data of this context to an external storagevoid
setFullRebuild
(boolean fullRebuild) Sets/resets the full rebuild designator for the context object DD.void
setInactive
(boolean inactive) Sets the inactive flag for a contextvoid
setTransactionHandle
(Object transactionHandle) Sets the transaction handle for this context.void
setVersion
(long version) Sets an external version designator of the context.
-
Method Details
-
getObjectId
Object getObjectId()Gets the the object the context belongs to.- Returns:
- The object, never
null
-
getBmObjectId
long getBmObjectId()Gets the identifier of the object the context belongs to.- Returns:
- The identifier of the object.
-
getComputationCause
Object getComputationCause()Gets the identifier of the session the context is being collected for. Used only for sync contexts.- Returns:
- The identifier of the session.
-
getEClass
org.eclipse.emf.ecore.EClass getEClass()Gets the EClass of the target object.- Returns:
- The target object EClass.
-
getSegmentId
String getSegmentId()Gets the derived data segment identifier this context is collected for.- Returns:
- The unique identifier of the DD segment.
-
getTransactionHandle
Object getTransactionHandle()Gets the associated transaction handle (if any).- Returns:
- The associated transaction handle (if any).
null
otherwise.
-
getVersion
long getVersion()Gets the current version of the context. The version is defined during the snapshotting of the context. The verison is used during the context merge process to update the base version.- Returns:
- The version of the context.
-
isInactive
boolean isInactive()Checks the inactivity status of this context- Returns:
- True if context is inactive
-
setVersion
void setVersion(long version) Sets an external version designator of the context. Called by the DD framework and should not be used by clients directly- Parameters:
version
- A version to set
-
isFullRebuild
boolean isFullRebuild()Checks if the full rebuild mode is set for the object.- Returns:
- True if the full rebuild is required for the given top object.
-
mergeUpdates
Merges updates into the context. The base version of this context is being updated according to the verison of the provided context- Parameters:
context
- The source of updates. Cannot benull
.
-
setFullRebuild
void setFullRebuild(boolean fullRebuild) Sets/resets the full rebuild designator for the context object DD.- Parameters:
fullRebuild
- Full rebuild flag.
-
setTransactionHandle
Sets the transaction handle for this context.- Parameters:
The
- transaction handle being associated with the context.
-
setInactive
void setInactive(boolean inactive) Sets the inactive flag for a context- Parameters:
inactive
- The inactivity state to set
-
saveData
Saves data of this context to an external storage- Parameters:
dataOutput
- The output stream to write data into. May not benull
- Throws:
IOException
-
loadData
Loads previously stored data into this context- Parameters:
segmentData
- The data being stored earlier. May not benull
- Throws:
IOException
-