Namespace: Consultingwerk.BusinessEntityDesigner.Plugins
Class 
ModelClassGeneratorPlugin Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implements: Consultingwerk.BusinessEntityDesigner.IBusinessEntityDesignerPlugin

File:ModelClassGeneratorPlugin
Purpose:Business Entity Designer Plugin that integrates the
Generator for Dataset/TableModel classes (DatasetModel,
TableModel, TableFilter)
Description:Plugin generates DatasetModel classes and related code
whenever the Business Entity is generated or regenerated.
DatasetModel code generation can be suspended by setting the
"ModelClassGenerator.Disabled" custom property to "false"
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Mon Apr 02 22:03:43 CEST 2012
Notes:Custom constructors that should not be replaced when the
DatasetModel class is regenerated, need to be annotated
using the @CustomConstructor. annotation



Top Method Summary
Options Name Purpose
# AfterGenerateSourceHandler (Object, EventArgs) Event handler for the AfterGenerateSource event of the BusinessEntityDatasetController
# CHARACTER BuildClassNames () Builds a list of the generated class names
# LOGICAL CheckDirectoriesExist () Validates that the target folders exists of prompts for create
# CHARACTER CheckTemplatePath (character) Verifies the path to a template file
# CHARACTER FindOutputFolder () Returns the output folder (source code folder for business logic)
# LONGCHAR GenerateConstructors () Returns the code for the search constructors
# GenerateModelClasses () Generates the Model Classes
+ GenerateModelClasses (dataset) Generates the Model Classes
# LONGCHAR GenerateModelMethods () Generates methods for the datasetmodel_generated class
# GetCustomPropertyNamesHandler (Object, GetCustomPropertyNamesEventArgs) Event handler for the GetCustomPropertyNamesHandler event of the BusinessEntityDatasetController
# GetCustomPropertyValuesHandler (Object, GetCustomPropertyValuesEventArgs) Event handler for the GetCustomPropertyNamesHandler event of the BusinessEntityDatasetController
+ Shutdown () Method called when the Business Entity Designer will get closed
+ Startup (dataset, BusinessEntityDatasetController, BusinessEntityDesignerForm, UltraToolbarsManager) Method called when the Business Entity Designer is starting and has loaded the plugin.
# UpdateSearchConstructors (character) Updates the search constructors in an existing dataset model class
# ValidateSearchCodeIndexes () Validates that the indexes flagged with "Default Search Code Generation" do not cause constructors with duplicate signatures

Top Property Summary
Options Name Purpose
+ LOGICAL SilentMode Ignore status messages and questions


Method Detail
Top

PROTECTED AfterGenerateSourceHandler (Object, EventArgs)

Purpose: Event handler for the AfterGenerateSource event of the
BusinessEntityDatasetController
Notes:

Parameters:
sender Progress.Lang.Object
The reference to the object that raised the event
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for this event
Top

PROTECTED CHARACTER BuildClassNames ()

Purpose: Builds a list of the generated class names
Notes:

Returns CHARACTER
A comma delimited list of generated class names
Top

PROTECTED LOGICAL CheckDirectoriesExist ()

Purpose: Validates that the target folders exists of prompts for create
Notes:

Returns LOGICAL
Logical value indicating if the folders exists (true) or the generation should be cancelled
Top

PROTECTED CHARACTER CheckTemplatePath (character)

Purpose: Verifies the path to a template file
Notes: Throws an error, when the template file cannot be found

Parameters:
pcFileName CHARACTER
The relative template file name
Returns CHARACTER
The absolute path to the template file
Top

PROTECTED CHARACTER FindOutputFolder ()

Purpose: Returns the output folder (source code folder for business logic)
Notes:

Returns CHARACTER
The output folder
Top

PROTECTED LONGCHAR GenerateConstructors ()

Purpose: Returns the code for the search constructors
Notes:

Returns LONGCHAR
The source code for the search constructors
Top

PROTECTED GenerateModelClasses ()

Purpose: Generates the Model Classes
Notes:

Top

PUBLIC GenerateModelClasses (dataset)

Purpose: Generates the Model Classes
Notes: This routine is intended to be used from outside of the Business Entity
designer (automatic source code generation, unit testing)

Parameters:
dsBusinessEntity DATASET
Business Entity with the Design dataset, called with the BY-REFERENCE keyword
Top

PROTECTED LONGCHAR GenerateModelMethods ()

Purpose: Generates methods for the datasetmodel_generated class
Notes:

Returns LONGCHAR
The source code of the generated methods
Top

PROTECTED GetCustomPropertyNamesHandler (Object, GetCustomPropertyNamesEventArgs)

Purpose: Event handler for the GetCustomPropertyNamesHandler event of the
BusinessEntityDatasetController
Notes:

Parameters:
sender Progress.Lang.Object
The reference to the object that raised the event
e Consultingwerk.BusinessEntityDesigner.Services.GetCustomPropertyNamesEventArgs
The GetCustomPropertyNamesEventArgs with the data for this event
Top

PROTECTED GetCustomPropertyValuesHandler (Object, GetCustomPropertyValuesEventArgs)

Purpose: Event handler for the GetCustomPropertyNamesHandler event of the
BusinessEntityDatasetController
Notes:

Parameters:
sender Progress.Lang.Object
The reference to the object that raised the event
e Consultingwerk.BusinessEntityDesigner.Services.GetCustomPropertyValuesEventArgs
The GetCustomPropertyNamesEventArgs with the data for this event
Top

PUBLIC Shutdown ()

Purpose: Method called when the Business Entity Designer will get closed
Notes:

Top

PUBLIC Startup (dataset, BusinessEntityDatasetController, BusinessEntityDesignerForm, UltraToolbarsManager)

Purpose: Method called when the Business Entity Designer is starting and
has loaded the plugin.
Notes: Passes references to some key components of the Designer to
the plugin, use this to initialize the plugin, subscribe to events

Parameters:
dsBusinessEntity DATASET
Business Entity with the Design dataset, called with the BIND keyword
poController Consultingwerk.BusinessEntityDesigner.Services.BusinessEntityDatasetController
The BusinessEntityDatasetController
poForm Consultingwerk.BusinessEntityDesigner.UI.BusinessEntityDesignerForm
The main Form of the BusinessEntityDesigner
poToolbar Infragistics.Win.UltraWinToolbars.UltraToolbarsManager
The reference to the UltraToolbarsManager used by the BusinessEntityDesigner
Top

PROTECTED UpdateSearchConstructors (character)

Purpose: Updates the search constructors in an existing dataset model class
Notes:

Parameters:
pcFileName CHARACTER
The file name of the dataset model class
Top

PROTECTED ValidateSearchCodeIndexes ()

Purpose: Validates that the indexes flagged with "Default Search Code Generation"
do not cause constructors with duplicate signatures
Notes:



Property Detail
Top

PUBLIC LOGICAL SilentMode

Purpose: Ignore status messages and questions
Notes:

Returns LOGICAL


©2006-2016 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       26.08.2016 08:26:14