C# Class hoTools.Utils.SQL.SqlTemplates

Datei anzeigen Open project: Helmut-Ortmann/EnterpriseArchitect_hoTools Class Usage Examples

Public Methods

Method Description
GetTemplate ( SqlTemplateId templateId ) : SqlTemplate

Get TemplateText - TemplateString - Name - ToolTip

GetTemplateName ( SqlTemplateId templateId ) : string

Get TemplateText name or null according to templateID

GetTemplateText ( SqlTemplateId templateId ) : string

Get TemplateText (the template) or null according to templateID.

GetTooltip ( SqlTemplateId templateId ) : string

Get TemplateText Tool tip or null according to templateID

ReplaceMacro ( Repository rep, string sqlString, string searchTerm ) : string

Replace Macro and 'Search Term' by value. Possible Macros are: Search Term, ID, GUID, Package ID, Branch ID,... - convert all macros to lower case

Private Methods

Method Description
GetParentPackageIdFromContextElement ( Repository rep ) : int

Get containing Package ID from context element of Package, Element, Diagram, Attribute, Operation

MacroBranch ( Repository rep, string sql ) : string

Replace macro #Branch# and #InBranch# by IDs of selected packages, recursive nested.

MacroBranchConstant ( Repository rep, string sql ) : string

Replace macro '#Branch={...guid...}#' by ids of the package referenced by GUID. It selects all nested packages recursive. Usage: '#Branch={2BC1A31E-0F99-40CE-BE76-04E7DCEDDD87}#' is replaced by a comma separated list of the package and its recursive nested packages. Result: 6,28,5,20147

MacroBranchConstantPackage ( Repository rep, string sql ) : string

Replace macro #Branch={..guid..}# and #InBranch={..guid..}# by IDs of selected packages, recursive nested. It uses the package of the guid and not of the selected Package

MacroConnector ( Repository rep, string sql ) : string

Connector macros: ConnectorID and ConveyedItemIDS Note: If Element connector Replace macro #ConnectorID# by the ID of the selected connector. Replace macro #ConveyedItemIDS# by the IDs of conveyed Elements of the selected connector.

MacroPackageId ( Repository rep, string sql ) : string

Replace macro #PackageID# of the selected Diagram, Element, Package, Attribute, Operation by the ID of the containing Package.

MacroTreeSelected ( Repository rep, string sql ) : string

Replace macro #TreeSelectedGUIDS# by GUIDs of selected Items of Browser

deleteC_Comments ( string sql ) : string

Delete C-Comment

macroDiagramElements_IDS ( Repository rep, string sql ) : string

Replace macro #DiagramElements_IDS# by a comma separated list of all Element IDs in diagram. If no Element is in the diagram it return '0' for an empty list (not existing ID).

macroDiagramSelectedElements_IDS ( Repository rep, string sql ) : string

Replace macro #DiagramElements_IDS# by a comma separated list of all Element IDs in diagram. If no Element is in the diagram it return '0' for an empty list (not existing ID).

macroDiagram_ID ( Repository rep, string sql ) : string

Replace macro #Diagram_ID# by Diagram_Id of the current diagram or selected Diagram.

macroItem_GUID ( Repository rep, string sql ) : string

Replace macro #CurrentItemGUID# by the GUID of the currently selected Item. Alias: #CurrentElementGUID#

macroItem_ID ( Repository rep, string sql ) : string

Replace macro #CURRENT_ITEM_ID# by the ID of the currently selected Item. Because ID is ambiguous better use #CurrentItemGuid# Alias: #CurrentElementID#

Method Details

GetTemplate() public static method

Get TemplateText - TemplateString - Name - ToolTip
public static GetTemplate ( SqlTemplateId templateId ) : SqlTemplate
templateId SqlTemplateId
return SqlTemplate

GetTemplateName() public static method

Get TemplateText name or null according to templateID
public static GetTemplateName ( SqlTemplateId templateId ) : string
templateId SqlTemplateId
return string

GetTemplateText() public static method

Get TemplateText (the template) or null according to templateID.
public static GetTemplateText ( SqlTemplateId templateId ) : string
templateId SqlTemplateId
return string

GetTooltip() public static method

Get TemplateText Tool tip or null according to templateID
public static GetTooltip ( SqlTemplateId templateId ) : string
templateId SqlTemplateId
return string

ReplaceMacro() public static method

Replace Macro and 'Search Term' by value. Possible Macros are: Search Term, ID, GUID, Package ID, Branch ID,... - convert all macros to lower case
public static ReplaceMacro ( Repository rep, string sqlString, string searchTerm ) : string
rep Repository
sqlString string The complete SQL string
searchTerm string The Search Term from the text entry field
return string