C# 클래스 EAAddinFramework.Utils.Model

파일 보기 프로젝트 열기: Helmut-Ortmann/EnterpriseArchitect_hoTools 1 사용 예제들

공개 메소드들

메소드 설명
ClipboardClear ( ) : void

Expose Clipboard.Clear()

ClipboardGetText ( ) : string

Expose Clipboard.SetText()

ClipboardGetText ( int textDataType ) : string

Exposes ClipboardGetText(TestDataFormat); 0=TextDataFormat.CommaSeparatedValue; 1=TextDataFormat.Html; 2=TextDataFormat.Rtf; 3=TextDataFormat.Text; 4=TextDataFormat.UnicodeText;

ClipboardSetText ( object text ) : void

Expose Clipboard.SetText()

ClipboardSetText ( object text, object textDataType ) : void

Exposes ClipboardSetText(text, TestDataFormat); 0=TextDataFormat.CommaSeparatedValue; 1=TextDataFormat.Html; 2=TextDataFormat.Rtf; 3=TextDataFormat.Text; 4=TextDataFormat.UnicodeText;

EscapeSqlString ( string sqlString ) : string

escapes a literal string so it can be inserted using sql

ExecuteSql ( string sqlString ) : bool

Execute SQL and catch Exception

FormatXPath ( string xpath ) : string

formats an xpath according to the type of database. For Oracle and Firebird it should be ALL CAPS

GetRepositoryType ( ) : RepositoryType

Gets the rep type for this model

Initialize ( EA rep ) : void

Initialize an rep Model object Intended to use from a scripting environment

MakeEaItemListFromQuery ( System.Xml.Linq.XDocument x ) : List

Make EA XML output format from EA SQLQuery XDocument format (LINQ to XML)

MakeEaXmlOutput ( System.Xml.Linq.XDocument x ) : string

Make EA XML output format from EA SQLQuery XDocument format (LINQ to XML). If nothing found or an error has occurred nothing is displayed.

MakeEaXmlOutput ( string x ) : string

Make EA XML output format from EA SQLQuery format (string)

Model ( ) : System

Create a model on the first running EA instance

Model ( EA repository ) : System

Create a Model

SearchRun ( string searchName, string searchTerm ) : void

Runs the search (EA search or hoTools SQL file if it's a *.sql file). It handles the exceptions. It converts wild cards of the <Search Term>.

SqlExecuteNative ( string sqlExecute ) : bool

EA Execute SQL: - formatSQL - runSQL - return SQL string

SqlExecuteWithException ( string sql ) : bool

Run EA SQL Query with Exception handling return null if error, it also displays the error message in MessageBox return "" if nothing found return xml string if ok

SqlQuery ( string sqlQuery ) : XmlDocument

EA SQL Query with: - formatSQL - runSQL - return SQL string as XmlDocument

SqlQueryNative ( string sqlQuery ) : string

EA SQL Query native with: - formatSQL - runSQL - return SQL string

SqlQueryWithException ( string query ) : string

Run EA SQL Query with Exception handling. It deletes the error file and reads it back to detect errors. return null if error, it also displays the error message in MessageBox return "" if nothing found return xml string if ok

SqlRun ( string sql, string searchText ) : void

Run an SQL string and if query output the result in EA Search Window. If update, insert, delete execute SQL. - replacement of macros - run query - format to output

비공개 메소드들

메소드 설명
EmptyQueryResult ( ) : string

Empty Query Result

FormatSql ( string sqlQuery ) : string

sets the correct wild cards depending on the database type. changes '%' into '*' if on ms access and _ into ? on msAccess

FormatSqlFunctions ( string sqlQuery ) : string

Operation to translate SQL functions in there equivalents in different sql syntaxes supported functions: - lcase -> lower in T-SQL (SqlSvr and Asa)

FormatSqlTop ( string sqlQuery ) : string

limiting the number of results in an sql query is different on different platforms.

This operation will replace the SELECT TOP N by the appropriate sql syntax depending on the repository type

FormatSqldBspecific ( string sql ) : string

Format DB specific by removing unnecessary DB specific string parts.

ReplaceSqlWildCards ( string sqlQuery ) : string

Replace the wild cards in the given sql query string to match either MSAccess or ANSI syntax. It works for: % or * or #WC# Any character _ or ? a single character '^' or '!' a shortcut for XOR

메소드 상세

ClipboardClear() 공개 메소드

Expose Clipboard.Clear()
public ClipboardClear ( ) : void
리턴 void

ClipboardGetText() 공개 메소드

Expose Clipboard.SetText()
public ClipboardGetText ( ) : string
리턴 string

ClipboardGetText() 공개 메소드

Exposes ClipboardGetText(TestDataFormat); 0=TextDataFormat.CommaSeparatedValue; 1=TextDataFormat.Html; 2=TextDataFormat.Rtf; 3=TextDataFormat.Text; 4=TextDataFormat.UnicodeText;
public ClipboardGetText ( int textDataType ) : string
textDataType int
리턴 string

ClipboardSetText() 공개 메소드

Expose Clipboard.SetText()
public ClipboardSetText ( object text ) : void
text object
리턴 void

ClipboardSetText() 공개 메소드

Exposes ClipboardSetText(text, TestDataFormat); 0=TextDataFormat.CommaSeparatedValue; 1=TextDataFormat.Html; 2=TextDataFormat.Rtf; 3=TextDataFormat.Text; 4=TextDataFormat.UnicodeText;
public ClipboardSetText ( object text, object textDataType ) : void
text object
textDataType object
리턴 void

EscapeSqlString() 공개 메소드

escapes a literal string so it can be inserted using sql
public EscapeSqlString ( string sqlString ) : string
sqlString string the string to be escaped
리턴 string

ExecuteSql() 공개 메소드

Execute SQL and catch Exception
public ExecuteSql ( string sqlString ) : bool
sqlString string
리턴 bool

FormatXPath() 공개 메소드

formats an xpath according to the type of database. For Oracle and Firebird it should be ALL CAPS
public FormatXPath ( string xpath ) : string
xpath string the xpath to format
리턴 string

GetRepositoryType() 공개 메소드

Gets the rep type for this model
public GetRepositoryType ( ) : RepositoryType
리턴 RepositoryType

Initialize() 공개 메소드

Initialize an rep Model object Intended to use from a scripting environment
public Initialize ( EA rep ) : void
rep EA
리턴 void

MakeEaItemListFromQuery() 공개 메소드

Make EA XML output format from EA SQLQuery XDocument format (LINQ to XML)
public MakeEaItemListFromQuery ( System.Xml.Linq.XDocument x ) : List
x System.Xml.Linq.XDocument Output from EA SQLQuery
리턴 List

MakeEaXmlOutput() 공개 메소드

Make EA XML output format from EA SQLQuery XDocument format (LINQ to XML). If nothing found or an error has occurred nothing is displayed.
public MakeEaXmlOutput ( System.Xml.Linq.XDocument x ) : string
x System.Xml.Linq.XDocument Output from EA SQLQuery
리턴 string

MakeEaXmlOutput() 공개 메소드

Make EA XML output format from EA SQLQuery format (string)
public MakeEaXmlOutput ( string x ) : string
x string
리턴 string

Model() 공개 메소드

Create a model on the first running EA instance
public Model ( ) : System
리턴 System

Model() 공개 메소드

Create a Model
public Model ( EA repository ) : System
repository EA
리턴 System

SearchRun() 공개 메소드

Runs the search (EA search or hoTools SQL file if it's a *.sql file). It handles the exceptions. It converts wild cards of the <Search Term>.
public SearchRun ( string searchName, string searchTerm ) : void
searchName string EA Search name or SQL file name (uses path to find absolute path)
searchTerm string
리턴 void

SqlExecuteNative() 공개 메소드

EA Execute SQL: - formatSQL - runSQL - return SQL string
public SqlExecuteNative ( string sqlExecute ) : bool
sqlExecute string
리턴 bool

SqlExecuteWithException() 공개 메소드

Run EA SQL Query with Exception handling return null if error, it also displays the error message in MessageBox return "" if nothing found return xml string if ok
public SqlExecuteWithException ( string sql ) : bool
sql string
리턴 bool

SqlQuery() 공개 메소드

EA SQL Query with: - formatSQL - runSQL - return SQL string as XmlDocument
public SqlQuery ( string sqlQuery ) : XmlDocument
sqlQuery string
리턴 System.Xml.XmlDocument

SqlQueryNative() 공개 메소드

EA SQL Query native with: - formatSQL - runSQL - return SQL string
public SqlQueryNative ( string sqlQuery ) : string
sqlQuery string
리턴 string

SqlQueryWithException() 공개 메소드

Run EA SQL Query with Exception handling. It deletes the error file and reads it back to detect errors. return null if error, it also displays the error message in MessageBox return "" if nothing found return xml string if ok
public SqlQueryWithException ( string query ) : string
query string
리턴 string

SqlRun() 공개 메소드

Run an SQL string and if query output the result in EA Search Window. If update, insert, delete execute SQL. - replacement of macros - run query - format to output
public SqlRun ( string sql, string searchText ) : void
sql string
searchText string Search Text to replace 'Search Term' macro
리턴 void