The class provides access to information on draft handling that is available in the OData service's metadata as it interprets draft-specific annotations.
Constructor for meta-model access class.
new sap.ui.generic.app.transaction.DraftContext(oModel)
Param | Type | Default Value | Description |
---|---|---|---|
oModel | sap.ui.model.odata.ODataModel | The OData model currently used |
Method | Description |
---|---|
checkUpdateOnChange |
Checks whether an OData property is annotated with UpdateOnChange. The method is used in context of a validation success event. |
destroy |
Frees all resources claimed during the life-time of this instance. |
sap.ui.generic.app.transaction.DraftContext.extend |
Creates a new subclass of class sap.ui.generic.app.transaction.DraftContext with name
|
sap.ui.generic.app.transaction.DraftContext.getMetadata |
Returns a metadata object for class sap.ui.generic.app.transaction.DraftContext. |
getODataDraftFunctionImportName |
Returns the name of the function import to be used. |
getSemanticKey |
Returns the semantic keys for a given entity set. |
hasDraft |
Checks whether an entity set is draft-enabled. The entity set name is derived from the given binding context |
hasDraftAdministrativeData |
Checks whether administrative data for a given draft is available. |
hasDraftPreparationAction |
Checks whether an entity set has a draft preparation action. The entity set name is derived from the given binding context. |
hasDraftRoot |
Checks whether an entity set is draft root. The entity set name is derived from the given binding context. |
hasDraftValidationFunction |
Checks whether an entity set has a draft validation function. The entity set name is derived from the given binding context. |
hasPreserveChanges |
Checks if the parameter "PreserveChanges" is supported by the edit function. If the edit action is triggered with the parameter set to |
hasSiblingEntity |
Checks whether a sibling entity for a given entity set is available. |
isDraftEnabled |
Checks whether a given entity set is draft-enabled. |
isDraftRoot |
Checks whether a given entity set is a draft root. |
isSemanticKey |
Checks whether a given key is a semantic key. |
isTechnicalKey |
Checks whether a given key is a technical key. |
Checks whether an OData property is annotated with UpdateOnChange. The method is used in context of a validation success event.
Param | Type | DefaultValue | Description |
---|---|---|---|
sEntitySet | string |
The name of the entity set |
|
sProperty | string |
The name of the property |
Creates a new subclass of class sap.ui.generic.app.transaction.DraftContext with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.base.Object.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Returns a metadata object for class sap.ui.generic.app.transaction.DraftContext.
Returns the name of the function import to be used.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContext | sap.ui.model.Context |
The given binding context |
|
sDraftFunctionImport | string |
The draft function import |
Returns the semantic keys for a given entity set.
Param | Type | DefaultValue | Description |
---|---|---|---|
sEntitySet | string |
The given entity set |
Checks whether an entity set is draft-enabled. The entity set name is derived from the given binding context
Param | Type | DefaultValue | Description |
---|---|---|---|
oContext | sap.ui.model.Context |
The given binding context |
Checks whether administrative data for a given draft is available.
Param | Type | DefaultValue | Description |
---|---|---|---|
sEntitySet | string |
The name of the entity set |
Checks whether an entity set has a draft preparation action. The entity set name is derived from the given binding context.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContext | sap.ui.model.Context |
The given binding context |
Checks whether an entity set is draft root. The entity set name is derived from the given binding context.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContext | sap.ui.model.Context |
The given binding context |
Checks whether an entity set has a draft validation function. The entity set name is derived from the given binding context.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContext | sap.ui.model.Context |
The given binding context |
Checks if the parameter "PreserveChanges" is supported by the edit function. If the edit action is triggered with the parameter set to true
the ABAP application infrastructure will respond with HTTP response code 409 if unsaved changes (from another user) exist.
Checks whether a sibling entity for a given entity set is available.
Param | Type | DefaultValue | Description |
---|---|---|---|
sEntitySet | string |
The name of the entity set |
Checks whether a given entity set is draft-enabled.
Param | Type | DefaultValue | Description |
---|---|---|---|
sEntitySet | string |
The name of the entity set |
Checks whether a given entity set is a draft root.
Param | Type | DefaultValue | Description |
---|---|---|---|
sEntitySet | string |
The name of the entity set |