<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    java學(xué)習(xí)

    java學(xué)習(xí)

     

    hibernate 中集合映射成表

    實體類是:

    public class CollectionMapping {
     
     private int id;
     
     private String name;
     
     private Set setValue;
     
     private List listValue;
     
     private String[] arrayValue;
     
     private Map mapValue;

     public int getId() {
      return id;
     }

     public void setId(int id) {
      this.id = id;
     }

     public String getName() {
      return name;
     }

     public void setName(String name) {
      this.name = name;
     }

     public Set getSetValue() {
      return setValue;
     }

     public void setSetValue(Set setValue) {
      this.setValue = setValue;
     }

     public List getListValue() {
      return listValue;
     }

     public void setListValue(List listValue) {
      this.listValue = listValue;
     }

     public String[] getArrayValue() {
      return arrayValue;
     }

     public void setArrayValue(String[] arrayValue) {
      this.arrayValue = arrayValue;
     }

     public Map getMapValue() {
      return mapValue;
     }

     public void setMapValue(Map mapValue) {
      this.mapValue = mapValue;
     }
    }

    在CollectionMapping.hbm.xml文件中:
    <hibernate-mapping>
     <class name="CollectionMapping" table="t_CollectionMapping">
      <id name="id">
       <generator class="native"/>
      </id>
      <property name="name"/>
      <set name="setValue" table="t_set_value">
       <key column="set_id"/>
       <element type="string" column="set_value"/>
      </set>
      <list name="listValue" table="t_list_value">
       <key column="list_id"/>
       <list-index column="list_index"/>
       <element type="string" column="list_value"/>
      </list>
      <array name="arrayValue" table="t_array_value">
       <key column="array_id"/>
       <list-index column="array_index"/>
       <element type="string" column="array_value"/>
      </array>
      <map name="mapValue" table="t_map_value">
       <key column="map_id"/>
       <map-key type="string" column="map_key"/>
       <element type="string" column="map_value"/>
      </map>
     </class>
    </hibernate-mapping>
    在數(shù)據(jù)庫中生成5個表

    posted on 2013-05-06 22:22 楊軍威 閱讀(186) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     

    導(dǎo)航

    統(tǒng)計

    常用鏈接

    留言簿

    隨筆檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费观看无遮挡www的小视频| 性xxxx视频免费播放直播| 18禁免费无码无遮挡不卡网站| 久久青青成人亚洲精品| baoyu116.永久免费视频| 国产亚洲3p无码一区二区| a级日本高清免费看| 亚洲国产精品第一区二区 | 黄色毛片免费在线观看| 宅男666在线永久免费观看| 国产成人综合亚洲一区| 亚洲AV永久无码精品一区二区国产 | 久久永久免费人妻精品下载| 亚洲综合国产精品| 久久久久久久91精品免费观看| 亚洲av乱码一区二区三区| 岛国大片免费在线观看| 美女被免费网站在线视频免费 | 两个人看的www高清免费视频| 亚洲色四在线视频观看| 在线a级毛片免费视频| 午夜亚洲乱码伦小说区69堂| 亚洲综合无码AV一区二区| 国产成人精品无码免费看| 亚洲国产高清在线精品一区 | 波霸在线精品视频免费观看| 亚洲AV无码乱码在线观看裸奔| 日本片免费观看一区二区| 亚洲AV成人精品日韩一区 | 91亚洲国产成人久久精品网站| 91香蕉视频免费| 又硬又粗又长又爽免费看| 亚洲AV无码AV男人的天堂| 大学生高清一级毛片免费| xxxx日本在线播放免费不卡| 久久亚洲私人国产精品| 免费中文字幕在线观看| 99视频免费播放| 另类图片亚洲校园小说区| 亚洲国产成人私人影院| 午夜国产羞羞视频免费网站|