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
# BusinessEntityDatasetController_ClassRenamedMoved (Object, ClassRenamedMovedEventArgs) Handler for the BusinessEntityDatasetControllers ClassRenamedMoved event
# LOGICAL CheckDirectoriesExist () Validates that the target folders exists of prompts for create
# CHARACTER CheckTemplatePath (character) Verifies the path to a template file
# CustomPropertiesUpdatedHandler (Object, CustomPropertiesUpdatedEventArgs) Event handler for the CustomPropertiesUpdated event of the controller
# CHARACTER FindOutputFolder () Returns the output folder (source code folder for business logic)
# LONGCHAR GenerateConstructors (character) 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 (dataset, GenerateModelClassesEnum, character, character) Generates the Model Classes
# GenerateModelClasses (GenerateModelClassesEnum) Generates the Model Classes
# GenerateModelClasses (GenerateModelClassesEnum, character, character) Generates the Model Classes
# GenerateModelInterfaces (GenerateModelClassesEnum) Generates Interfaces for the Model Classes
# GenerateModelInterfaces (GenerateModelClassesEnum, character, character) 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
# LOGICAL IsPluginActive () Returns if the Plugin is active (not disabled)
# OnGetDatasetModelMembers (GetDatasetModelMembersEventArgs) Raises the GetDatasetModelMembers
# OnGetTableModelMembers (GetTableModelMembersEventArgs) Raises the GetTableModelMembers
+ 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.
# ToggleActive () Toggles the .Disabled property
# ToolClickHandler (Object, ToolClickEventArgs) Event handle the for the toolclick event of the UltraToolbarsController
# UpdateBusinessEntityAnnotations () Updates the Annotations @DatasetModel and @TableModel Annotations
# UpdateSearchConstructors (character, 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 Event Summary
Options Name Purpose
+ GetDatasetModelMembers (Object, GetDatasetModelMembersEventArgs) Raised when generating properties/methods for the TableModel_Generated
+ GetTableModelMembers (Object, GetTableModelMembersEventArgs) Raised when generating properties/methods for the TableModel_Generated

Top Property Summary
Options Name Purpose
+ LOGICAL IsStaticDataAccessQueryActive
+ 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 BusinessEntityDatasetController_ClassRenamedMoved (Object, ClassRenamedMovedEventArgs)

Purpose: Handler for the BusinessEntityDatasetControllers ClassRenamedMoved event
Notes:

Parameters:
sender Progress.Lang.Object
The reference to the object that raised the event
e Consultingwerk.BusinessEntityDesigner.Services.ClassRenamedMovedEventArgs
The ClassRenamedMovedEventArgs 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 CustomPropertiesUpdatedHandler (Object, CustomPropertiesUpdatedEventArgs)

Purpose: Event handler for the CustomPropertiesUpdated event of the controller
Notes:

Parameters:
sender Progress.Lang.Object
The reference to the object that raised the event
e Consultingwerk.BusinessEntityDesigner.Services.CustomPropertiesUpdatedEventArgs
The CustomPropertiesUpdatedEventArgs with the data for this event
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 (character)

Purpose: Returns the code for the search constructors
Notes:

Parameters:
pcClassName CHARACTER
The name of the class
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

PUBLIC GenerateModelClasses (dataset, GenerateModelClassesEnum, character, character)

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
pcPackageName CHARACTER
The name of the DatasetModel package, ? to build based on TableModel package
pcClassName CHARACTER
The name of the DatasetModel class, ? to build based on Dataset Name
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 GenerateModelClasses (GenerateModelClassesEnum, character, character)

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
pcPackageName CHARACTER
The name of the DatasetModel package, ? to build based on TableModel package
pcClassName CHARACTER
The name of the DatasetModel class, ? to build based on Dataset Name
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 GenerateModelInterfaces (GenerateModelClassesEnum, character, character)

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
pcPackageName CHARACTER
The name of the DatasetModel package, ? to build based on TableModel package
pcClassName CHARACTER
The name of the DatasetModel class, ? to build based on Dataset Name
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

PROTECTED LOGICAL IsPluginActive ()

Purpose: Returns if the Plugin is active (not disabled)
Notes:

Returns LOGICAL
Logical value indicating if the Plugin is active (not disabled)
Top

PROTECTED OnGetDatasetModelMembers (GetDatasetModelMembersEventArgs)

Purpose: Raises the GetDatasetModelMembers
Notes:

Parameters:
e Consultingwerk.BusinessEntityDesigner.Plugins.ModelClassGenerator.GetDatasetModelMembersEventArgs
The GetDatasetModelMembersEventArgs with the data for the event
Top

PROTECTED OnGetTableModelMembers (GetTableModelMembersEventArgs)

Purpose: Raises the GetTableModelMembers
Notes:

Parameters:
e Consultingwerk.BusinessEntityDesigner.Plugins.ModelClassGenerator.GetTableModelMembersEventArgs
The GetTableModelMembersEventArgs with the data for the 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 ToggleActive ()

Purpose: Toggles the .Disabled property
Notes:

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 UpdateBusinessEntityAnnotations ()

Purpose: Updates the Annotations @DatasetModel and @TableModel Annotations
Notes:

Top

PROTECTED UpdateSearchConstructors (character, character)

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

Parameters:
pcClassName CHARACTER
The name of the class
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:



Event Detail
Top

PUBLIC GetDatasetModelMembers (Object, GetDatasetModelMembersEventArgs)

Purpose: Raised when generating properties/methods for the TableModel_Generated
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the GetDatasetModelMembers event
e Consultingwerk.BusinessEntityDesigner.Plugins.ModelClassGenerator.GetDatasetModelMembersEventArgs
The GetDatasetModelMembersEventArgs with the data for the event
Top

PUBLIC GetTableModelMembers (Object, GetTableModelMembersEventArgs)

Purpose: Raised when generating properties/methods for the TableModel_Generated
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the GetTableModelMembers event
e Consultingwerk.BusinessEntityDesigner.Plugins.ModelClassGenerator.GetTableModelMembersEventArgs
The GetTableModelMembersEventArgs with the data for the event


Property Detail
Top

PUBLIC LOGICAL IsStaticDataAccessQueryActive


Returns LOGICAL
Top

PUBLIC LOGICAL IsTableQueryBuilderActive


Returns LOGICAL
Top

PUBLIC LOGICAL SilentMode


Returns LOGICAL
Top

PUBLIC CHARACTER SuffixDatasetModel


Returns CHARACTER
Top

PUBLIC CHARACTER SuffixTableModel


Returns CHARACTER
Top

PUBLIC CHARACTER SuffixTableModelFilter


Returns CHARACTER
Top

PUBLIC 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-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       15.04.2024 05:49:20