2.4.2 Set
Set和Map类似,但是Set没有index。
(1) element
(2) one-to-many
(3) many-to-many
(4) composite-element
(5) many-to-any
(6) Set的排序
利用sort时,需要使用比较器。
(7) Set的子元素和属性
2.4.3 List
List和Map类似,但是List的index是用来保存索引的,Map的index是保存key的。List的排序是索引排序,List不能像Map和Set那样排序。
(1) index和element
(2) one-to-many
(3) many-to-many
(4) composite-element
(5) many-to-any
(6) List的子元素和属性
2.4.4 Bag
Bag集合是没有顺序的,而且可能保存相同的数据。
(1) element
(2) one-to-many
(3) many-to-many
(4) composite-element
(5) many-to-any
(6) Bag的子元素和属性
2.4.5 idbag
类似于Bag,但是多了一个collection-id,利用这个元素,可以为集合数据的每一行都增加一个id,而且这个id不需要开发者去维护。
(1) element
(2) many-to-many
(3) composite-element
(4) many-to-any
(5) 排序
order-by
(6) idbag的子元素和属性
2.4.6 array
array是数组类型,利用array可以将数组型的属性映射到数据库,array的index是用来保存索引和List类似。
(1) index和element
(2) one-to-many
(3) many-to-many
(4) composite-element
(5) many-to-any
(6) array的子元素和属性
2.4.7 primitive-array
在实际应用中,比较常用的数组是Java的基本类型的数据数组,primitive-array被用于映射基本数据类型的数组。
(1) index和element
(2) primitive-array的子元素和属性