projects/wms-framework/src/lib/dataService/saveOperationResponse.ts
Defines a OperationResponse object that contains the required information to update a saved entity object
Properties |
Methods |
|
constructor(dataServiceContext: DataServiceContext, entity: EntityObject)
|
||||||||||||
Creates an instance of SaveOperationResponse.
Parameters :
|
error |
Type : Exception
|
Default value : null
|
Inherited from
OperationResponse
|
Defined in
OperationResponse:22
|
Public markAsSuccess |
markAsSuccess()
|
Marks this operation as sucessful which will cause the entity changes to be fully reflected.
Returns :
void
|
Public markInError | ||||||||
markInError(exception: Exception)
|
||||||||
Inherited from
OperationResponse
|
||||||||
Defined in
OperationResponse:41
|
||||||||
Marks this operation as in error
Parameters :
Returns :
void
|
import { EntityObject } from './dataServiceInterfaces';
import { DataServiceContext } from './dataServices';
import { OperationResponse } from './OperationResponse';
/**
* Defines a {@link OperationResponse} object that contains the required information to update a saved entity object
*
* @export
* @class SaveOperationResponse
* @extends {OperationResponse}
*/
export class SaveOperationResponse extends OperationResponse {
/**
* Creates an instance of SaveOperationResponse.
* @param {DataServiceContext} dataServiceContext The {DataServiceContext} object that generated the update operation
* @param {EntityObject} entity the {EntityObject} object that was saved and missing handling pending result
* @memberof SaveOperationResponse
*/
constructor(
private dataServiceContext: DataServiceContext,
private entity: EntityObject
) {
super();
}
/**
* Marks this operation as sucessful which will cause the entity changes to be fully reflected.
*
* @memberof SaveOperationResponse
*/
public markAsSuccess(): void {
this.dataServiceContext.saveEntity(this.entity);
}
}