- 浏览: 248735 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
July01:
推荐用StratoIO打印控件,浏览器和系统的兼容性都很好,而 ...
B/S结构下套打票据实现 - Lodop打印组件 -
iTarget:
原原文::http://blog.csdn.net/steve ...
加减乘除的问题 - BigDecimal -
iTarget:
原文:http://blog.csdn.net/gqm1982 ...
加减乘除的问题 - BigDecimal -
iTarget:
在Java中,要想实现精确计算,解决方案是使用BigDecim ...
加减乘除的问题 - BigDecimal -
叶寒_:
...
JSP简单标签
<!-- [if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--> <!-- [if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->
<!-- [if !supportLists]-->节 1.01 <!-- [endif]-->映射 Set
<!-- [if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style="width:197.25pt; height:192pt" mce_style="width:197.25pt; height:192pt"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image001.png" mce_src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image001.png" o:title="1"/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
<!-- [if !supportLists]-->1、 <!-- [endif]-->为了隐藏 ITEM_IMAGE 为一个单独表,故在数据库设计中将 ITEM_IMAGE 的主键和外键设定都设定为 ITEM_ID, 在 Hibernate 配置文件中用 set 集合的形式加以隐藏。
<!-- [if !supportLists]-->2、 <!-- [endif]-->引文 Set 集合无法包含重复元素,因此在 ITEM_IMAGE 表中使用复合主键。
不可重复的元素,顺序无法保存
private Set images = new HashSet ();
< set name = "images" table = "ITEM_IMAGE" >
< key column = "ITEM_ID" />
< element type = "string" column = "FILENAME" not-null = "true" />
</ set >
<!-- [if !supportLists]-->节 1.02 <!-- [endif]-->映射 Bag
可重复的元素,不保存元素顺序
<!-- [if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style="width:197.25pt;height:192pt" mce_style="width:197.25pt;height:192pt"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image001.png" mce_src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image001.png" o:title="1"/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
private Collection images = new ArrayList ();
< idbag name = "images" table = "ITEM_IMAGE" >
< collection-id type = "long" column = "ITEM_IMAGE_ID" >
< generator class = "sequence" />
</ collection-id >
< key column = "ITEM_ID" />
< element type = "string" column = "FILENAME" not-null = "true" />
</ idbag >
<!-- [if !supportLists]-->节 1.03 <!-- [endif]-->映射 List
可重复的元素,顺序可以保存
<!-- [if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" style="width:208.5pt;height:199.5pt" mce_style="width:208.5pt;height:199.5pt"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image003.png" mce_src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image003.png" o:title="1"/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
<!-- [if !supportLists]-->1、 <!-- [endif]-->添加 POSITION 列目的是用于保存存储数据的顺序。
<!-- [if !supportLists]-->2、 <!-- [endif]-->表的主键为 ITEM_ID 和 POSITION 的复合主键。
private List images = new ArrayList();
< list name = "images" table = "ITEM_IMAGE" >
< key column = "ITEM_ID" />
< list-index column = "POSITION" />
< element type = "string" column = "FILENAME" not-null = "true" />
</ list >
<!-- [if !supportLists]-->节 1.04 <!-- [endif]-->映射 Map
保存键 / 值对数据 , 顺序不可保存,为无序状态
<!-- [if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style="width:235.5pt;height:224.25pt" mce_style="width:235.5pt;height:224.25pt"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image005.png" mce_src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image005.png" o:title="1"/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
1 、将 ITEM_ID 和 IMAGENAME 设定为双主键。
private Map images = new HashMap ();
< map name = "images" table = "ITEM_IMAGE" >
< key column = "ITEM_ID" />
< map-key type = "string" column = "IMAGENAME" />
< element type = "string" column = "FILENAME" not-null = "true" />
</ map >
<!-- [if !supportLists]-->节 1.05 <!-- [endif]-->排序集合 Sorted Collection
<!-- [if !supportLists]-->(a) <!-- [endif]-->排序 Set
<!-- [if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" style="width:197.25pt;height:192pt" mce_style="width:197.25pt;height:192pt"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image001.png" mce_src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image001.png" o:title="1"/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
Set images = new TreeSet ();
< set name = "images" table = "ITEM_IMAGE" sort = "natural" >
< key column = "ITEM_ID" />
< element type = "string" column = "FILENAME" not-null = "true" />
</ set >
<!-- [if !supportLists]-->(b) <!-- [endif]-->排序 Map
<!-- [if gte vml 1]><v:shape id="_x0000_i1031" type="#_x0000_t75" style="width:235.5pt;height:224.25pt" mce_style="width:235.5pt;height:224.25pt"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image005.png" mce_src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image005.png" o:title="1"/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
private SortedMap images = new TreeMap ();
< map name = "images" table = "ITEM_IMAGE" sort = "natural" >
< key column = "ITEM_ID" />
< map-key type = "string" column = "IMAGENAME" />
< element type = "string" column = "FILENAME" not-null = "true" />
</ map >
<!-- [if !supportLists]-->节 1.06 <!-- [endif]-->有序集合 Ordered Collection
<!-- [if !supportLists]-->(a) <!-- [endif]-->有序 Set
<!-- [if gte vml 1]><v:shape id="_x0000_i1032" type="#_x0000_t75" style="width:197.25pt;height:192pt" mce_style="width:197.25pt;height:192pt"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image001.png" mce_src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image001.png" o:title="1"/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
private Set images = new LinkedHashSet ();
< set name = "images" table = "ITEM_IMAGE" order-by = "ITEM_ID" >
< key column = "ITEM_ID" />
< element type = "string" column = "FILENAME" not-null = "true" />
</ set >
<!-- [if !supportLists]-->(b) <!-- [endif]-->有序 Map
<!-- [if gte vml 1]><v:shape id="_x0000_i1030" type="#_x0000_t75" style="width:235.5pt;height:224.25pt" mce_style="width:235.5pt;height:224.25pt"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image005.png" mce_src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\02\clip_image005.png" o:title="1"/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
private Map images = new LinkedHashMap ();
< map name = "images" table = "ITEM_IMAGE" order-by = "IMAGENAME asc" >
< key column = "ITEM_ID" />
< map-key type = "string" column = "IMAGENAME" />
< element type = "string" column = "FILENAME" not-null = "true" />
</ map >
发表评论
-
HIbernate 缓存
2009-04-02 16:48 1422节 13.01 缓存类型 1、 事务范围缓存:添 ... -
Hibernate QBC语言
2009-03-27 15:14 4801节 8.01 基本查询 以 ... -
Hibernate HQL语言
2009-03-26 16:01 8376HQL查询 节 10.01 单表HQL查询 FROM C ... -
Hibernate 查询策略
2009-03-26 13:33 3423第 I 条 -
HIbernate 大批量数据处理
2009-03-25 17:11 2821节 1.01 -
Hibernate乐观锁控制
2009-03-24 17:00 10581、 -
Hibernate控制事务并发访问
2009-03-24 16:28 1568(a) -
Hibernate的Java SE事务
2009-03-24 15:26 10671、在Hibernate的配置文件中添加以下内容: < ... -
Hibernate 一对一延迟加载
2009-03-24 14:38 1717当主外键为同一字段时可以使用一对一的延迟加载 ... -
Hibernate的继承策略
2009-03-23 17:15 1454... -
Hibernate持久化上下文
2009-03-23 17:10 1232持久化上下文作用 : -
Hibernate托管对象
2009-03-23 16:41 30391、 -
Hibernate 一对多关联
2007-08-14 14:44 1138java 代码 CREATE TABLE PERS ... -
HibernateSessionFactory 工具类
2007-07-31 17:37 6868java 代码 public class ... -
Hibernate 多对多关联
2007-07-31 17:36 1452xml 代码 CREATE TABLE GROUP ... -
Hibernate 一对一关联
2007-07-31 17:34 1093xml 代码 CREATE TABLE CUST ... -
Hibernate 一对一关联 (多对一的曲线实现)
2007-07-31 17:32 1578xml 代码 CREATE TABLE AUTHO ... -
Hibernate 多对一关联
2007-07-31 17:30 1222xml 代码 CREATE TABLE CUST ...
相关推荐
student与Score的Map集合关系 student与class的多对一 一对多映射
hibernate集合映射inverse和cascade详解.txt
NULL 博文链接:https://wintys.iteye.com/blog/426022
介绍的很详细,个人觉得不错!!!
hibernate集合的映射 集合的映射 set list array map
适合初学者了解在hibernate中配置set,list,map,bag等集合映射
NULL 博文链接:https://lijunabc.iteye.com/blog/443381
Hibernate映射集合属性List,用于映射集合属性 List Hibernate 自动生成表 不需sql
NULL 博文链接:https://lijunabc.iteye.com/blog/443278
Hibernate常见集合映射(Set,List_Array,Map,Bag)
JAVA培训-HIBERNATE的集合映射.doc
Hibernate关系映射 Hibernate主键策略与属性 Hibernate集合映射
NULL 博文链接:https://lijunabc.iteye.com/blog/443353
hibernate中的集合映射,各种集合类型的使用方法及适用场景
NULL 博文链接:https://lijunabc.iteye.com/blog/443305
第12章 基于annotation注解技术的ssh 2整合开发 12.1 初识annotation522 12.2 亲身体验annotation的威力524 ...12.4.12 hibernate集合映射的annotation注解实现552 12.5 基于annotation的ssh 2整合开发554 12.6 小结563
2,建立表的hibernate支持,生成tb_user类和对应的配置文件 3,修改配置文件使之和相应的类对应, 4,修改tb_user类,创建一个set类型的字段emailes,生成它的set和get方法 5,写测试类,对以上内容进行测试。 二、...