Separating security into a part that depends only on the JPA and into a
[utils] / security / impl / src / main / resources / hbm / AuthorizationRule.hbm.xml
diff --git a/security/impl/src/main/resources/hbm/AuthorizationRule.hbm.xml b/security/impl/src/main/resources/hbm/AuthorizationRule.hbm.xml
new file mode 100644 (file)
index 0000000..33f5d94
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+    
+    <hibernate-mapping>
+        
+        <class name="org.wamblee.security.authorization.AuthorizationRule" 
+               table="AUTHORIZATION_RULES" 
+               select-before-update="true"
+               lazy="false">
+            <id name="primaryKey" column="ID" type="long">
+                <generator class="native"/>
+            </id>
+            <discriminator column="TYPE" type="string"/>
+            <version name="persistedVersion" column="VERSION"/>
+            
+            <subclass name="org.wamblee.security.authorization.UrlAuthorizationRule"
+                discriminator-value="ISINGROUP"
+                lazy="false">
+                <property name="authorizationResultString" column="RESULT"/>
+                <property name="resourceClassName" column="RESOURCE_CLASSNAME"/>
+                <many-to-one name="userCondition" 
+                             class="org.wamblee.security.authorization.UserCondition"
+                             column="USERCONDITION_ID"
+                             cascade="all"
+                             lazy="false"/>
+                <many-to-one name="pathCondition" 
+                    class="org.wamblee.security.authorization.PathCondition"
+                    column="PATHCONDITION_ID"
+                    cascade="all"
+                    lazy="false"/>
+                <many-to-one name="operationCondition" 
+                    class="org.wamblee.security.authorization.OperationCondition"
+                    column="OPERATIONCONDITION_ID"
+                    cascade="all"
+                    lazy="false"/> 
+            </subclass>
+            
+        </class>
+        
+        
+    </hibernate-mapping>
\ No newline at end of file