1.集合映射:Object,hbm
来源:互联网 发布:冒险岛资源提取器源码 编辑:程序博客网 时间:2024/05/05 20:25
package com.bjpowernode.hibernate;import java.util.ArrayList;import java.util.HashSet;import java.util.List;import java.util.Map;import java.util.Set;@SuppressWarnings("rawtypes")public class CollectionMapping {private int id;private String name;private Set setValues = new HashSet();private List listValues = new ArrayList();private String[] arrayValues;private Map mapValues;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 getSetValues() {return setValues;}public void setSetValues(Set setValues) {this.setValues = setValues;}public List getListValues() {return listValues;}public void setListValues(List listValues) {this.listValues = listValues;}public String[] getArrayValues() {return arrayValues;}public void setArrayValues(String[] arrayValues) {this.arrayValues = arrayValues;}public Map getMapValues() {return mapValues;}public void setMapValues(Map mapValues) {this.mapValues = mapValues;}}
<?xml version="1.0"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"><hibernate-mapping><class name="com.bjpowernode.hibernate.CollectionMapping" table="t_collection_mapping"><id name="id"><generator class="native"/></id><property name="name"/><set name="setValues" table="t_set_values"><key column="set_id"/><element type="string" column="set_value" not-null="true"/><!-- <composite-element class=""></composite-element> --></set><list name="listValues" table="t_list_values"><key column="list_id"/><list-index column="list_index"/><element type="string" column="list_value"/></list><array name="arrayValues" table="t_array_values"> <key column="array_id"/> <list-index column="array_index"/> <element type="string" column="array_value"/></array><map name="mapValues" table="t_map_values"><key column="map_id"/><map-key type="string" column="map_key"/><element type="string" column="map_value"/></map></class></hibernate-mapping>
- 1.集合映射:Object,hbm
- 1.Component映射:Object,hbm
- 1.LazyForClass Object,hbm
- 1.LazyForCollection Object,hbm
- 1.LazyForSingleEnd Object,hbm
- 1.复合主键:Object,hbm
- 1.每颗继承树三张表:Object,hbm
- 1.每颗继承数两张表:Object,hbm
- 1.每颗继承树两张表:Object,hbm
- 1.hql简单属性查询:Object,hbm
- 1.hql查询实体:Object,hbm
- 1.hql条件查询:Object,hbm
- hibernate hbm映射
- *.hbm.xml 映射配置文件
- 1.一对多单向关联(班级对学生):Object,hbm
- 1.一对多双向关联(班级对学生):Object,hbm
- 1.每颗类继承树一张表:Object,hbm
- 利用Hbm映射文件开发
- Spring Aop 日志拦截器
- 打造小型Linux系統
- 以boost::function和boost:bind取代虚函数
- Linux下的Make与Makefile
- XSD 验证xml例子 --C#
- 1.集合映射:Object,hbm
- ubuntu交叉编译器
- 哪些年遇到过的Andriod问题(二)在新开页面中输入的值返回到原页面
- 2.集合映射:工具类
- flash制作按钮及效果相关代码
- PT2257音量控制IC
- c#控件
- 搭建Android NDK
- ADO.NET小结