Namespace: Consultingwerk.Studio.Refactor.Callgraph
Class 
DatabaseTriggerParser Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implements: Consultingwerk.Studio.Proparse.NodeWalker.INodeAction

File:DatabaseTriggerParser
Purpose:Implements the INodeAction interface to create records
for trigger procedures and calls to them
Author(s):Sebastian Wandel / Consultingwerk Ltd.
Created:Fri Nov 27 16:50:35 CET 2020



Top Method Summary
Options Name Purpose
- CallTrigger (JPNode, character, character) Creates a call to a trigger procedure
- CallTrigger (RecordNameNode, character) Creates a call to a trigger procedure
- CreateRoutines (character, character) Creates eRoutine and eProgram records for the needed trigger procedures
- CreateTriggerCall (JPNode, character, character) Creates the eCall record for a call to a trigger procedure
- org.prorefactor.nodetypes.RecordNameNode FindRecordNameNode (BlockNode, FieldRefNode) Helper method that searches a RecordNameNode for a FieldRefNode
- org.prorefactor.nodetypes.RecordNameNode FindRecordNameNode (JPNode) Helper method to find a record name node that is a direct child of the given node
- org.prorefactor.nodetypes.RecordNameNode FindRecordNameNode (JPNode, character) Helper method that searches a RecordNameNode with a given table name
- org.prorefactor.nodetypes.BlockNode GetBlockNode (JPNode) Returns the encompassing BlockNode for a given JPNode
- CHARACTER GetBufferName (JPNode) Returns the name of the referenced buffer
- CHARACTER GetDatabaseName (JPNode) Returns the name of the referenced database
- CHARACTER GetFieldName (FieldRefNode) Returns a FieldRefs field name
- CHARACTER GetFullTableName (JPNode) The full name of the table
- org.prorefactor.treeparser.Symbol GetSymbol (SymbolScope, character) Looks for a Symbol with a given name in a given SymbolScope
- CHARACTER GetTableName (JPNode) Returns the name of the table referenced by a given JPNode
- LOGICAL IsDatabaseReference (JPNode) Checks whether a given JPNode references a database table or field
- LOGICAL ProcessAssignNode (JPNode) Processes a JPNode of type ASSIGN
- LOGICAL ProcessBufferNode (JPNode) Processes a JPNode of type BUFFER
- LOGICAL ProcessCreateOrInsertNode (JPNode) Processes a JPNode of type CREATE or INSERT
- LOGICAL ProcessDatasourceNode (JPNode) Processes a JPNode of type DATASOURCE
- LOGICAL ProcessDeleteNode (JPNode) Processes a JPNode of type DELETE
- LOGICAL ProcessFindOrForNode (JPNode) Processes a JPNode of type FIND or FOR
+ LOGICAL ProcessNode (JPNode) Processes a JPNode
- LOGICAL ProcessTemptableNode (JPNode) Processes a JPNode of type TEMPTABLE
- LOGICAL ProcessUpdateNode (JPNode) Processes a JPNode of type UPDATE

Top Constructor Summary
Options Name Purpose
+ DatabaseTriggerParser (dataset, table) Constructor for the DatabaseTriggerParser class


Method Detail
Top

PRIVATE CallTrigger (JPNode, character, character)

Purpose: Creates a call to a trigger procedure
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode used to find the routine
pcTable CHARACTER
Name of the Table with the event
pcEvent CHARACTER
Name of the event
Top

PRIVATE CallTrigger (RecordNameNode, character)

Purpose: Creates a call to a trigger procedure
Notes:

Parameters:
poNode org.prorefactor.nodetypes.RecordNameNode
The RecordNameNode of the trigger keyword
pcEvent CHARACTER
Name of the event for the trigger
Top

PRIVATE CreateRoutines (character, character)

Purpose: Creates eRoutine and eProgram records for the needed trigger procedures
Notes:

Parameters:
pcTableName CHARACTER
Name of the table this trigger belongs to
pcEvent CHARACTER
The event for which the trigger is executed
Top

PRIVATE CreateTriggerCall (JPNode, character, character)

Purpose: Creates the eCall record for a call to a trigger procedure
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
JPNode used to find the routine
pcTable CHARACTER
Table that the trigger belongs to
pcEvent CHARACTER
Name of the event for the trigger
Top

PRIVATE org.prorefactor.nodetypes.RecordNameNode FindRecordNameNode (BlockNode, FieldRefNode)

Purpose: Helper method that searches a RecordNameNode for a FieldRefNode
Notes:

Parameters:
poBlockNode org.prorefactor.nodetypes.BlockNode
The Block in which to search for the RecordNameNode
poFieldRefNode org.prorefactor.nodetypes.FieldRefNode
The field for hich a RecordNameNode is sought
Returns org.prorefactor.nodetypes.RecordNameNode
A RecordNameNode of poFieldRefNode in poBlockNode
Top

PRIVATE org.prorefactor.nodetypes.RecordNameNode FindRecordNameNode (JPNode)

Purpose: Helper method to find a record name node that is a direct child of the given node
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The node to start the search from
Returns org.prorefactor.nodetypes.RecordNameNode
The RecordNameNode found as child of poNode
Top

PRIVATE org.prorefactor.nodetypes.RecordNameNode FindRecordNameNode (JPNode, character)

Purpose: Helper method that searches a RecordNameNode with a given table name
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The node from which to start the search
pcTableName CHARACTER
Name of the table
Returns org.prorefactor.nodetypes.RecordNameNode
RecordNameNode of pcTableName
Top

PRIVATE org.prorefactor.nodetypes.BlockNode GetBlockNode (JPNode)

Purpose: Returns the encompassing BlockNode for a given JPNode
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
Node whose BlockNode is sought
Returns org.prorefactor.nodetypes.BlockNode
The BlockNode containing poNode
Top

PRIVATE CHARACTER GetBufferName (JPNode)

Purpose: Returns the name of the referenced buffer
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
JPNode referencing a buffer
Returns CHARACTER
The name of the referenced buffer
Top

PRIVATE CHARACTER GetDatabaseName (JPNode)

Purpose: Returns the name of the referenced database
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode referenceing a database
Returns CHARACTER
The name of the referenced database
Top

PRIVATE CHARACTER GetFieldName (FieldRefNode)

Purpose: Returns a FieldRefs field name
Notes:

Parameters:
poNode org.prorefactor.nodetypes.FieldRefNode
The FieldRefNode whose referenced fields name is sought
Returns CHARACTER
Name of the field referenced by poNode
Top

PRIVATE CHARACTER GetFullTableName (JPNode)

Purpose: The full name of the table
Notes: Includes the database name if available

Parameters:
poNode org.prorefactor.core.JPNode
JPNode whose tables name is sougth
Returns CHARACTER
The full name of the table referenced by JPNode
Top

PRIVATE org.prorefactor.treeparser.Symbol GetSymbol (SymbolScope, character)

Purpose: Looks for a Symbol with a given name in a given SymbolScope
Notes:

Parameters:
poScope org.prorefactor.treeparser.SymbolScope
The SymboloScope to search in
pcSymbolName CHARACTER
The name of the sought symbol
Returns org.prorefactor.treeparser.Symbol
The Symbol with name pcSymbolName if it exists in poScope
Top

PRIVATE CHARACTER GetTableName (JPNode)

Purpose: Returns the name of the table referenced by a given JPNode
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode whose referenced tables name is sought
Returns CHARACTER
Name of the table referenced by poNode
Top

PRIVATE LOGICAL IsDatabaseReference (JPNode)

Purpose: Checks whether a given JPNode references a database table or field
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to check
Returns LOGICAL
True if poNode references a database
Top

PRIVATE LOGICAL ProcessAssignNode (JPNode)

Purpose: Processes a JPNode of type ASSIGN
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to process
Returns LOGICAL
Logical value indicating if the process should be cancelled
Top

PRIVATE LOGICAL ProcessBufferNode (JPNode)

Purpose: Processes a JPNode of type BUFFER
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to process
Returns LOGICAL
Logical value indicating if the process should be cancelled
Top

PRIVATE LOGICAL ProcessCreateOrInsertNode (JPNode)

Purpose: Processes a JPNode of type CREATE or INSERT
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to process
Returns LOGICAL
Logical value indicating if the process should be cancelled
Top

PRIVATE LOGICAL ProcessDatasourceNode (JPNode)

Purpose: Processes a JPNode of type DATASOURCE
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to process
Returns LOGICAL
Logical value indicating if the process should be cancelled
Top

PRIVATE LOGICAL ProcessDeleteNode (JPNode)

Purpose: Processes a JPNode of type DELETE
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to process
Returns LOGICAL
Logical value indicating if the process should be cancelled
Top

PRIVATE LOGICAL ProcessFindOrForNode (JPNode)

Purpose: Processes a JPNode of type FIND or FOR
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to process
Returns LOGICAL
Logical value indicating if the process should be cancelled
Top

PUBLIC LOGICAL ProcessNode (JPNode)

Purpose: Processes a JPNode
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to process
Returns LOGICAL
Logical value indicating if the process should be cancelled
Top

PRIVATE LOGICAL ProcessTemptableNode (JPNode)

Purpose: Processes a JPNode of type TEMPTABLE
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to process
Returns LOGICAL
Logical value indicating if the process should be cancelled
Top

PRIVATE LOGICAL ProcessUpdateNode (JPNode)

Purpose: Processes a JPNode of type UPDATE
Notes:

Parameters:
poNode org.prorefactor.core.JPNode
The JPNode to process
Returns LOGICAL
Logical value indicating if the process should be cancelled


Constructor Detail
Top

PUBLIC DatabaseTriggerParser (dataset, table)

Purpose: Constructor for the DatabaseTriggerParser class
Notes:

Parameters:
dsCallgraph DATASET dsCallgraph
The Callgraph to bind to
ttTriggerProcedures TEMP-TABLE ttTriggerProcedures
The trigger procedures to bind to


ProDataset Detail

ProDataset dsCallgraph

Member tables: eProgram, eRoutine, eBlock, eCall


Temp-Table Detail

Temp-Table eBlock

Defined in:

Temp-Table eCall

Defined in:

Temp-Table eProgram

Defined in:

Temp-Table eRoutine

Defined in:

Temp-Table ttTriggerProcedures

Defined in:


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.12.2024 13:23:13