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
See instructions in SCL-1649 for ability to change naming
pattern for generated classes (by adding suffixes in a
custom plugin and customizing the templates.



Top Method Summary
Options Name Purpose
# AfterGenerateSourceHandler (Object, EventArgs) Event handler for the AfterGenerateSource event of the BusinessEntityDatasetController
# 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
+ GenerateModelClasses (dataset, GenerateModelClassesEnum) Generates the Model Classes
# GenerateModelClasses (GenerateModelClassesEnum) Generates the Model Classes
# GenerateModelInterfaces (GenerateModelClassesEnum) Generates Interfaces for the Model Classes
# LONGCHAR GenerateModelMethods () Generates methods for the datasetmodel_generated class
# LONGCHAR GenerateNewFilterMethods () Generates the source code for the NewFilter methods
# 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.
# ToolClickHandler (Object, ToolClickEventArgs) Event handle the for the toolclick event of the UltraToolbarsController
# 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 IsTableQueryBuilderActive
+ LOGICAL SilentMode
# CHARACTER SuffixDatasetModel
# CHARACTER SuffixTableModel
# CHARACTER SuffixTableModelFilter
# CHARACTER SuffixTableModelSort


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 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 dsBusinessEntity
Business Entity with the Design dataset, called with the BY-REFERENCE keyword
Top

PUBLIC GenerateModelClasses (dataset, GenerateModelClassesEnum)

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 dsBusinessEntity
Business Entity with the Design dataset, called with the BY-REFERENCE keyword
poGenerate Consultingwerk.BusinessEntityDesigner.Plugins.GenerateModelClassesEnum
The GenerateModelClassesEnum value indicating if the generator will generate classes, Interfaces or Read-Only Interfaces
Top

PROTECTED GenerateModelClasses (GenerateModelClassesEnum)

Purpose: Generates the Model Classes
Notes:

Parameters:
poGenerate Consultingwerk.BusinessEntityDesigner.Plugins.GenerateModelClassesEnum
The GenerateModelClassesEnum value indicating if the generator will generate classes, Interfaces or Read-Only Interfaces
Top

PROTECTED GenerateModelInterfaces (GenerateModelClassesEnum)

Purpose: Generates Interfaces for the Model Classes
Notes:

Parameters:
poGenerate Consultingwerk.BusinessEntityDesigner.Plugins.GenerateModelClassesEnum
The GenerateModelClassesEnum value indicating if the generator will generate classes, Interfaces or Read-Only Interfaces
Top

PROTECTED LONGCHAR GenerateModelMethods ()

Purpose: Generates methods for the datasetmodel_generated class
Notes:

Returns LONGCHAR
The source code of the generated methods
Top

PROTECTED LONGCHAR GenerateNewFilterMethods ()

Purpose: Generates the source code for the NewFilter methods
Notes:

Returns LONGCHAR
The source code for the NewFilter 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 dsBusinessEntity
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 ToolClickHandler (Object, ToolClickEventArgs)

Purpose: Event handle the for the toolclick event of the UltraToolbarsController
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e Infragistics.Win.UltraWinToolbars.ToolClickEventArgs
The ToolClickEventArgs with the data for this event
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 IsTableQueryBuilderActive


Returns LOGICAL
Top

PUBLIC LOGICAL SilentMode


Returns LOGICAL
Top

PROTECTED CHARACTER SuffixDatasetModel


Returns CHARACTER
Top

PROTECTED CHARACTER SuffixTableModel


Returns CHARACTER
Top

PROTECTED CHARACTER SuffixTableModelFilter


Returns CHARACTER
Top

PROTECTED CHARACTER SuffixTableModelSort


Returns CHARACTER


ProDataset Detail

ProDataset dsBusinessEntity

Member tables: eBusinessEntity, eDataRelation, eDataRelationProperties, eTable, eField, eFieldProperties, eIndex, eIndexProperties, eTableProperties, eBusinessEntityProperties


Temp-Table Detail

Temp-Table eBusinessEntity

Defined in:

Temp-Table eBusinessEntityProperties

Defined in:

Temp-Table eDataRelation

Defined in:

Temp-Table eDataRelationProperties

Defined in:

Temp-Table eField

Defined in:

Temp-Table eFieldProperties

Defined in:

Temp-Table eIndex

Defined in:

Temp-Table eIndexProperties

Defined in:

Temp-Table eTable

Defined in:

Temp-Table eTableProperties

Defined in:


©2006-2019 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.08.2019 23:22:32