zoukankan      html  css  js  c++  java
  • Hibernate 3中如何获得库表所有字段的名称

    15问:Hibernate 3中如何获得库表所有字段的名称

    答:可以使用以下的程序获得。

    Configuration conf = new Configuration();

                         conf.configure();

                         Iterator iter =  conf.getTableMappings();

                    

                         while ( iter.hasNext() ) {

                                     Table table = ( Table ) iter.next();

                           

                                     System.out.println(table.getName());

                                     Iterator ics = table.getColumnIterator();

                                     while (ics.hasNext()){

                                                Column col = (Column) ics.next();

                                                System.out.println(col.getName());

                                     }

                        }

  • 相关阅读:
    install sklearn-crfsuite on mac
    排序算法之选择排序
    排序算法之冒泡排序
    Python中__init__与self的解释
    Python中 if __name__ == "__main__"解释
    Python活力练习Day25
    Python活力练习Day24
    Python活力练习Day23
    动态规划之编辑距离
    Python活力练习Day22
  • 原文地址:https://www.cnblogs.com/duyinqiang/p/5203275.html
Copyright © 2011-2022 走看看