Advertisement
Guest User

Vertical Inheritance

a guest
Dec 12th, 2011
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.82 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
  3.  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.  xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
  5.  project-version="3.0.0.1">
  6.     <property name="defaultLockType" value="optimistic"/>
  7.     <property name="defaultPackage" value="com.logstorage.nextui.db.orm"/>
  8.     <db-entity name="ELEMENT">
  9.         <db-attribute name="DESCRIPTION" type="VARCHAR" isMandatory="true" length="300"/>
  10.         <db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  11.         <db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="300"/>
  12.         <db-attribute name="TYPE" type="VARCHAR" isMandatory="true" length="30"/>
  13.     </db-entity>
  14.     <db-entity name="ELEMENT_PERMISSION">
  15.         <db-attribute name="ELEMENT_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  16.         <db-attribute name="PERMISSION_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  17.     </db-entity>
  18.     <db-entity name="ELEMENT_TAG">
  19.         <db-attribute name="ELEMENT_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  20.         <db-attribute name="TAG_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  21.     </db-entity>
  22.     <db-entity name="FILE">
  23.         <db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  24.         <db-attribute name="PATH" type="VARCHAR" isMandatory="true" length="300"/>
  25.     </db-entity>
  26.     <db-entity name="PERMISSION">
  27.         <db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  28.         <db-attribute name="VALUE" type="VARCHAR" length="300"/>
  29.     </db-entity>
  30.     <db-entity name="PRINCIPAL">
  31.         <db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  32.         <db-attribute name="PASSWORD" type="VARCHAR" isMandatory="true" length="256"/>
  33.     </db-entity>
  34.     <db-entity name="PRINCIPAL_PERMISSION">
  35.         <db-attribute name="PERMISSION_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  36.         <db-attribute name="PRINCIPAL_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  37.     </db-entity>
  38.     <db-entity name="TAG">
  39.         <db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
  40.     </db-entity>
  41.     <obj-entity name="Element" className="com.logstorage.nextui.db.orm.Element" lock-type="optimistic" dbEntityName="ELEMENT">
  42.         <obj-attribute name="description" type="java.lang.String" db-attribute-path="DESCRIPTION"/>
  43.         <obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
  44.         <obj-attribute name="type" type="java.lang.String" db-attribute-path="TYPE"/>
  45.         <obj-attribute name="uid" type="long" db-attribute-path="ID"/>
  46.     </obj-entity>
  47.     <obj-entity name="File" superEntityName="Element" className="com.logstorage.nextui.db.orm.File" lock-type="optimistic" dbEntityName="ELEMENT">
  48.         <qualifier><![CDATA[type = "FILE"]]></qualifier>
  49.         <obj-attribute name="path" type="java.lang.String" db-attribute-path="asFile.PATH"/>
  50.     </obj-entity>
  51.     <obj-entity name="Permission" superEntityName="Element" className="com.logstorage.nextui.db.orm.Permission" lock-type="optimistic" dbEntityName="ELEMENT">
  52.         <qualifier><![CDATA[type = "PERMISSION"]]></qualifier>
  53.         <obj-attribute name="value" type="java.lang.String" db-attribute-path="asPermission.VALUE"/>
  54.     </obj-entity>
  55.     <obj-entity name="Principal" superEntityName="Element" className="com.logstorage.nextui.db.orm.Principal" lock-type="optimistic" dbEntityName="ELEMENT">
  56.         <qualifier><![CDATA[type = "PRINCIPAL"]]></qualifier>
  57.         <obj-attribute name="password" type="java.lang.String" db-attribute-path="asPrincipal.PASSWORD"/>
  58.     </obj-entity>
  59.     <obj-entity name="Tag" superEntityName="Element" className="com.logstorage.nextui.db.orm.Tag" lock-type="optimistic" dbEntityName="ELEMENT">
  60.         <qualifier><![CDATA[type = "TAG"]]></qualifier>
  61.     </obj-entity>
  62.     <db-relationship name="asFile" source="ELEMENT" target="FILE" toDependentPK="true" toMany="false">
  63.         <db-attribute-pair source="ID" target="ID"/>
  64.     </db-relationship>
  65.     <db-relationship name="asPermission" source="ELEMENT" target="PERMISSION" toDependentPK="true" toMany="false">
  66.         <db-attribute-pair source="ID" target="ID"/>
  67.     </db-relationship>
  68.     <db-relationship name="asPrincipal" source="ELEMENT" target="PRINCIPAL" toDependentPK="true" toMany="false">
  69.         <db-attribute-pair source="ID" target="ID"/>
  70.     </db-relationship>
  71.     <db-relationship name="asTag" source="ELEMENT" target="TAG" toDependentPK="true" toMany="false">
  72.         <db-attribute-pair source="ID" target="ID"/>
  73.     </db-relationship>
  74.     <db-relationship name="toElementPermission" source="ELEMENT" target="ELEMENT_PERMISSION" toDependentPK="true" toMany="true">
  75.         <db-attribute-pair source="ID" target="ELEMENT_ID"/>
  76.     </db-relationship>
  77.     <db-relationship name="toElementTag" source="ELEMENT" target="ELEMENT_TAG" toDependentPK="true" toMany="true">
  78.         <db-attribute-pair source="ID" target="ELEMENT_ID"/>
  79.     </db-relationship>
  80.     <db-relationship name="element" source="ELEMENT_PERMISSION" target="ELEMENT" toMany="true">
  81.         <db-attribute-pair source="ELEMENT_ID" target="ID"/>
  82.     </db-relationship>
  83.     <db-relationship name="permission" source="ELEMENT_PERMISSION" target="PERMISSION" toMany="true">
  84.         <db-attribute-pair source="PERMISSION_ID" target="ID"/>
  85.     </db-relationship>
  86.     <db-relationship name="element" source="ELEMENT_TAG" target="ELEMENT" toMany="true">
  87.         <db-attribute-pair source="ELEMENT_ID" target="ID"/>
  88.     </db-relationship>
  89.     <db-relationship name="tag" source="ELEMENT_TAG" target="TAG" toMany="true">
  90.         <db-attribute-pair source="TAG_ID" target="ID"/>
  91.     </db-relationship>
  92.     <db-relationship name="asElement" source="FILE" target="ELEMENT" toMany="false">
  93.         <db-attribute-pair source="ID" target="ID"/>
  94.     </db-relationship>
  95.     <db-relationship name="asElement" source="PERMISSION" target="ELEMENT" toMany="false">
  96.         <db-attribute-pair source="ID" target="ID"/>
  97.     </db-relationship>
  98.     <db-relationship name="toElementPermission" source="PERMISSION" target="ELEMENT_PERMISSION" toDependentPK="true" toMany="true">
  99.         <db-attribute-pair source="ID" target="PERMISSION_ID"/>
  100.     </db-relationship>
  101.     <db-relationship name="toPrincipalPermission" source="PERMISSION" target="PRINCIPAL_PERMISSION" toDependentPK="true" toMany="true">
  102.         <db-attribute-pair source="ID" target="PERMISSION_ID"/>
  103.     </db-relationship>
  104.     <db-relationship name="asElement" source="PRINCIPAL" target="ELEMENT" toMany="false">
  105.         <db-attribute-pair source="ID" target="ID"/>
  106.     </db-relationship>
  107.     <db-relationship name="toPrincipalPermission" source="PRINCIPAL" target="PRINCIPAL_PERMISSION" toDependentPK="true" toMany="true">
  108.         <db-attribute-pair source="ID" target="PRINCIPAL_ID"/>
  109.     </db-relationship>
  110.     <db-relationship name="permission" source="PRINCIPAL_PERMISSION" target="PERMISSION" toMany="true">
  111.         <db-attribute-pair source="PERMISSION_ID" target="ID"/>
  112.     </db-relationship>
  113.     <db-relationship name="principal" source="PRINCIPAL_PERMISSION" target="PRINCIPAL" toMany="true">
  114.         <db-attribute-pair source="PRINCIPAL_ID" target="ID"/>
  115.     </db-relationship>
  116.     <db-relationship name="asElement" source="TAG" target="ELEMENT" toMany="false">
  117.         <db-attribute-pair source="ID" target="ID"/>
  118.     </db-relationship>
  119.     <db-relationship name="toElementTag" source="TAG" target="ELEMENT_TAG" toDependentPK="true" toMany="true">
  120.         <db-attribute-pair source="ID" target="TAG_ID"/>
  121.     </db-relationship>
  122.     <obj-relationship name="requiredPermissions" source="Element" target="Permission" deleteRule="Deny" db-relationship-path="toElementPermission.permission.asElement"/>
  123.     <obj-relationship name="tags" source="Element" target="Tag" deleteRule="Deny" db-relationship-path="toElementTag.tag.asElement"/>
  124.     <obj-relationship name="elements" source="Permission" target="Element" deleteRule="Deny" db-relationship-path="toElementPermission.element"/>
  125.     <obj-relationship name="elements" source="Tag" target="Element" deleteRule="Deny" db-relationship-path="toElementTag.element"/>
  126. </data-map>
  127.  
  128.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement