f8e036ca61a8aa74c5cfad73ae80414496d5db15
[utils] /
1 <?xml version="1.0"?>
2 <!DOCTYPE hibernate-mapping PUBLIC
3     "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
4     "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
5     
6     <hibernate-mapping>
7         
8         <class name="org.wamblee.security.authorization.AuthorizationService" table="AUTHORIZATION_SERVICE" 
9                select-before-update="true">
10             <id name="primaryKey" column="ID" type="long">
11                 <generator class="native"/>
12             </id>
13             <discriminator column="TYPE" type="string"/>
14             <version name="persistedVersion" column="VERSION"/>
15             
16             <subclass name="org.wamblee.security.authorization.DefaultAuthorizationService"
17                 discriminator-value="DEFAULT">
18                 
19                 <property name="name" column="NAME"/>
20                
21                 <list name="mappedRules" table="AUTHORIZATION_SERVICE_RULES" lazy="false" cascade="all-delete-orphan">
22                     <key column="ID"/>
23                     <index column="POSITION"/>
24                     <many-to-many class="org.wamblee.security.authorization.AuthorizationRule"
25                        column="RULE_ID"/>
26                 </list>
27             </subclass>
28             
29         </class>
30         
31         <query name="findAuthorizationServiceByName">
32             select service
33             from org.wamblee.security.authorization.AuthorizationService service
34             where service.name = :name 
35         </query>
36         
37     </hibernate-mapping>