public List <Row> GetGuidsByAlias(String aliasSearch) { List <EA.Element> elements = new List <EA.Element>(); String strResult = eaRepository.SQLQuery( String.Format( "SELECT ea_guid, alias FROM t_object WHERE Alias LIKE '{0}'", aliasSearch)); List <Row> rows = EAGuid.Deserialise(strResult); return(rows); }
public EA.Element GetElementByName(int packageID, string elementName, string stereoType) { EA.Element element = null; String strResult = eaRepository.SQLQuery( String.Format( "SELECT ea_guid FROM t_object WHERE Package_ID = {0} AND UPPER(Name) = UPPER('{1}') AND UPPER(StereoType) = UPPER('{2}')", packageID, elementName, SafeStereoType(stereoType))); List <Row> rows = EAGuid.Deserialise(strResult); if (rows.Count > 0) { element = eaRepository.GetElementByGuid(rows[0].Ea_guid); } return(element); }
public EA.Element GetElementByAlias(string alias) { EA.Element element = null; String strResult = eaRepository.SQLQuery( String.Format( "SELECT ea_guid FROM t_object WHERE UPPER(Alias) = UPPER('{0}')", alias)); List <Row> rows = EAGuid.Deserialise(strResult); if (rows.Count > 0) { element = eaRepository.GetElementByGuid(rows[0].Ea_guid); } return(element); }
public List <EA.Package> GetPackagessInPackage(int packageID) { List <EA.Package> elements = new List <EA.Package>(); String strResult = eaRepository.SQLQuery( String.Format( "SELECT ea_guid FROM t_object t_package WHERE Parent_ID = {0}", packageID)); List <Row> rows = EAGuid.Deserialise(strResult); EA.Package rootPackage = eaRepository.GetPackageByID(packageID); foreach (Row row in rows) { EA.Package eaElement = eaRepository.GetPackageByGuid(row.Ea_guid); elements.Add(eaElement); } return(elements); }
public List <EA.Element> GetElementsInPackage(int packageID, string stereoType) { List <EA.Element> elements = new List <EA.Element>(); String strResult = eaRepository.SQLQuery( String.Format( "SELECT ea_guid FROM t_object WHERE Package_ID = {0} AND StereoType = UPPER('{1}')", packageID, SafeStereoType(stereoType))); List <Row> rows = EAGuid.Deserialise(strResult); EA.Package rootPackage = eaRepository.GetPackageByID(packageID); foreach (Row row in rows) { EA.Element eaElement = eaRepository.GetElementByGuid(row.Ea_guid); elements.Add(eaElement); } return(elements); }