Namespace: Consultingwerk.OERA
Class 
DatasetModelPerformer Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:DatasetModelPerformer
Purpose:Performs the backend requests of the Dataset Model class
Description:This class should only be used by the DatasetModel/TableModel
classes and not from customers code directly
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Sat Dec 21 23:41:54 CET 2013
Notes:This class has been introduced so that the TableModel
instances to not need to keep a reference to the
Dataset Model and the Dataset Model will be cleaned up
by the garbage collector when no longer needed



Top Method Summary
Options Name Purpose
+ FetchData (IFetchDataRequest, dataset-handle) Performs the given request to fetch data from the Business Entity
+ Consultingwerk.OERA.IBusinessEntity GetBusinessEntity (character) Return an instance of the Business Entity
+ GetInitialValues (character, dataset-handle) Retrieves the initial values for one or more tables from the Business Entity
+ CHARACTER GetNextRowid () Returns the Next-Rowid
# PerformFetchDataRequest (FetchDataRequest) Performs Fetch Data request either using the Service Adapter or the Service Interface
+ PerformNextBatchRequest () Fetches the next batch of data
+ RetrieveData (character, character) Retrieves data from the backend
+ RetrieveData (character, INamedQueryParameter) Retrieves data from the backend
+ RetrieveData (character, IQueryExpression, character) Retrieves data from the backend
+ RetrieveData (INamedQueryParameter) Retrieves data from the backend
+ RetrieveDataByRowid (character, character) Retrieves data from the backend based on the given data-source ROWID (DB-ROWID)
+ SaveChanges () Performs Save Changes request either using the Service Adapter or the Service Interface
+ LOGICAL SaveChanges (OnValidationErrorEnum) Performs Save Changes request either using the Service Adapter or the Service Interface
+ SaveChanges (Object) Performs Save Changes request either using the Service Adapter or the Service Interface
+ LOGICAL SaveChanges (Object, OnValidationErrorEnum) Performs Save Changes request either using the Service Adapter or the Service Interface
+ SetRestartRowid (character) Sets the Restart-Rowid for the next request
+ LOGICAL UseEntityInitialValues (character) Returns the value of the GetInitialValue attribute from a BusinessEntityTable annotation for a table in the business entity

Top Constructor Summary
Options Name Purpose
+ DatasetModelPerformer (handle, character) Constructor for the DatasetModelPerformer class

Top Property Summary
Options Name Purpose
+ CHARACTER AppServerPartition
+ CHARACTER BatchingOnTable
+ INTEGER BatchSize
+ HANDLE ContextDataset
+ CHARACTER CustomContext
+ Progress.Lang.Object CustomParameter
+ HANDLE DatasetHandle
+ CHARACTER EntityName
# Consultingwerk.OERA.FetchDataRequest FetchDataRequest
+ LOGICAL NextBatchAvailable
+ Consultingwerk.OERA.DatasetModel.QueryStyleEnum QueryStyle
+ INTEGER Skip
+ INTEGER StopAfter
+ LOGICAL UseDedicatedBusinessEntity
+ Consultingwerk.OERA.UseInterfaceEnum UseInterface


Method Detail
Top

PUBLIC FetchData (IFetchDataRequest, dataset-handle)

Purpose: Performs the given request to fetch data from the Business Entity
Notes:

Parameters:
poRequest Consultingwerk.OERA.IFetchDataRequest
The IFetchDataRequest instance
phDataset DATASET-HANDLE
OUTPUT DATASET-HANDLE with the resulting data
Top

PUBLIC Consultingwerk.OERA.IBusinessEntity GetBusinessEntity (character)

Purpose: Return an instance of the Business Entity
Notes:

Parameters:
pcEntityKey CHARACTER
The key (name) of the Business Entity
Returns Consultingwerk.OERA.IBusinessEntity
The Business Entity instance
Top

PUBLIC GetInitialValues (character, dataset-handle)

Purpose: Retrieves the initial values for one or more tables from the Business Entity
Notes: It is the caller's responsibility to delete the output dataset.
containing initial values from the Business Entity. The dataset is expected to have
one row per requested table.

Parameters:
pcTableNames CHARACTER
A comma-delimited list of table names
phDataset DATASET-HANDLE
OUTPUT DATASET-HANDLE The handle of the dataset of the business entity,
Top

PUBLIC CHARACTER GetNextRowid ()

Purpose: Returns the Next-Rowid
Notes: The Next-Rowid is the row-identifier required for retrieving
the next batch. The usage of this method is only required, when
implementing ROWID based batching with Dataset Models throughout
different AppServer requests. The SetRestartRowid method accepts
the same values

Returns CHARACTER
The row-identifier required for retrieving the next batch
Top

PROTECTED PerformFetchDataRequest (FetchDataRequest)

Purpose: Performs Fetch Data request either using the Service Adapter or the
Service Interface
Notes: This method will delete the poFetchDataRequest instance at the end of the
execution when there are no further batches available

Parameters:
poFetchDataRequest Consultingwerk.OERA.FetchDataRequest
The FetchDataRequest instance with the request data
Top

PUBLIC PerformNextBatchRequest ()

Purpose: Fetches the next batch of data
Notes: Invoked by the GetNext() method of the TableModel class when
no local data is available in the model but additional batches are
available on the backend
This method will delete the FetchDataRequest instance at the end of the
execution when there are no further batches available

Top

PUBLIC RetrieveData (character, character)

Purpose: Retrieves data from the backend
Notes:

Parameters:
pcTables CHARACTER
The comma delimited list of the Table Names to retrieve
pcQueryString CHARACTER
The query string to use for the first table
Top

PUBLIC RetrieveData (character, INamedQueryParameter)

Purpose: Retrieves data from the backend
Notes:

Parameters:
pcTables CHARACTER
The comma delimited list of the Table Names to retrieve
poNamedQuery Consultingwerk.OERA.INamedQueryParameter
The INamedQueryParameter that defines a named query
Top

PUBLIC RetrieveData (character, IQueryExpression, character)

Purpose: Retrieves data from the backend
Notes:

Parameters:
pcTables CHARACTER
The comma delimited list of the Table Names to retrieve
poQueryExpression Consultingwerk.IQueryExpression
The query expression to use for the first table
pcSortString CHARACTER
The sort string
Top

PUBLIC RetrieveData (INamedQueryParameter)

Purpose: Retrieves data from the backend
Notes:

Parameters:
poNamedQuery Consultingwerk.OERA.INamedQueryParameter
The INamedQueryParameter that defines a named query
Top

PUBLIC RetrieveDataByRowid (character, character)

Purpose: Retrieves data from the backend based on the given data-source
ROWID (DB-ROWID)
Notes: DB-ROWID passed as comma-delimited list in case there are joined
data-source queries

Parameters:
pcTable CHARACTER
The comma delimited list of the Table Names to retrieve
pcSourceRowidIds CHARACTER
The comma-delimited list of data-source rowids
Top

PUBLIC SaveChanges ()

Purpose: Performs Save Changes request either using the Service Adapter or the
Service Interface
Notes:

Top

PUBLIC LOGICAL SaveChanges (OnValidationErrorEnum)

Purpose: Performs Save Changes request either using the Service Adapter or the
Service Interface
Notes:

Parameters:
poOnValidationError Consultingwerk.OERA.Enum.OnValidationErrorEnum
An OnValidationError value describing the behavior when a validation error is encountered
Returns LOGICAL
Logical value indicating if the SaveChanges was successful (no validation error)
Top

PUBLIC SaveChanges (Object)

Purpose: Performs Save Changes request either using the Service Adapter or the
Service Interface
Notes:

Parameters:
poParameter Progress.Lang.Object
The (optional) parameter for the SaveChanges method
Top

PUBLIC LOGICAL SaveChanges (Object, OnValidationErrorEnum)

Purpose: Performs Save Changes request either using the Service Adapter or the
Service Interface
Notes:

Parameters:
poParameter Progress.Lang.Object
The (optional) parameter for the SaveChanges method
poOnValidationError Consultingwerk.OERA.Enum.OnValidationErrorEnum
An OnValidationError value describing the behavior when a validation error is encountered
Returns LOGICAL
Logical value indicating if the SaveChanges was successful (no validation error)
Top

PUBLIC SetRestartRowid (character)

Purpose: Sets the Restart-Rowid for the next request
Notes: Allows to start retrieving data from a specific row.
The usage of this method is only required, when implementing
ROWID based batching with Dataset Models throughout different
AppServer requests.

Parameters:
pcRowid CHARACTER
The value for the Restart-Rowid
Top

PUBLIC LOGICAL UseEntityInitialValues (character)

Purpose: Returns the value of the GetInitialValue attribute from a BusinessEntityTable annotation
for a table in the business entity
Notes: Used by TableModels to determine whether they should call GetInitialValues on Create().

Parameters:
pcTableName CHARACTER
The name of a table in the Business Entity
Returns LOGICAL
TRUE if the GetInitialValues annotation exists and is TRUE; FALSE otherwise


Constructor Detail
Top

PUBLIC DatasetModelPerformer (handle, character)

Purpose: Constructor for the DatasetModelPerformer class
Notes:

Parameters:
phDataset HANDLE
The handle of the ProDataset from the model class
pcEntityName CHARACTER
The name of the Business Entity


Property Detail
Top

PUBLIC CHARACTER AppServerPartition


Returns CHARACTER
Top

PUBLIC CHARACTER BatchingOnTable


Returns CHARACTER
Top

PUBLIC INTEGER BatchSize


Returns INTEGER
Top

PUBLIC HANDLE ContextDataset


Returns HANDLE
Top

PUBLIC CHARACTER CustomContext


Returns CHARACTER
Top

PUBLIC Progress.Lang.Object CustomParameter


Returns Progress.Lang.Object
Top

PUBLIC HANDLE DatasetHandle


Returns HANDLE
Top

PUBLIC CHARACTER EntityName


Returns CHARACTER
Top

PROTECTED Consultingwerk.OERA.FetchDataRequest FetchDataRequest


Returns Consultingwerk.OERA.FetchDataRequest
Top

PUBLIC LOGICAL NextBatchAvailable


Returns LOGICAL
Top

PUBLIC Consultingwerk.OERA.DatasetModel.QueryStyleEnum QueryStyle


Returns Consultingwerk.OERA.DatasetModel.QueryStyleEnum
Top

PUBLIC INTEGER Skip


Returns INTEGER
Top

PUBLIC INTEGER StopAfter


Returns INTEGER
Top

PUBLIC LOGICAL UseDedicatedBusinessEntity


Returns LOGICAL
Top

PUBLIC Consultingwerk.OERA.UseInterfaceEnum UseInterface


Returns Consultingwerk.OERA.UseInterfaceEnum


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.12.2024 12:59:46