The Server-side implementation calls an overload of the methods defined in the OpenEdge.BusinessLogic.BusinessEntity super class, which OpenEdge provides as an aid for implementing Data Object resources that support before-imaging. When invoking CreateData(), UpdateData(), or DeleteData(), a default implementation is provided to create, update, or delete a record in the server database from the single temp-table record in the ProDataSet input to the appropriate dsCustomer() method. The ReadData() method provides a default implementation for using the filter parameter to identify the data from the server database that fills the specified ProDataSet. The SubmitData() method provides a default implementation to create, update, or delete one or more records in the server database from the changed temp-table records in the ProDataSet input to SubmitdsCustomer(). Default implementations are location in the OpenEdge.BusinessLogic.BusinessEntity super class

Create

For an OpenEdge Data Object resource, the signature of the ABL routine that implements a Create operation must have a single INPUT-OUTPUT parameter for a DATASET, DATASET-HANDLE, TABLE or TABLE-HANDLE. If the resource supports before-image data, the parameter can only be for a DATASET or DATASET-HANDLE.

The following example shows a CreatedsCustomer() method that might implement the Data Object Create operation for the ProDataSet resource, dsCustomer:

  METHOD PUBLIC VOID CreatedsCustomer(INPUT-OUTPUT DATASET dsCustomer):  
  
    DEFINE VAR hDataSet AS HANDLE NO-UNDO.
    hDataSet = DATASET dsCustomer:HANDLE.
   
    SUPER:CreateData(DATASET-HANDLE hDataSet BY-REFERENCE).
  
  END METHOD.

Read

For an OpenEdge Data Object resource, the ABL routine that implements a Read operation must have the following signature:

  • An INPUT parameter of type CHARACTER, named filter. This parameter is optional for the JSDO fill() call that initiates the Read operation; if specified, it defines the criteria for a filtered subset of records to be returned. The format and content of the filter string depend on the application, including the requirements of the OpenEdge Business Entity that implements the resource.
  • An OUTPUT parameter for either a DATASET, DATASET-HANDLE, TABLE or TABLE-HANDLE. If the resource supports before-image data, the parameter can only be for a DATASET or DATASET-HANDLE.

The following example shows a ReaddsCustomer() method that might implement the Data Object Read operation for the ProDataSet resource, dsCustomer:

  METHOD PUBLIC VOID ReaddsCustomer(INPUT filter AS CHARACTER, OUTPUT DATASET dsCustomer):
  
    SUPER:ReadData(filter).
  
  END METHOD.

Update

For an OpenEdge Data Object resource, the signature of the ABL routine that implements an Update operation must have a single INPUT-OUTPUT parameter for a DATASET, DATASET-HANDLE, TABLE or TABLE-HANDLE. If the resource supports before-image data, the parameter can only be for a DATASET or DATASET-HANDLE.

The following example shows a UpdatedsCustomer() method that might implement the Data Object Update operation for the ProDataSet resource, dsCustomer:

  METHOD PUBLIC VOID UpdatedsCustomer(INPUT-OUTPUT DATASET dsCustomer):  
  
    DEFINE VAR hDataSet AS HANDLE NO-UNDO.
    hDataSet = DATASET dsCustomer:HANDLE.
   
    SUPER:UpdateData(DATASET-HANDLE hDataSet BY-REFERENCE).  

  END METHOD.

Delete

For an OpenEdge Data Object resource, the signature of the ABL routine that implements a Delete operation must have a single INPUT-OUTPUT parameter for a DATASET, DATASET-HANDLE, TABLE or TABLE-HANDLE. If the resource supports before-image data, the parameter can only be for a DATASET or DATASET-HANDLE.

The following example shows a DeletedsCustomer() method that might implement the Data Object Delete operation for the ProDataSet resource, dsCustomer:

  METHOD PUBLIC VOID DeletedsCustomer(INPUT-OUTPUT DATASET dsCustomer):

    DEFINE VAR hDataSet AS HANDLE NO-UNDO.
    hDataSet = DATASET dsCustomer:HANDLE.
   
    SUPER:DeleteData(DATASET-HANDLE hDataSet BY-REFERENCE). 

  END METHOD.

Submit

The signature of the ABL routine associated with a submit operation must have a single INPUT-OUTPUT parameter for a DATASET or DATASET-HANDLE.

For an OpenEdge Data Object resource, the signature of the ABL routine that implements a Submit operation must have a single INPUT-OUTPUT parameter for a DATASET or DATASET-HANDLE.

The following example shows a SubmitdsCustomer() method that might implement the Data Object Submit operation for the ProDataSet resource, dsCustomer:

  METHOD PUBLIC VOID SubmitdsCustomer(INPUT-OUTPUT DATASET dsCustomer):  

    DEFINE VAR hDataSet AS HANDLE NO-UNDO.
    hDataSet = DATASET dsCustomer:HANDLE.
   
    SUPER:SubmitData(DATASET-HANDLE hDataSet BY-REFERENCE). 

  END METHOD.