Namespace: OpenEdge.BusinessLogic
Class
BusinessEntity
Parent classes:
Inherits: Progress.Lang.Object

File:BusinessEntity.cls
Author(s):Maura Regan
Created:Tues Mar 04 11:50:26 EST 2014
Notes:Abstract class that contains generic methods performing CRUD operations
for Busines Entities




Method Summary
Options Name Purpose
CHARACTER AdjustWhere (character)
CHARACTER AdjustWheres (character[])
AttachDataSources () Attach Data Sources to DataSet's buffers
AttachDataSources (character[]) Attach Data Sources to DataSet's buffers
CommitChildBuffers (integer, integer) Walks through specifed dataset's data-relations to find child tables for specified parent table. For each child table, it then calls commitRows().
CommitData (integer) Generic routine to save or commit data for a dataset.
CommitRows (handle, character, integer) Generic routine for creating/updating/deleting rows for specified table
CreateData (dataset-handle) Create one or more new records
DeleteData (dataset-handle) Delete one or more records
DetachDataSources () Detach Data Sources from DataSet's buffers
EmptyDataSet () Generic routine to empty from the dataset.
INTEGER GetBufferIndex (handle) Walks through dataset's buffers and returns index for specified buffer.
CHARACTER GetRowErrorMessage (handle, character) If errMessage param is not set, create an error message for the current bi row
CHARACTER GetRowState (integer)
CHARACTER GetSkipListEntry (integer) Returns the skip-list entry from array for specified buffer index.
LOGICAL ProcessBIData (integer) Checks if ProDataSet was sent with bi data, returning TRUE or FALSE.
ProcessTransactionalError (Error) ProcessTransactionalError() is called when we are processing a single transaction, and an error occurs for one of the row changes. When this occurs, all rows should have REJECTED set to TRUE, and the error message should be set on the offending row.
ReadData () Generic routine to read data for the dataset with no filter specified.
ReadData (character) Generic routine to read data for the dataset.
ReadData (character, handle) Generic routine to read data for a table within a dataset.
ReadData (character[]) Generic routine to read data for the dataset.
ReadData (handle) Generic routine to read data for a table within a dataset with no filter specified.
SaveRows (dataset-handle) Saves/Submits one or more changed rows (creates, updates, and/or deletes) where each changed row is processed as a separate transaction. SaveRows() is similar to Submit(), but acts as a bulk submit, with separate row transactions.
SetFillWhereString (character, handle)
SetFillWhereStrings (character[])
SetUndos (logical[], logical) This method is used to set the UNDO attribute for all temp-tables in the ProDataSet. With the addition of the the one transaction capability, the UNDO attributes need to be set to FALSE to preserve the ERROR and REJECTED attributes, which are now sent to backend. If the lUndos array parameter has been set appropriately, the method will use it to restore the UNDO attributes (ignoring undoValue parameter). If lUndos has not been set, the method will set the UNDO attributes using undoValue, and return the original UNDO attr values in lUndos.
Submit (dataset-handle) Submits one or more changed records (creates, updates, and/or deletes) where the changed record set is processed as a single transaction.
UpdateData (dataset-handle) Update one or more new records
ValidateDataSources () Must verify that ProDataSource contains a data source entry for each table specified in dataset. Also verify that they are valid handles. A data source entry can be set to UNKNOWN as well, as allow for that.
ValidateFieldLists (character[]) Must verify that cFieldList's EXTENT value is same as number of buffers in dataset

Constructor Summary
Options Name Purpose
BusinessEntity (handle)

Property Summary
Options Name Purpose
HANDLE ProDataSet
HANDLE ProDataSource
CHARACTER SkipList
OpenEdge.BusinessLogic.UpdateModeEnum UpdateMode


Method Detail
Top

CHARACTER AdjustWhere (character)

Purpose:
Notes:
Parameters:
cFilter CHARACTER
Returns CHARACTER
Top

CHARACTER AdjustWheres (character[])

Purpose:
Notes:
Parameters:
cFilter CHARACTER
Returns CHARACTER
Top

AttachDataSources ()

Purpose: Attach Data Sources to DataSet's buffers
Notes:
Top

AttachDataSources (character[])

Purpose: Attach Data Sources to DataSet's buffers
Notes:
Parameters:
cFieldList CHARACTER
Top

CommitChildBuffers (integer, integer)

Purpose: Walks through specifed dataset's data-relations to find child tables for
specified parent table. For each child table, it then calls commitRows().
Notes:
Parameters:
iParentBufferIndex INTEGER
iRowState INTEGER
Top

CommitData (integer)

Purpose: Generic routine to save or commit data for a dataset.
Notes:
Parameters:
iRowState INTEGER
Top

CommitRows (handle, character, integer)

Purpose: Generic routine for creating/updating/deleting rows for specified table
Notes:
Parameters:
hBuffer HANDLE
cSkip CHARACTER
iRowState INTEGER
Top

CreateData (dataset-handle)

Purpose: Create one or more new records
Notes:
Parameters:
hDataSet DATASET-HANDLE
Top

DeleteData (dataset-handle)

Purpose: Delete one or more records
Notes:
Parameters:
hDataSet DATASET-HANDLE
Top

DetachDataSources ()

Purpose: Detach Data Sources from DataSet's buffers
Notes:
Top

EmptyDataSet ()

Purpose: Generic routine to empty from the dataset.
Notes:
Top

INTEGER GetBufferIndex (handle)

Purpose: Walks through dataset's buffers and returns index for specified buffer.
Notes:
Parameters:
hBuffer HANDLE
Returns INTEGER
Top

CHARACTER GetRowErrorMessage (handle, character)

Purpose: If errMessage param is not set, create an error message for the current bi row
Notes:
Parameters:
hBeforeBuffer HANDLE
errMessage CHARACTER
Returns CHARACTER
Top

CHARACTER GetRowState (integer)

Purpose:
Notes:
Parameters:
iRowState INTEGER
Returns CHARACTER
Top

CHARACTER GetSkipListEntry (integer)

Purpose: Returns the skip-list entry from array for specified buffer index.
Notes: Skip-list entries in array should be in temp-table order as defined in DataSet.
Parameters:
iBufferIndex INTEGER
Returns CHARACTER
Top

LOGICAL ProcessBIData (integer)

Purpose: Checks if ProDataSet was sent with bi data, returning TRUE or FALSE.
Notes: It validates that all temp-tables are consistent in their usage of
before-image data, meaning either they all have it or don't.
If there is any inconsistency, an exception is thrown.
Also, if no bi data was sent, then it's created based on iRowState param.
Before-Image data is a requirement in order to call SAVE-ROW-CHANGES()
Parameters:
iRowState INTEGER
Returns LOGICAL
Top

ProcessTransactionalError (Error)

Purpose: ProcessTransactionalError() is called when we are processing a single
transaction, and an error occurs for one of the row changes.
When this occurs, all rows should have REJECTED set to TRUE,
and the error message should be set on the offending row.
Notes: If there is no bi data being sent between client and server (CUD_NOBI),
then we throw the error (resulting in http 500 error),
and we also must back out all changes.
Parameters:
err Progress.Lang.Error
Top

ReadData ()

Purpose: Generic routine to read data for the dataset with no filter specified.
Notes:
Top

ReadData (character)

Purpose: Generic routine to read data for the dataset.
Notes:
Parameters:
cFilter CHARACTER
Top

ReadData (character, handle)

Purpose: Generic routine to read data for a table within a dataset.
Notes:
Parameters:
cFilter CHARACTER
hBuffer HANDLE
Top

ReadData (character[])

Purpose: Generic routine to read data for the dataset.
Notes:
Parameters:
cFilter CHARACTER
Top

ReadData (handle)

Purpose: Generic routine to read data for a table within a dataset with no filter specified.
Notes:
Parameters:
hBuffer HANDLE
Top

SaveRows (dataset-handle)

Purpose: Saves/Submits one or more changed rows (creates, updates, and/or deletes)
where each changed row is processed as a separate transaction.
SaveRows() is similar to Submit(), but acts as a bulk submit, with separate
row transactions.
Notes:
Parameters:
hDataSet DATASET-HANDLE
Top

SetFillWhereString (character, handle)

Purpose:
Notes:
Parameters:
cWhere CHARACTER
hBuffer HANDLE
Top

SetFillWhereStrings (character[])

Purpose:
Notes:
Parameters:
cWhere CHARACTER
Top

SetUndos (logical[], logical)

Purpose: This method is used to set the UNDO attribute for all temp-tables in the ProDataSet.
With the addition of the the one transaction capability, the UNDO attributes need to
be set to FALSE to preserve the ERROR and REJECTED attributes, which are now sent to
backend.
If the lUndos array parameter has been set appropriately, the method will use it to
restore the UNDO attributes (ignoring undoValue parameter).
If lUndos has not been set, the method will set the UNDO attributes using undoValue,
and return the original UNDO attr values in lUndos.
Notes:
Parameters:
lUndos LOGICAL
undoValue LOGICAL
Top

Submit (dataset-handle)

Purpose: Submits one or more changed records (creates, updates, and/or deletes)
where the changed record set is processed as a single transaction.
Notes:
Parameters:
hDataSet DATASET-HANDLE
Top

UpdateData (dataset-handle)

Purpose: Update one or more new records
Notes:
Parameters:
hDataSet DATASET-HANDLE
Top

ValidateDataSources ()

Purpose: Must verify that ProDataSource contains a data source entry for each
table specified in dataset. Also verify that they are valid handles.
A data source entry can be set to UNKNOWN as well, as allow for that.
Notes:
Top

ValidateFieldLists (character[])

Purpose: Must verify that cFieldList's EXTENT value is same as number of buffers in dataset
Notes:
Parameters:
cFieldList CHARACTER


Constructor Detail
Top

BusinessEntity (handle)

Parameters:
hDS HANDLE


Property Detail
Top

HANDLE ProDataSet

Returns HANDLE
Top

HANDLE ProDataSource

Returns HANDLE
Top

CHARACTER SkipList

Returns CHARACTER
Top

OpenEdge.BusinessLogic.UpdateModeEnum UpdateMode

Returns OpenEdge.BusinessLogic.UpdateModeEnum


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15