Top Method Summary
Options Name Purpose
LOGICAL AnyEntityClassExists () Returns TRUE when at least one of the class files of the current Business Entity design exists (SCL-5617)
ApplyRenamedGeneratedObjects () Detects temp-table and dataset include files that were renamed or moved with the current design and updates the references to them in the source files of the Business Entity (SCL-5617)
Consultingwerk.Framework.Enum.DialogResultEnum AskQuestion (character, character) Centralized wrapper for question dialogs
CHARACTER BuildIncludeFileName (character, character) Returns the file name of the include file for the given path and include file name (SCL-5617)
CHARACTER BuildIncludeFileReference (character, character, character) Returns the name of the include file for the given path and include file name, relative to the include file base folder (SCL-5617)
CHARACTER BuildReceiveDataCodeBlock () Builds the source code for the ReceiveData method (Calculated Fields)
CHARACTER CaseKeywords (character) Returns the input string in the selected keyboard casing
CHARACTER CaseKeywords (character, character) Returns the input string in the selected keyboard casing
LOGICAL CheckDirectoriesExist (logical) Verifies that all output directories exist
LOGICAL CheckNotWriteProtected (character, logical) Verifies if files are write protected and optionally prompts if files should be overwritten
LOGICAL CheckNotWriteProtected (logical, logical) Verifies if files are write protected and optionally prompts if files should be overwritten
CHARACTER CheckTemplatePath (character) Locates a template file and throws an Error when the template cannot be located
CHARACTER ChildTablesOf (character) Returns the child tables of the given temp-table
LOGICAL Compile (dataset) Complies the generated BusinessEntity, DataAccess and DatasetController classes
CompileFile (character, character) Compiles a file
Consultingwerk.BusinessEntityDesigner.Generator.DataAccessStyleEnum DataAccessStyle (character) Determines the style used for the Data Access class
EvaluateFolderNames () Evaluates the source and r-code folder names
CHARACTER FieldInitialValue (character, character) Converts the field's initial value based on the current numeric settings
LOGICAL FindGeneratedSectionMarkers (character, character, character, character, logical, AnnotationParser2, character, integer, integer) Locates the start and end marker of a generated section of a Business Entity class
Consultingwerk.Studio.ProparseApi.INode FindMethod (IParseUnit, character) Parses the Business Entity and returns the INode representing the ValidateData method
org.prorefactor.core.JPNode FindMethod (ParseUnit, character) Parses the Business Entity and returns the JPNode representing the ValidateData method
CHARACTER FindOrphanedTempTableInclude (character, character, character) Returns the generated temp-table include file that is assigned to a renamed temp-table (SCL-5617)
FixLineBreak (character) Fixes the line breaks of the generated source
LONGCHAR GenerateAssignSourceBufferAndTables () Returns the source code that assigns the SourceBufferNames and SourceTableNames properties
GenerateAssignSourceBufferAndTables (character, character) Returns the source code that assigns the SourceBufferNames and SourceTableNames properties
CHARACTER GenerateBusinessEntity () Generates the Business Entity
LOGICAL GenerateCode (dataset) Generates the source code
CHARACTER GenerateDataAccessObject () Generates the Data Access Object
GenerateDataAccessObjectDetails (longchar, longchar, longchar, longchar, longchar, CharacterDictionary) Generates the DataSource Object Details
GenerateDataAccessObjectDetails2 (longchar, longchar, longchar, longchar, longchar, CharacterDictionary) Generates the DataSource Object Details
CHARACTER GenerateDataset () Generates the dataset include file
CHARACTER GenerateDatasetController () Generates the dataset controller
CHARACTER GenerateFileAnnotation (character, character, character) Returns the source code for the @FILEANNOTATION@ based on the role of the file and the business entity
LONGCHAR GenerateSourceColumnWhen (character) Returns the WHEN branch for the SourceColumn CASE Statement of a single temp-table
CHARACTER GenerateTempTables () Generates the temp-table include files
CHARACTER GenerateXmlSchema () Generates XML schema representation of the Dataset
Consultingwerk.Studio.ProparseApi.INode GetAnnotationNode (character, character) Locates the INode representing an Annotation in the source code
Consultingwerk.Studio.ProparseApi.INode GetAnnotationNode (character, character, IParseUnit) Locates the INode representing an Annotation in the source code
GetAnnotationToFrom (character, character, character, character, integer, integer) Locates the lines a start and end annotation are contained in a source code unit
GetAnnotationToFromParsed (character, character, character, character, integer, integer) Locates the lines a start and end annotation are contained in a source code unit, using the Proparse AST
CHARACTER GetAssignSkipDictionaryComplete () Returns the full list of all AssignSkipDictionary entries
CHARACTER GetAssignSkipDictionaryEntry (character) Generate the Buffer specific AssignSkipDictionary statement
Consultingwerk.Studio.ProparseApi.INode GetEndNodeOfConstructor (IParseUnit) Finds the END Node of the default Constructor
CHARACTER GetExcludedFields (character) Returns the list of field names that should be excluded from AttachDataSource
CHARACTER GetFieldMapping (character, integer) Returns the field mapping pairs for the named temp-table
CHARACTER GetIncludeFileReference (character, character) Returns the include file reference of the given generated include file, relative to the include file base folder (SCL-5617)
LOGICAL GetRegenerate (character) Returns if the component identified by the ID should be regenerated
Consultingwerk.BusinessEntityDesigner.Generator.ListRegenerateParameter GetRegenerateParameters () Returns the list of the regenerate parameters
CHARACTER GetStaleFileScanRoots () Returns the list of root directories to scan for stale generated files (SCL-5615)
CHARACTER GetTopNavBuffers () Returns the comma delimited list of the top-nav buffers of the generated dataset
CHARACTER GetUserId () Returns the current windows user d
CHARACTER GetUserName () Returns the current windows user name
LOGICAL HasCalculatedFields () Returns if the Business Entity design contains calculated fields
LOGICAL HasValidations () Returns if the Business Entity design contains validations
OnAfterWriteFile (AfterWriteFileEventArgs) Raises the AfterWriteFile event
OnBeforeGenerateSource (EventArgs) Raises the BeforeGenerateSource event (SCL-5646)
OnBeforeRegenerateSource (EventArgs) Raises the BeforeRegenerateSource event (SCL-5646)
OnBeforeUpdateClasses (EventArgs) Raises the BeforeUpdateClasses event (SCL-5617)
OnCheckStaleFiles (CheckStaleFilesEventArgs) Raises the CheckStaleFiles event (SCL-5615)
OnGenerateTempTable (GenerateTempTableEventArgs) Raises the GenerateTempTable event
OnGenerationFinished (EventArgs) Raises the GenerationFinished event
OnProvideRegeneratePrompt (ProvideRegeneratePromptEventArgs) Raises the ProvideRegeneratePrompt event
OnValidateDesign (CancelableEventArgs) Raises the ValidateDesign event
OnWriteFile (WriteFileEventArgs) Raises the WriteFile event
OpenFilesInIDE (character) Opens the generated files in the IDE
LOGICAL PromptForOverwrite (character) Prompts for overwriting an existing file
Consultingwerk.BusinessEntityDesigner.Generator.AfterWriteFileEventArgs RaiseAfterWriteFileEvent (character, character) Raises the AfterWriteFile event from the Business Entity Dataset Controller
RaiseBeforeUpdateClassesEvent () Raises the BeforeUpdateClasses event (SCL-5617)
RaiseGenerationFinishedEvent () Raises the GenerationFinished event
Consultingwerk.BusinessEntityDesigner.Generator.WriteFileEventArgs RaiseWriteFileEvent (character, character) Raises the WriteFile event from the Business Entity Dataset Controller
RecordWrittenFileName (character) Records the given file name in the inventory of the files announced through the WriteFile / AfterWriteFile events during the current generation run (SCL-5615)
LOGICAL RegenerateCode (dataset) Re-generates the source code
LONGCHAR RemoveObsoleteCaseWhenBranches (longchar, ListCaseWhen2, integer, character, character) Removes the WHEN branches of temp-tables that are no longer part of the design from a generated CASE statement (SCL-5617)
ScanForStaleFiles (dataset, table) Scans the code base for files generated for the current Business Entity (based on the @BusinessEntityGenerator file annotation) and flags the files that are no longer part of the expected generator output as stale (SCL-5615)
CHARACTER UnqualifiedTableNames (character) Returns a list of unqualified table names by removing the database prefix
UpdateAssignSkipDictionary (character) Updates the AssignSkipDictionary entries in the Constructor
UpdateAttachDataSource (character) Updates the Attach Data Source Method
CHARACTER UpdateBusinessEntity () Updates the Business Entity by merging the current source code with the model
UpdateBusinessEntityCalculatedFields (character) Updates the Business Entity Calculated Fields
UpdateBusinessEntityValidation (character) Updates the Business Entity Validation
CHARACTER UpdateDataAccessObject () Updates the Data Access Object by merging the current source code with the model
UpdateDataSourceDefinition (character) Updates the Data Source Definition
UpdateDetachDataSource (character) Updates the Detach Data Source Method
UpdateEnableParentRelationMethods (character) Updates the EnableParentRelation methods in the Data Access class
UpdateExistingSourceDefaultQuery (character) Updates the SourceDefault Method
UpdateMappingDefinition (character) Updates the mapping definition
UpdateOptimizeSourceQuery (character) Updates the assignment of the OptimizeSourceQuery property in the Constructor of the Data Access class
UpdateSourceColumn (character) Updates the SourceColumn Method
UpdateSourceDefaultQuery (character) Updates the SourceDefault Method
CHARACTER ValidABLIdentifier (character) Limits the length of an identifier to 32 characters (ABL maximum)
ValidateDesign () Validates the Design information
ValidateDesign (dataset) Validates the Design information
ValidateUniqueSerializeNames () Validates uniqueness of serialize names

Top Constructor Summary
Options Name Purpose
BusinessEntityGenerator () Constructor for the BusinessEntityGenerator class

Top Event Summary
Options Name Purpose
AfterWriteFile (Object, AfterWriteFileEventArgs) Raised when the Business Entity Designer writes to an output file
BeforeGenerateSource (Object, EventArgs) Raised at the start of GenerateCode, before the design is validated (SCL-5646)
BeforeRegenerateSource (Object, EventArgs) Raised at the start of RegenerateCode, before the design is validated (SCL-5646)
BeforeUpdateClasses (Object, EventArgs) Raised during a regeneration after the temp-table and dataset include files have been written and before the Business Entity and DataAccess classes are updated (SCL-5617)
CheckStaleFiles (Object, CheckStaleFilesEventArgs) Raised while scanning for stale generated files (SCL-5615) so that plugins can flag the file types they are responsible for as stale when those files are no longer part of the expected generator output
GenerateTempTable (Object, GenerateTempTableEventArgs) Raised when the Business Entity Generator generates a temp-table
GenerationFinished (Object, EventArgs) Raised once after a Business Entity generation (or regeneration) run has fully completed, including the source generated by plug-ins subscribed to the controller's AfterGenerateSource / AfterRegenerateSource events
ProvideRegeneratePrompt (Object, ProvideRegeneratePromptEventArgs) Raised when the Business Entity Generator needs to obtain the list of regenerate prompts
ValidateDesign (CancelableEventArgs) Raised when the Business Entity Designer validates the design
WriteFile (Object, WriteFileEventArgs) Raised when the Business Entity Designer writes to an output file

Top Property Summary
Options Name Purpose
Consultingwerk.BusinessEntityDesigner.Generator.Generated Generated
LOGICAL OpenFilesInIDE
LOGICAL SilentMode
LOGICAL SilentModeUpdateDataAccess
CHARACTER SuffixBusinessEntity
CHARACTER SuffixDataAccess
CHARACTER SuffixDatasetController


Method Detail
Top

LOGICAL AnyEntityClassExists ()

Purpose: Returns TRUE when at least one of the class files of the current
Business Entity design exists (SCL-5617)
Notes: Used to tell the very first generation of a Business Entity
apart from the regeneration of an existing one

Returns LOGICAL
TRUE when at least one class file of the Business Entity exists
Top

ApplyRenamedGeneratedObjects ()

Purpose: Detects temp-table and dataset include files that were renamed
or moved with the current design and updates the references to
them in the source files of the Business Entity (SCL-5617)
Notes: Runs before the new include files are written, so that the
source files are updated while the previous definitions are
still in place. A rename is detected by comparing the expected
include files of the current design against the generated files
of this Business Entity found on disk (the file annotation scan
introduced with SCL-5615). Only unambiguous renames are applied
- when the assignment of the previous to the current names is
not unique, the references are left untouched and the previous
files are reported as stale after the generation as before.
The previous include files are never deleted here - they are
presented to the user by the stale file check

Top

Consultingwerk.Framework.Enum.DialogResultEnum AskQuestion (character, character)

Purpose: Centralized wrapper for question dialogs
Notes: Allows derived classes to override dialog behavior and eases testing

Parameters:
pcMessage CHARACTER
The message text
pcCaption CHARACTER
The dialog caption
Returns Consultingwerk.Framework.Enum.DialogResultEnum
DialogResultEnum selected by the user
Top

CHARACTER BuildIncludeFileName (character, character)

Purpose: Returns the file name of the include file for the given path and
include file name (SCL-5617)
Notes:

Parameters:
pcPath CHARACTER
The path of the include file (eTable.TempTablePath or eBusinessEntity.DatasetPath)
pcName CHARACTER
The name of the include file without the extension
Returns CHARACTER
The name of the include file, relative to the working directory or fully qualified
Top

CHARACTER BuildIncludeFileReference (character, character, character)

Purpose: Returns the name of the include file for the given path and
include file name, relative to the include file base folder
(SCL-5617)
Notes: Returns the reference as it is written into the generated
source code, e.g. Sports2000/Order/eOrder.i

Parameters:
pcPath CHARACTER
The path of the include file (eTable.TempTablePath or eBusinessEntity.DatasetPath)
pcName CHARACTER
The name of the include file without the extension
pcExtension CHARACTER
The file extension without the dot, e.g. i
Returns CHARACTER
The include file reference relative to the include file base folder
Top

CHARACTER BuildReceiveDataCodeBlock ()

Purpose: Builds the source code for the ReceiveData method (Calculated Fields)
Notes:

Returns CHARACTER
The generated source code for the ReceiveData method
Top

CHARACTER CaseKeywords (character)

Purpose: Returns the input string in the selected keyboard casing
Notes: See BusinessEntityDesignerSettings

Parameters:
pcString CHARACTER
The string value to fix the casing for
Returns CHARACTER
The string in the desired casing
Top

CHARACTER CaseKeywords (character, character)

Purpose: Returns the input string in the selected keyboard casing
Notes: See BusinessEntityDesignerSettings

Parameters:
pcString CHARACTER
The string value to fix the casing for
pcKeepCase CHARACTER
CHR(1) delimited list of strings contained in the pcString that should keep heir casing as provided in this parameter
Returns CHARACTER
The string in the desired casing
Top

LOGICAL CheckDirectoriesExist (logical)

Purpose: Verifies that all output directories exist
Notes:

Parameters:
plIncludeFilesOnly LOGICAL
Only verify the directories of the include files
Returns LOGICAL
Logical value indicating if the code generation should continue (FALSE will cancel the generator)
Top

LOGICAL CheckNotWriteProtected (character, logical)

Purpose: Verifies if files are write protected and optionally prompts if files
should be overwritten
Notes:

Parameters:
pcFileName CHARACTER
The name of the file to check
plAskOverwrite LOGICAL
Logical flag indicating if the Business Entity Generator should prompt for overwriting files
Returns LOGICAL
Logical value indicating if no file is write protected
Top

LOGICAL CheckNotWriteProtected (logical, logical)

Purpose: Verifies if files are write protected and optionally prompts if files
should be overwritten
Notes:

Parameters:
plIncludeFilesOnly LOGICAL
Logical flag indicating if only the include files should be verified
plAskOverwrite LOGICAL
Logical flag indicating if the Business Entity Generator should prompt for overwriting files
Returns LOGICAL
Logical value indicating if no file is write protected
Top

CHARACTER CheckTemplatePath (character)

Purpose: Locates a template file and throws an Error when the template
cannot be located
Notes:

Parameters:
pcFileName CHARACTER
The relative name of the template file
Returns CHARACTER
Full pathname of the template
Top

CHARACTER ChildTablesOf (character)

Purpose: Returns the child tables of the given temp-table
Notes:

Parameters:
pcParentTable CHARACTER
The name of the parent table to return the child tables of
Returns CHARACTER
Comma delimited list of child temp-tables of the parent table
Top

LOGICAL Compile (dataset)

Purpose: Complies the generated BusinessEntity, DataAccess and DatasetController
classes
Notes:

Parameters:
dsBusinessEntity DATASET dsBusinessEntity
The dataset with the Business Entity model
Returns LOGICAL
Logical value indicating the success of the operation
Top

CompileFile (character, character)

Purpose: Compiles a file
Notes:

Parameters:
pcFileName CHARACTER
The file name to compile
pcSaveInto CHARACTER
The directory to compile into
Top

Consultingwerk.BusinessEntityDesigner.Generator.DataAccessStyleEnum DataAccessStyle (character)

Purpose: Determines the style used for the Data Access class
Notes:

Parameters:
pcDataSourceStyle CHARACTER
The character representation of the Data Source Style
Returns Consultingwerk.BusinessEntityDesigner.Generator.DataAccessStyleEnum
DataAccessStyleEnum The DataAccessStyleEnum member representing the style used to generate the Data Access class
Top

EvaluateFolderNames ()

Purpose: Evaluates the source and r-code folder names
Notes: Variable cSourceFolder and cRCodeFolder

Top

CHARACTER FieldInitialValue (character, character)

Purpose: Converts the field's initial value based on the current numeric settings
Notes:

Parameters:
pcInitial CHARACTER
The initial value
pcDataType CHARACTER
The data type
Returns CHARACTER
The initial value in AMERICAN format for the ABL INITIAL VALUE
Top

LOGICAL FindGeneratedSectionMarkers (character, character, character, character, logical, AnnotationParser2, character, integer, integer)

Purpose: Locates the start and end marker of a generated section of a
Business Entity class
Notes: SCL-5672: Shared by UpdateBusinessEntityCalculatedFields and
UpdateBusinessEntityValidation, which used to carry their own
copy of this logic. A comment aware source scan is tried first -
when it finds both markers in the Business Entity file itself,
that is exactly what the parse based path below verifies, so the
parse has nothing left to contribute and is skipped. In every
other case - a marker missing, or sitting in an include file,
which the scanner cannot see - the parse resolves it the way it
always did, so the include file error and the "insert a new
section" path keep behaving as they do today. That is what makes
the fast path fail-safe: a miss costs a parse, it never inserts
a duplicate section

Parameters:
pcFileName CHARACTER
The name of the Business Entity source code
pcStartAnnotation CHARACTER
The name of the annotation starting the generated section
pcEndAnnotation CHARACTER
The name of the annotation ending the generated section
pcMessage CHARACTER
The headline of the message shown when the markers cannot be used
plHasContent LOGICAL
Logical value indicating if the design contains content for this section
poParser Consultingwerk.Studio.AnnotationParser2
OUTPUT The parser that located the markers, unknown when the source scan was sufficient
pcFullFileName CHARACTER
OUTPUT The resolved file name of the Business Entity
piFrom INTEGER
OUTPUT The line of the start marker, unknown when the section is not in the source yet
piTo INTEGER
OUTPUT The line of the end marker, unknown when the section is not in the source yet
Returns LOGICAL
Logical value indicating if the caller should carry on updating the section
Top

Consultingwerk.Studio.ProparseApi.INode FindMethod (IParseUnit, character)

Purpose: Parses the Business Entity and returns the INode representing the
ValidateData method
Notes: FindMethod is duplicated to allow the continued direct use of Proparse if the ProparseApi is not available.

Parameters:
poParseUnit Consultingwerk.Studio.ProparseApi.IParseUnit
The reference to the ParseUnit
pcMethodName CHARACTER
The name of the method to locate
Returns Consultingwerk.Studio.ProparseApi.INode
The INode representing the ValidateData method
Top

org.prorefactor.core.JPNode FindMethod (ParseUnit, character)

Purpose: Parses the Business Entity and returns the JPNode representing the
ValidateData method
Notes: FindMethod is duplicated to allow the continued direct use of Proparse if the ProparseApi is not available.

Parameters:
poParseUnit org.prorefactor.treeparser.ParseUnit
The reference to the ParseUnit
pcMethodName CHARACTER
The name of the method to locate
Returns org.prorefactor.core.JPNode
The JPNode representing the ValidateData method
Top

CHARACTER FindOrphanedTempTableInclude (character, character, character)

Purpose: Returns the generated temp-table include file that is assigned to
a renamed temp-table (SCL-5617)
Notes: The assignment is made by comparing the field names of the
current temp-table against the field names defined in the
generated include files that are no longer part of the design,
so that several temp-tables renamed in the same generation run
are assigned correctly. When a single include file is left and
a single temp-table is missing, that assignment is used without
comparing the fields (a renamed temp-table whose fields were
changed at the same time). Returns "" when the assignment is
not unique - the references of that temp-table are then not
updated

Parameters:
pcTempTableName CHARACTER
The name of the temp-table of the current design
pcOrphanedTables CHARACTER
CHR(1) delimited list of the generated temp-table include files that are no longer part of the design
pcAssignedFiles CHARACTER
CHR(1) delimited list of the include files that are already assigned
Returns CHARACTER
The name of the assigned include file or "" when the assignment is not unique
Top

FixLineBreak (character)

Purpose: Fixes the line breaks of the generated source
Notes:

Parameters:
pcFileName CHARACTER
The file name to open
Top

LONGCHAR GenerateAssignSourceBufferAndTables ()

Purpose: Returns the source code that assigns the SourceBufferNames
and SourceTableNames properties
Notes:

Returns LONGCHAR
The source code that assigns the SourceBufferNames and SourceTableNames properties
Top

GenerateAssignSourceBufferAndTables (character, character)

Purpose: Returns the source code that assigns the SourceBufferNames
and SourceTableNames properties
Notes:

Parameters:
pcSourceTables CHARACTER
OUTPUT The semicolon delimited list of comma delimited list of source table names
pcSourceBuffers CHARACTER
OUTPUT The semicolon delimited list of comma delimited list of source buffer names
Top

CHARACTER GenerateBusinessEntity ()

Purpose: Generates the Business Entity
Notes:

Returns CHARACTER
The name of the generated business entity
Top

LOGICAL GenerateCode (dataset)

Purpose: Generates the source code
Notes: This method will overwrite eventually existing source code

Parameters:
dsBusinessEntity DATASET dsBusinessEntity
The dataset with the Business Entity model
Returns LOGICAL
Logical value indicating the success of the operation
Top

CHARACTER GenerateDataAccessObject ()

Purpose: Generates the Data Access Object
Notes:

Returns CHARACTER
The name of the generated data access object
Top

GenerateDataAccessObjectDetails (longchar, longchar, longchar, longchar, longchar, CharacterDictionary)

Purpose: Generates the DataSource Object Details
Notes:

Parameters:
lcDefineDataSource LONGCHAR
The code block for the data source definition
lcAttachDataSource LONGCHAR
The code block for attaching the data sources
lcDetachDataSource LONGCHAR
The code block the detaching the data sources
lcSourceColumn LONGCHAR
The code block for the SourceColumn method
lcDefaultQuery LONGCHAR
The code block for the SourceDefaultQuery method
poDataSourceNames Consultingwerk.Framework.Collections.CharacterDictionary
The CharacterDictionary of data source names
Top

GenerateDataAccessObjectDetails2 (longchar, longchar, longchar, longchar, longchar, CharacterDictionary)

Purpose: Generates the DataSource Object Details
Notes:

Parameters:
lcDefineDataSource LONGCHAR
The code block for the data source definition
lcAttachDataSource LONGCHAR
The code block for attaching the data sources
lcDetachDataSource LONGCHAR
The code block the detaching the data sources
lcSourceColumn LONGCHAR
The code block for the SourceColumn method
lcDefaultQuery LONGCHAR
The code block for the SourceDefaultQuery method
poDataSourceNames Consultingwerk.Framework.Collections.CharacterDictionary
The CharacterDictionary of data source names
Top

CHARACTER GenerateDataset ()

Purpose: Generates the dataset include file
Notes:

Returns CHARACTER
The file name of the generated dataset include file
Top

CHARACTER GenerateDatasetController ()

Purpose: Generates the dataset controller
Notes:

Returns CHARACTER
The file name of the generated dataset controller
Top

CHARACTER GenerateFileAnnotation (character, character, character)

Purpose: Returns the source code for the @FILEANNOTATION@ based on the
role of the file and the business entity
Notes:

Parameters:
pcEntityPackage CHARACTER
The Business Entity package
pcEntityName CHARACTER
The Business Entity name
pcFileType CHARACTER
The file type
Returns CHARACTER
The source code for the @FILEANNOTATION@
Top

LONGCHAR GenerateSourceColumnWhen (character)

Purpose: Returns the WHEN branch for the SourceColumn CASE Statement
of a single temp-table
Notes:

Parameters:
pcTable CHARACTER
The name of the temp-table
Returns LONGCHAR
The WHEN branch for the SourceColumn CASE Statement
Top

CHARACTER GenerateTempTables ()

Purpose: Generates the temp-table include files
Notes:

Returns CHARACTER
Comma-delimited list of the generated temp-table include files
Top

CHARACTER GenerateXmlSchema ()

Purpose: Generates XML schema representation of the Dataset
Notes: Uses DATASET:WRITE-XMLSCHEMA method

Returns CHARACTER
The file name of the generated xsd file
Top

Consultingwerk.Studio.ProparseApi.INode GetAnnotationNode (character, character)

Purpose: Locates the INode representing an Annotation in the source code
Notes:

Parameters:
pcFileName CHARACTER
The file name to parse
pcAnnotation CHARACTER
The name of the annotation
Returns Consultingwerk.Studio.ProparseApi.INode
The INode reference representing the first occurence of the given annotation
Top

Consultingwerk.Studio.ProparseApi.INode GetAnnotationNode (character, character, IParseUnit)

Purpose: Locates the INode representing an Annotation in the source code
Notes:

Parameters:
pcFileName CHARACTER
The file name to parse
pcAnnotation CHARACTER
The name of the annotation
poParseUnit Consultingwerk.Studio.ProparseApi.IParseUnit
Output Parameter, the ParseUnit used
Returns Consultingwerk.Studio.ProparseApi.INode
The INode reference representing the first occurence of the given annotation
Top

GetAnnotationToFrom (character, character, character, character, integer, integer)

Purpose: Locates the lines a start and end annotation are contained in a
source code unit
Notes:

Parameters:
pcFileName CHARACTER
The file name to parse
pcStartAnnotation CHARACTER
The name of the start annotation
pcEndAnnotation CHARACTER
The name of the end annotation
pcAnnotationFileName CHARACTER
OUTPUT The file name containing the annotations
piStart INTEGER
The line number of the starting annotation
piEnd INTEGER
The line number of the ending annotation
Top

GetAnnotationToFromParsed (character, character, character, character, integer, integer)

Purpose: Locates the lines a start and end annotation are contained in a
source code unit, using the Proparse AST
Notes: Fallback of GetAnnotationToFrom for the case that the annotations
are not found in the file itself - the parse expands the include
files, the source scan does not. Reports a failure to the user
and leaves the output parameters unset (SCL-5654)

Parameters:
pcFileName CHARACTER
The file name to parse
pcStartAnnotation CHARACTER
The name of the start annotation
pcEndAnnotation CHARACTER
The name of the end annotation
pcAnnotationFileName CHARACTER
OUTPUT The file name containing the annotations
piStart INTEGER
OUTPUT The line number of the starting annotation
piEnd INTEGER
OUTPUT The line number of the ending annotation
Top

CHARACTER GetAssignSkipDictionaryComplete ()

Purpose: Returns the full list of all AssignSkipDictionary entries
Notes: Used for the initial code generation to replace the placeholder

Returns CHARACTER
Formatted list of all AssignSkipDictionary entries
Top

CHARACTER GetAssignSkipDictionaryEntry (character)

Purpose: Generate the Buffer specific AssignSkipDictionary statement
Notes:

Parameters:
pcBufferName CHARACTER
Name of the Buffer to create the AssignSkipDictionary statement for
Returns CHARACTER
the AssignSkipDictionary statement
Top

Consultingwerk.Studio.ProparseApi.INode GetEndNodeOfConstructor (IParseUnit)

Purpose: Finds the END Node of the default Constructor
Notes:

Parameters:
poParseUnit Consultingwerk.Studio.ProparseApi.IParseUnit
The ParseUnit context to be used as the source
Returns Consultingwerk.Studio.ProparseApi.INode
The END Constructor Node
Top

CHARACTER GetExcludedFields (character)

Purpose: Returns the list of field names that should be excluded from AttachDataSource
Notes:

Parameters:
pcTempTableName CHARACTER
The name of the temp-table to return the excluded fields for
Returns CHARACTER
The comma delimited list of excluded field names
Top

CHARACTER GetFieldMapping (character, integer)

Purpose: Returns the field mapping pairs for the named temp-table
Notes:

Parameters:
pcTempTableName CHARACTER
The name of the temp-table to return the field mappings for
piSpaces INTEGER
The number of SPACE Characters (CHR(32)) to prefix each entry with
Returns CHARACTER
The list of the field mappings
Top

CHARACTER GetIncludeFileReference (character, character)

Purpose: Returns the include file reference of the given generated
include file, relative to the include file base folder
(SCL-5617)
Notes: Returns "" when the file is not located below the include file
base folder

Parameters:
pcFileName CHARACTER
The fully qualified name of the include file
pcExtension CHARACTER
The file extension without the dot, e.g. i
Returns CHARACTER
The include file reference relative to the include file base folder
Top

LOGICAL GetRegenerate (character)

Purpose: Returns if the component identified by the ID should be
regenerated
Notes:

Parameters:
pcID CHARACTER
The ID of the component to regenerate
Returns LOGICAL
Logical value indicating if the component should be regenerated
Top

Consultingwerk.BusinessEntityDesigner.Generator.ListRegenerateParameter GetRegenerateParameters ()

Purpose: Returns the list of the regenerate parameters
Notes: Raised by the UI to obtain the list of prompts

Returns Consultingwerk.BusinessEntityDesigner.Generator.ListRegenerateParameter
The list of the regenerate parameters
Top

CHARACTER GetStaleFileScanRoots ()

Purpose: Returns the list of root directories to scan for stale generated
files (SCL-5615)
Notes: Returns the resolved source code, GUI source code and include
file base folders (without duplicates). When no base folder is
configured, the current working directory is returned

Returns CHARACTER
CHR(1)-delimited list of the root directories to scan
Top

CHARACTER GetTopNavBuffers ()

Purpose: Returns the comma delimited list of the top-nav buffers of the generated dataset
Notes:

Returns CHARACTER
The comma delimited list of the top-nav buffers
Top

CHARACTER GetUserId ()

Purpose: Returns the current windows user d
Notes:

Returns CHARACTER
The ID of the current windows user
Top

CHARACTER GetUserName ()

Purpose: Returns the current windows user name
Notes:

Returns CHARACTER
The Display name of the current windows user
Top

LOGICAL HasCalculatedFields ()

Purpose: Returns if the Business Entity design contains calculated fields
Notes:

Returns LOGICAL
Logical value indicating if the Business Entity design contains calculated fields
Top

LOGICAL HasValidations ()

Purpose: Returns if the Business Entity design contains validations
Notes:

Returns LOGICAL
Logical value indicating if the Business Entity design contains validations
Top

OnAfterWriteFile (AfterWriteFileEventArgs)

Purpose: Raises the AfterWriteFile event
Notes:

Parameters:
e Consultingwerk.BusinessEntityDesigner.Generator.AfterWriteFileEventArgs
The AfterWriteFileEventArgs with the data for the event
Top

OnBeforeGenerateSource (EventArgs)

Purpose: Raises the BeforeGenerateSource event (SCL-5646)
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for the event
Top

OnBeforeRegenerateSource (EventArgs)

Purpose: Raises the BeforeRegenerateSource event (SCL-5646)
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for the event
Top

OnBeforeUpdateClasses (EventArgs)

Purpose: Raises the BeforeUpdateClasses event (SCL-5617)
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for the event
Top

OnCheckStaleFiles (CheckStaleFilesEventArgs)

Purpose: Raises the CheckStaleFiles event (SCL-5615)
Notes:

Parameters:
e Consultingwerk.BusinessEntityDesigner.Generator.CheckStaleFilesEventArgs
The CheckStaleFilesEventArgs with the data for the event
Top

OnGenerateTempTable (GenerateTempTableEventArgs)

Purpose: Raises the GenerateTempTable event
Notes:

Parameters:
e Consultingwerk.BusinessEntityDesigner.Generator.GenerateTempTableEventArgs
The GenerateTempTableEventArgs with the data for the event
Top

OnGenerationFinished (EventArgs)

Purpose: Raises the GenerationFinished event
Notes:

Parameters:
e Consultingwerk.EventArgs
The Consultingwerk.EventArgs with the data for the event
Top

OnProvideRegeneratePrompt (ProvideRegeneratePromptEventArgs)

Purpose: Raises the ProvideRegeneratePrompt event
Notes:

Parameters:
e Consultingwerk.BusinessEntityDesigner.Generator.ProvideRegeneratePromptEventArgs
The GenerateTempTableEventArgs with the data for the event
Top

OnValidateDesign (CancelableEventArgs)

Purpose: Raises the ValidateDesign event
Notes:

Parameters:
e Consultingwerk.CancelableEventArgs
The CancelableEventArgs with the data for the event
Top

OnWriteFile (WriteFileEventArgs)

Purpose: Raises the WriteFile event
Notes:

Parameters:
e Consultingwerk.BusinessEntityDesigner.Generator.WriteFileEventArgs
The WriteFileEventArgs with the data for the event
Top

OpenFilesInIDE (character)

Purpose: Opens the generated files in the IDE
Notes:

Parameters:
pcFileNames CHARACTER
The comma delimited list of file names to open in the IDE
Top

LOGICAL PromptForOverwrite (character)

Purpose: Prompts for overwriting an existing file
Notes:

Parameters:
pcFileName CHARACTER
The file name to be used in the prompt dialog
Returns LOGICAL
Logical value indicating the response of the current user
Top

Consultingwerk.BusinessEntityDesigner.Generator.AfterWriteFileEventArgs RaiseAfterWriteFileEvent (character, character)

Purpose: Raises the AfterWriteFile event from the Business Entity Dataset Controller
Notes:

Parameters:
pcFilePurpose CHARACTER
The purpose of the file being written
pcFileName CHARACTER
The name of the file being written
Returns Consultingwerk.BusinessEntityDesigner.Generator.AfterWriteFileEventArgs
The AfterWriteFileEventArgs with the result of the event
Top

RaiseBeforeUpdateClassesEvent ()

Purpose: Raises the BeforeUpdateClasses event (SCL-5617)
Notes: Allows plugins to bring the include files they generate in line
with the current design before the Business Entity and
DataAccess classes are parsed and updated

Top

RaiseGenerationFinishedEvent ()

Purpose: Raises the GenerationFinished event
Notes: Called by the orchestrating controller / business task once a
generation or regeneration run has fully completed (including
plug-in generated source)

Top

Consultingwerk.BusinessEntityDesigner.Generator.WriteFileEventArgs RaiseWriteFileEvent (character, character)

Purpose: Raises the WriteFile event from the Business Entity Dataset Controller
Notes:

Parameters:
pcFilePurpose CHARACTER
The purpose of the file being written
pcFileName CHARACTER
The name of the file being written
Returns Consultingwerk.BusinessEntityDesigner.Generator.WriteFileEventArgs
The WriteFileEventArgs with the result of the event
Top

RecordWrittenFileName (character)

Purpose: Records the given file name in the inventory of the files
announced through the WriteFile / AfterWriteFile events during
the current generation run (SCL-5615)
Notes: The file name is normalized (resolved via FILE-INFO when the
file exists, backslash separators otherwise) so that it can be
compared against the full path names returned by the
IGeneratedFileScanner service

Parameters:
pcFileName CHARACTER
The name of the announced file
Top

LOGICAL RegenerateCode (dataset)

Purpose: Re-generates the source code
Notes: Currently this will only re-generate the dataset and temp-table
definitions, but leave the business entity and data access code
untouched

Parameters:
dsBusinessEntity DATASET dsBusinessEntity
The dataset with the Business Entity model
Returns LOGICAL
Logical value indicating the success of the operation
Top

LONGCHAR RemoveObsoleteCaseWhenBranches (longchar, ListCaseWhen2, integer, character, character)

Purpose: Removes the WHEN branches of temp-tables that are no longer part
of the design from a generated CASE statement (SCL-5617)
Notes: The generator adds a WHEN branch for every temp-table of the
design to the SourceColumn and SourceDefaultQuery case
statements. The branches of temp-tables that were removed from
(or renamed in) the design have to be taken out as well - they
reference a buffer that no longer exists, which makes the
DataAccess class fail to compile

Parameters:
plcSource LONGCHAR
The source code of the DataAccess class
poList Consultingwerk.Studio.ListCaseWhen2
The WHEN branches of the case statement, in source order
piEndLine INTEGER
The line number of the OTHERWISE or the END CASE statement
pcValidTables CHARACTER
The list of the temp-table names of the current design
pcDelimiter CHARACTER
The delimiter of the temp-table name list
Returns LONGCHAR
The source code without the WHEN branches of the removed temp-tables
Top

ScanForStaleFiles (dataset, table)

Purpose: Scans the code base for files generated for the current Business
Entity (based on the @BusinessEntityGenerator file annotation)
and flags the files that are no longer part of the expected
generator output as stale (SCL-5615)
Notes: Requires a completed GenerateCode / RegenerateCode run of this
generator instance - without the inventory of the announced
files, no file is ever flagged as stale. After checking the
generator's own file types, the CheckStaleFiles event is raised
so that plugins can flag the file types they are responsible
for. This method never deletes files - presenting the flagged
files to the user for confirmation is the responsibility of the
caller

Parameters:
dsBusinessEntity DATASET dsBusinessEntity
The dataset with the Business Entity model
ttStaleGeneratedFile TEMP-TABLE ttStaleGeneratedFile
OUTPUT TABLE with the generated files of the Business Entity and their Stale flag
Top

CHARACTER UnqualifiedTableNames (character)

Purpose: Returns a list of unqualified table names by removing the database prefix
Notes:

Parameters:
pcQualifiedTableNames CHARACTER
A comma delimited list of potentially DB qualified table names
Returns CHARACTER
The list of unqualified table names by removing the database prefix
Top

UpdateAssignSkipDictionary (character)

Purpose: Updates the AssignSkipDictionary entries in the Constructor
Notes:

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

UpdateAttachDataSource (character)

Purpose: Updates the Attach Data Source Method
Notes:

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

CHARACTER UpdateBusinessEntity ()

Purpose: Updates the Business Entity by merging the current source code
with the model
Notes: Using Proparse to parse the file

Returns CHARACTER
The file name of the Business Entity
Top

UpdateBusinessEntityCalculatedFields (character)

Purpose: Updates the Business Entity Calculated Fields
Notes: Replaces source code within @GeneratedCalculatedFieldsStart. and
@GeneratedCalculatedFieldsEnd. annotations.

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

UpdateBusinessEntityValidation (character)

Purpose: Updates the Business Entity Validation
Notes: Replaces source code within @GeneratedValidationStart. and
@GeneratedValidationEnd. annotations.

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

CHARACTER UpdateDataAccessObject ()

Purpose: Updates the Data Access Object by merging the current source code
with the model
Notes: Using Proparse to parse the file

Returns CHARACTER
The file name of the Data Access Object
Top

UpdateDataSourceDefinition (character)

Purpose: Updates the Data Source Definition
Notes:

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

UpdateDetachDataSource (character)

Purpose: Updates the Detach Data Source Method
Notes:

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

UpdateEnableParentRelationMethods (character)

Purpose: Updates the EnableParentRelation methods in the Data Access class
Notes:

Parameters:
pcFileName CHARACTER
The name of the Data Access class
Top

UpdateExistingSourceDefaultQuery (character)

Purpose: Updates the SourceDefault Method
Notes:

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

UpdateMappingDefinition (character)

Purpose: Updates the mapping definition
Notes:

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

UpdateOptimizeSourceQuery (character)

Purpose: Updates the assignment of the OptimizeSourceQuery property in the
Constructor of the Data Access class
Notes: SCL-5430: When the Constructor does not assign the property yet, an
assign statement is only added when eBusinessEntity.OptimizeSourceQuery
is TRUE. When the Constructor already assigns the property - as an
individual assign statement or as part of a combined ASSIGN statement -
the assigned value is updated to the value of the
eBusinessEntity.OptimizeSourceQuery field

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

UpdateSourceColumn (character)

Purpose: Updates the SourceColumn Method
Notes:

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

UpdateSourceDefaultQuery (character)

Purpose: Updates the SourceDefault Method
Notes: This method adds new SourceDefaultQuery CASE branches. The method
UpdateExistingSourceDefaultQuery verifies existing CASE branches.

Parameters:
pcFileName CHARACTER
The name of the Data Access source code
Top

CHARACTER ValidABLIdentifier (character)

Purpose: Limits the length of an identifier to 32 characters (ABL maximum)
Notes: Avoid error: Identifier was left blank or is more than 32 characters. (1700)

Parameters:
pcIdentifier CHARACTER
The intended ABL identifier
Returns CHARACTER
The identifier name reduced to 32 characters
Top

ValidateDesign ()

Purpose: Validates the Design information
Notes: Throws errors when there are issues in the Design

Top

ValidateDesign (dataset)

Purpose: Validates the Design information
Notes: Throws errors when there are issues in the Design

Parameters:
dsBusinessEntity DATASET dsBusinessEntity
The dataset with the Business Entity model
Top

ValidateUniqueSerializeNames ()

Purpose: Validates uniqueness of serialize names
Notes: dsBusinessEntity passed to calling method ValidateDesign



Constructor Detail
Top

BusinessEntityGenerator ()

Purpose: Constructor for the BusinessEntityGenerator class
Notes:



Event Detail
Top

AfterWriteFile (Object, AfterWriteFileEventArgs)

Purpose: Raised when the Business Entity Designer writes to an output file
Notes: Cancelable event, that can cancel the write of a single file. To
Cancel the whole business entity generation, event handlers should
throw an error

Parameters:
sender Progress.Lang.Object
The object that raised the WriteFile event
e Consultingwerk.BusinessEntityDesigner.Generator.AfterWriteFileEventArgs
The WriteFileEventArgs with the data for the event
Top

BeforeGenerateSource (Object, EventArgs)

Purpose: Raised at the start of GenerateCode, before the design is
validated (SCL-5646)
Notes: Allows plugins - such as server-side Business Entity Designer
plugins - to modify the design (e.g. add fields to the
temp-tables) before the source code is generated. Records
created here still run through the generator's design
validation

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

BeforeRegenerateSource (Object, EventArgs)

Purpose: Raised at the start of RegenerateCode, before the design is
validated (SCL-5646)
Notes: Allows plugins - such as server-side Business Entity Designer
plugins - to modify the design (e.g. add fields to the
temp-tables) before the source code is regenerated. Records
created here still run through the generator's design
validation

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

BeforeUpdateClasses (Object, EventArgs)

Purpose: Raised during a regeneration after the temp-table and dataset
include files have been written and before the Business Entity
and DataAccess classes are updated (SCL-5617)
Notes: Updating those classes parses them with their include files
expanded. Plugins that generate include files referenced by the
Business Entity or the DataAccess class - such as the FetchData
static query include - have to bring those files in line with
the current design here, otherwise a temp-table that was renamed
or removed with the current design is still referenced by the
include file and the class can no longer be parsed

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

CheckStaleFiles (Object, CheckStaleFilesEventArgs)

Purpose: Raised while scanning for stale generated files (SCL-5615) so
that plugins can flag the file types they are responsible for
as stale when those files are no longer part of the expected
generator output
Notes: Raised by the ScanForStaleFiles method after the generator has
checked its own file types. No file is ever deleted as a result
of this event - the flagged files are presented to the user for
confirmation first

Parameters:
sender Progress.Lang.Object
The object that raised the CheckStaleFiles event
e Consultingwerk.BusinessEntityDesigner.Generator.CheckStaleFilesEventArgs
The CheckStaleFilesEventArgs with the data for the event
Top

GenerateTempTable (Object, GenerateTempTableEventArgs)

Purpose: Raised when the Business Entity Generator generates a temp-table
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the GenerateTempTable event
e Consultingwerk.BusinessEntityDesigner.Generator.GenerateTempTableEventArgs
The GenerateTempTableEventArgs with the data for the event
Top

GenerationFinished (Object, EventArgs)

Purpose: Raised once after a Business Entity generation (or regeneration)
run has fully completed, including the source generated by
plug-ins subscribed to the controller's AfterGenerateSource /
AfterRegenerateSource events
Notes: Allows plug-ins to defer per-file processing (subscribed via the
AfterWriteFile event) to a single post-processing step over all
written files

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

ProvideRegeneratePrompt (Object, ProvideRegeneratePromptEventArgs)

Purpose: Raised when the Business Entity Generator needs to obtain the list of regenerate prompts
Notes:

Parameters:
sender Progress.Lang.Object
The object that raised the ProvideRegeneratePrompt event
e Consultingwerk.BusinessEntityDesigner.Generator.ProvideRegeneratePromptEventArgs
The GenerateTempTableEventArgs with the data for the event
Top

ValidateDesign (CancelableEventArgs)

Purpose: Raised when the Business Entity Designer validates the design
Notes: Cancelable event, that can cancel the validation

Parameters:
e Consultingwerk.CancelableEventArgs
The CancelableEventArgs with the data for the event
Top

WriteFile (Object, WriteFileEventArgs)

Purpose: Raised when the Business Entity Designer writes to an output file
Notes: Cancelable event, that can cancel the write of a single file. To
Cancel the whole business entity generation, event handlers should
throw an error

Parameters:
sender Progress.Lang.Object
The object that raised the WriteFile event
e Consultingwerk.BusinessEntityDesigner.Generator.WriteFileEventArgs
The WriteFileEventArgs with the data for the event


Property Detail
Top

Consultingwerk.BusinessEntityDesigner.Generator.Generated Generated


Returns Consultingwerk.BusinessEntityDesigner.Generator.Generated
Top

LOGICAL OpenFilesInIDE


Returns LOGICAL
Top

LOGICAL SilentMode


Returns LOGICAL
Top

LOGICAL SilentModeUpdateDataAccess


Returns LOGICAL
Top

CHARACTER SuffixBusinessEntity


Returns CHARACTER
Top

CHARACTER SuffixDataAccess


Returns CHARACTER
Top

CHARACTER SuffixDatasetController


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:

Temp-Table ttStaleGeneratedFile

Defined in:


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       24.08.2026 05:56:08