コード例 #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);
        }