1
+ using System ;
1
2
using System . Collections . Generic ;
2
3
using System . Xml ;
3
4
@@ -8,35 +9,51 @@ public class XmlClasslikeNodeSorter : BaseXmlNodeSorter
8
9
protected override IDictionary < string , SortValue > GetSorting ( )
9
10
{
10
11
return new Dictionary < string , SortValue >
11
- {
12
- { "cache" , new SortValue { Position = First , Level = 1 } } ,
13
- { "tuplizer" , new SortValue { Position = First , Level = 1 } } ,
14
- { "key" , new SortValue { Position = First , Level = 1 } } ,
15
- { "id" , new SortValue { Position = First , Level = 2 } } ,
16
- { "composite-id" , new SortValue { Position = First , Level = 2 } } ,
17
- { "discriminator" , new SortValue { Position = First , Level = 3 } } ,
18
- { "version" , new SortValue { Position = First , Level = 4 } } ,
19
- { "component" , new SortValue { Position = Anywhere , Level = 1 } } ,
20
- { "dynamic-component" , new SortValue { Position = Anywhere , Level = 1 } } ,
21
- { "natural-id" , new SortValue { Position = Anywhere , Level = 1 } } ,
22
- { "one-to-one" , new SortValue { Position = Anywhere , Level = 2 } } ,
23
- { "parent" , new SortValue { Position = First , Level = 3 } } ,
24
- { "property" , new SortValue { Position = Anywhere , Level = 3 } } ,
25
- { "many-to-one" , new SortValue { Position = Anywhere , Level = 4 } } ,
26
- { "array" , new SortValue { Position = Anywhere , Level = 4 } } ,
27
- { "bag" , new SortValue { Position = Anywhere , Level = 4 } } ,
28
- { "set" , new SortValue { Position = Anywhere , Level = 4 } } ,
29
- { "map" , new SortValue { Position = Anywhere , Level = 4 } } ,
30
- { "list" , new SortValue { Position = Anywhere , Level = 4 } } ,
31
- { "joined-subclass" , new SortValue { Position = Anywhere , Level = 5 } } ,
32
- { "union-subclass" , new SortValue { Position = Anywhere , Level = 5 } } ,
33
- { "subclass" , new SortValue { Position = Last , Level = 3 } } ,
34
- { "join" , new SortValue { Position = Last , Level = 3 } } ,
35
- { "any" , new SortValue { Position = Anywhere , Level = 2 } } ,
36
- { "filter" , new SortValue { Position = Last , Level = 5 } } ,
37
- { "sql-insert" , new SortValue { Position = Last , Level = 5 } } ,
38
- { "sql-update" , new SortValue { Position = Last , Level = 5 } } ,
39
- { "sql-delete" , new SortValue { Position = Last , Level = 5 } } ,
12
+ {
13
+ // top section
14
+ { "meta" , new SortValue { DocumentSection = Top , RankWithinSection = 1 } } ,
15
+ { "subselect" , new SortValue { DocumentSection = Top , RankWithinSection = 2 } } ,
16
+ { "cache" , new SortValue { DocumentSection = Top , RankWithinSection = 3 } } ,
17
+ { "synchronize" , new SortValue { DocumentSection = Top , RankWithinSection = 4 } } ,
18
+ { "comment" , new SortValue { DocumentSection = Top , RankWithinSection = 5 } } ,
19
+ { "tuplizer" , new SortValue { DocumentSection = Top , RankWithinSection = 6 } } ,
20
+ { "key" , new SortValue { DocumentSection = Top , RankWithinSection = 7 } } ,
21
+ { "parent" , new SortValue { DocumentSection = Top , RankWithinSection = 7 } } ,
22
+ { "id" , new SortValue { DocumentSection = Top , RankWithinSection = 7 } } ,
23
+ { "composite-id" , new SortValue { DocumentSection = Top , RankWithinSection = 7 } } ,
24
+ { "discriminator" , new SortValue { DocumentSection = Top , RankWithinSection = 8 } } ,
25
+ { "natural-id" , new SortValue { DocumentSection = Top , RankWithinSection = 9 } } ,
26
+ { "version" , new SortValue { DocumentSection = Top , RankWithinSection = 10 } } ,
27
+ { "timestamp" , new SortValue { DocumentSection = Top , RankWithinSection = 10 } } ,
28
+
29
+ // middle section
30
+ { "property" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
31
+ { "many-to-one" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
32
+ { "one-to-one" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
33
+ { "component" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
34
+ { "dynamic-component" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
35
+ { "properties" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
36
+ { "any" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
37
+ { "map" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
38
+ { "set" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
39
+ { "list" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
40
+ { "bag" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
41
+ { "idbag" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
42
+ { "array" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
43
+ { "primitive-array" , new SortValue { DocumentSection = Middle , RankWithinSection = 1 } } ,
44
+
45
+ // bottom section
46
+ { "join" , new SortValue { DocumentSection = Bottom , RankWithinSection = 1 } } ,
47
+ { "subclass" , new SortValue { DocumentSection = Bottom , RankWithinSection = 2 } } ,
48
+ { "joined-subclass" , new SortValue { DocumentSection = Bottom , RankWithinSection = 3 } } ,
49
+ { "union-subclass" , new SortValue { DocumentSection = Bottom , RankWithinSection = 4 } } ,
50
+ { "loader" , new SortValue { DocumentSection = Bottom , RankWithinSection = 5 } } ,
51
+ { "sql-insert" , new SortValue { DocumentSection = Bottom , RankWithinSection = 6 } } ,
52
+ { "sql-update" , new SortValue { DocumentSection = Bottom , RankWithinSection = 7 } } ,
53
+ { "sql-delete" , new SortValue { DocumentSection = Bottom , RankWithinSection = 8 } } ,
54
+ { "filter" , new SortValue { DocumentSection = Bottom , RankWithinSection = 9 } } ,
55
+ { "query" , new SortValue { DocumentSection = Bottom , RankWithinSection = 10 } } ,
56
+ { "sql-query" , new SortValue { DocumentSection = Bottom , RankWithinSection = 11 } } ,
40
57
} ;
41
58
}
42
59
0 commit comments