hibernate 配置文件里进行排序
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.gosophia.resourcePermission.entity">
<class name="ResourcePermission" table="T_RESOURCE_PERMISSION">
<id name="resourceId" type="long" column="RESOURCEID">
<generator />
</id>
<property name="resourceName" column="RESOURCENAME" />
<property name="resourceDescription" column="RESOURCEDESCRIPTION" />
<property name="resourceMatch" column="RESOURCEMATCH" />
<bag name="rules" inverse="true" cascade="all" order-by="ruleOrder asc">
<key>
<column name="RESOURCEID"></column>
</key>
<one-to-many />
</bag>
</class>
</hibernate-mapping>
这样配就可以对list排序了,这个排序时可以排列多级list