コード例 #1
0
        public virtual IList <Column> listPropertyColumns(PersistentClass paramPersistentClass)
        {
            List <object> arrayList = new List <object>();

            System.Collections.IEnumerator iterator1 = paramPersistentClass.Identifier.ColumnIterator;
            //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
            if (iterator1.hasNext())
            {
                //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                Column column = (Column)iterator1.next();
                arrayList.Add(column);
            }
            System.Collections.IEnumerator iterator2 = paramPersistentClass.PropertyIterator;
            while (iterator2.MoveNext())
            {
                Property property = (Property)iterator2.Current;
                if (!isInsertable(property))
                {
                    continue;
                }
                iterator1 = property.ColumnIterator;
                //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                if (iterator1.hasNext())
                {
                    //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                    Column column = (Column)iterator1.next();
                    arrayList.Add(column);
                }
            }
            return(arrayList);
        }
コード例 #2
0
        public static ProjectInfoTable findProjectInfoFromUrl(ProjectUrlTable paramProjectUrlTable)
        {
            Query query = DatabaseDBUtil.currentSession().createQuery("select prjInfo from ProjectInfoTable as prjInfo join prjInfo.urlSet as urlTable with urlTable.projectUrlId = :urlid");

            query.setLong("urlid", paramProjectUrlTable.ProjectUrlId.Value);
            System.Collections.IEnumerator iterator = query.iterate();
            //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
            if (!iterator.hasNext())
            {
                DatabaseDBUtil.closeSession();
                return(null);
            }
            //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
            ProjectInfoTable projectInfoTable = (ProjectInfoTable)DatabaseDBUtil.currentSession().load(typeof(ProjectInfoTable), ((ProjectInfoTable)iterator.next()).Id);

            projectInfoTable = projectInfoTable.copyWithAssignments();
            DatabaseDBUtil.closeSession();
            return(projectInfoTable);
        }
コード例 #3
0
ファイル: BCISApi.cs プロジェクト: radtek/CostOSInTheCloud
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        //ORIGINAL LINE: private java.net.URL constructURL(String paramString, java.util.Map<String, String> paramMap) throws Exception
        private URL constructURL(string paramString, IDictionary <string, string> paramMap)
        {
            if (paramMap == null || paramMap.Count == 0)
            {
                return(new URL(this.apiBaseUrl + "/" + paramString));
            }
            StringBuilder stringBuffer = new StringBuilder();

            System.Collections.IEnumerator iterator = paramMap.Keys.GetEnumerator();
            while (iterator.MoveNext())
            {
                string str = (string)iterator.Current;
                stringBuffer.Append(str).Append("=").Append(URLEncoder.encode((string)paramMap[str], "UTF-8"));
                //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                if (iterator.hasNext())
                {
                    stringBuffer.Append("&");
                }
            }
            return(new URL(this.apiBaseUrl + "/" + paramString + "?" + stringBuffer.ToString()));
        }
コード例 #4
0
        public virtual IList <Property> listProperties(PersistentClass paramPersistentClass)
        {
            List <object> arrayList = new List <object>();
            Property      property  = new PropertyAnonymousInnerClass(this);

            arrayList.Add(property);
            System.Collections.IEnumerator iterator = paramPersistentClass.PropertyIterator;
            while (iterator.MoveNext())
            {
                Property property1 = (Property)iterator.Current;
                if (!isInsertable(property1))
                {
                    continue;
                }
                System.Collections.IEnumerator iterator1 = property1.ColumnIterator;
                //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                if (iterator1.hasNext())
                {
                    arrayList.Add(property1);
                }
            }
            return(arrayList);
        }