mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
8083: Merged V2.1 to V2.2 8066: RM-31 and related issues (ACT-729) 8068: Fix for AR-1997 8084: Fixed script error on notify page of invite website user wizard 8086: Merged V2.1 to V2.2 8075: Clear()ing a hibernate session, is not always enough to guarantee that transactions not use unbounded amounts of memory 8076: Turn off test that needs to be fixed real soon now. 8092: Implementation for: http://issues.alfresco.com/browse/AR-1744 8093: Fixed upgrade scripts for V2.1.2 to V2.2 upgrades 8096: Fix for AWC-1578 and AWC-1814 8097: Added new indexes missing from scripts and made index names consistent. 8098: Fix for AWC-1548 8100: Removed use of QName from alf_permission table 8102: Fix for AWC-1690 8103: test was == on id that used to be long but is now a Long git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8476 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
415 lines
14 KiB
XML
415 lines
14 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
|
|
|
<!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.alfresco.repo.domain.hibernate.DbAccessControlListChangeSetImpl"
|
|
proxy="org.alfresco.repo.domain.DbAccessControlListChangeSet"
|
|
table="alf_acl_change_set"
|
|
dynamic-update="false"
|
|
dynamic-insert="false"
|
|
select-before-update="false"
|
|
lazy="true"
|
|
optimistic-lock="version" >
|
|
<!-- auto-generated ID -->
|
|
<id name="id" column="id" type="long" >
|
|
<generator class="native" />
|
|
</id>
|
|
<!-- Optimistic locking -->
|
|
<version column="version" name="version" type="long" />
|
|
</class>
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.DbAccessControlListImpl"
|
|
proxy="org.alfresco.repo.domain.DbAccessControlList"
|
|
table="alf_access_control_list"
|
|
dynamic-insert="false"
|
|
dynamic-update="false"
|
|
select-before-update="false"
|
|
lazy="true"
|
|
optimistic-lock="version" >
|
|
|
|
<id name="id" column="id" type="long" >
|
|
<generator class="native" />
|
|
</id>
|
|
|
|
|
|
<natural-id mutable="true">
|
|
|
|
<property name="aclId" column="acl_id" type="string" length="36"
|
|
not-null="true"/>
|
|
|
|
<property name="latest" column="latest" type="boolean" not-null="true"/>
|
|
|
|
<property name="aclVersion" column="acl_version" type="long"
|
|
not-null="true"/>
|
|
|
|
</natural-id>
|
|
|
|
<version column="version" name="version" type="long" />
|
|
|
|
<property name="inherits" column="inherits" type="boolean" not-null="true" index="idx_alf_acl_inh" />
|
|
|
|
<property name="inheritsFrom" column="inherits_from" type="long" not-null="false" index="idx_alf_acl_inh" />
|
|
|
|
<property name="type" column="type" type="int" not-null="true" />
|
|
|
|
<property name="inheritedAclId" column="inherited_acl" type="long" not-null="false" />
|
|
|
|
<property name="versioned" column="is_versioned" type="boolean" not-null="true" />
|
|
|
|
<property name="requiresVersion" column="requires_version" type="boolean" not-null="true" />
|
|
|
|
<many-to-one
|
|
name="aclChangeSet"
|
|
class="org.alfresco.repo.domain.hibernate.DbAccessControlListChangeSetImpl"
|
|
column="acl_change_set"
|
|
foreign-key="fk_alf_acl_acs"
|
|
lazy="proxy"
|
|
fetch="select"
|
|
unique="false"
|
|
not-null="false"
|
|
cascade="none" />
|
|
|
|
</class>
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.DbAccessControlListMemberImpl"
|
|
proxy="org.alfresco.repo.domain.DbAccessControlListMember"
|
|
table="alf_acl_member" dynamic-insert="false" dynamic-update="false"
|
|
select-before-update="false" lazy="true" optimistic-lock="version">
|
|
|
|
<id name="id" column="id" type="long">
|
|
<generator class="native"/>
|
|
</id>
|
|
|
|
<natural-id mutable="true">
|
|
<many-to-one name="accessControlList"
|
|
class="org.alfresco.repo.domain.hibernate.DbAccessControlListImpl"
|
|
column="acl_id"
|
|
foreign-key="fk_alf_aclm_acl"
|
|
lazy="no-proxy"
|
|
fetch="select"
|
|
optimistic-lock="true"
|
|
not-null="true"/>
|
|
|
|
<many-to-one name="accessControlEntry"
|
|
class="org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl"
|
|
column="ace_id"
|
|
foreign-key="fk_alf_aclm_ace"
|
|
lazy="no-proxy"
|
|
fetch="select"
|
|
optimistic-lock="true"
|
|
not-null="true"/>
|
|
|
|
<property name="position" column="pos" type="int"/>
|
|
</natural-id>
|
|
|
|
<version column="version" name="version" type="long"/>
|
|
</class>
|
|
|
|
<class name="org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl"
|
|
proxy="org.alfresco.repo.domain.DbAccessControlEntry"
|
|
table="alf_access_control_entry" dynamic-insert="false"
|
|
dynamic-update="false" select-before-update="false" lazy="true"
|
|
optimistic-lock="version">
|
|
|
|
<id name="id" column="id" type="long">
|
|
<generator class="native"/>
|
|
</id>
|
|
|
|
<natural-id>
|
|
<many-to-one name="permission"
|
|
class="org.alfresco.repo.domain.hibernate.DbPermissionImpl"
|
|
column="permission_id"
|
|
foreign-key="fk_alf_ace_perm"
|
|
lazy="no-proxy"
|
|
fetch="select"
|
|
optimistic-lock="true"
|
|
not-null="true"/>
|
|
|
|
<many-to-one name="authority"
|
|
class="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
|
|
column="authority_id"
|
|
foreign-key="fk_alf_ace_auth"
|
|
lazy="no-proxy"
|
|
fetch="select"
|
|
optimistic-lock="true"
|
|
not-null="true"/>
|
|
|
|
<property name="allowed" column="allowed" type="boolean" not-null="true"/>
|
|
|
|
<property name="applies" column="applies" type="int" not-null="true"/>
|
|
|
|
<many-to-one name="context"
|
|
class="org.alfresco.repo.domain.hibernate.DbAccessControlEntryContextImpl"
|
|
column="context_id"
|
|
foreign-key="fk_alf_ace_ctx"
|
|
lazy="no-proxy"
|
|
fetch="select"
|
|
optimistic-lock="true"
|
|
not-null="false"/>
|
|
</natural-id>
|
|
|
|
<version column="version" name="version" type="long"/>
|
|
</class>
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.DbPermissionImpl"
|
|
proxy="org.alfresco.repo.domain.DbPermission"
|
|
table="alf_permission"
|
|
dynamic-insert="false"
|
|
dynamic-update="false"
|
|
select-before-update="false"
|
|
lazy="false"
|
|
optimistic-lock="version" >
|
|
|
|
<id name="id" column="id" type="long" >
|
|
<generator class="native" />
|
|
</id>
|
|
|
|
<natural-id mutable="true" >
|
|
<many-to-one
|
|
name="typeQName"
|
|
class="org.alfresco.repo.domain.hibernate.QNameEntityImpl"
|
|
column="type_qname_id"
|
|
foreign-key="fk_alf_perm_tqn"
|
|
lazy="proxy"
|
|
fetch="select"
|
|
unique="false"
|
|
not-null="true"
|
|
cascade="none" />
|
|
<property name="name" type="string" length="100" column="name" />
|
|
</natural-id>
|
|
|
|
<version column="version" name="version" type="long" />
|
|
|
|
</class>
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
|
|
proxy="org.alfresco.repo.domain.DbAuthority"
|
|
table="alf_authority"
|
|
dynamic-insert="false"
|
|
dynamic-update="false"
|
|
select-before-update="false"
|
|
lazy="false"
|
|
optimistic-lock="version" >
|
|
|
|
<id name="id" column="id" type="long" >
|
|
<generator class="native" />
|
|
</id>
|
|
|
|
<version column="version" name="version" type="long" />
|
|
|
|
<property name="authority" column="authority" type="string" length="100" unique-key="uidx_auth_name" index="idx_alf_auth_aut" />
|
|
|
|
<property name="crc" column="crc" type="long" unique-key="uidx_auth_name" />
|
|
|
|
</class>
|
|
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.DbAccessControlEntryContextImpl"
|
|
proxy="org.alfresco.repo.domain.DbAccessControlEntryContext"
|
|
table="alf_ace_context"
|
|
dynamic-insert="false"
|
|
dynamic-update="false"
|
|
select-before-update="false"
|
|
lazy="false"
|
|
optimistic-lock="version" >
|
|
|
|
<id name="id" column="id" type="long" >
|
|
<generator class="native" />
|
|
</id>
|
|
|
|
<version column="version" name="version" type="long" />
|
|
|
|
<property name="classContext" column="class_context" type="string" length="1024" />
|
|
<property name="propertyContext" column="property_context" type="string" length="1024" />
|
|
<property name="kvpContext" column="kvp_context" type="string" length="1024" />
|
|
|
|
</class>
|
|
|
|
<class name="org.alfresco.repo.domain.hibernate.DbAuthorityAliasImpl"
|
|
proxy="org.alfresco.repo.domain.DbAuthorityAlias"
|
|
table="alf_authority_alias" dynamic-insert="false" dynamic-update="false"
|
|
select-before-update="false" lazy="false" optimistic-lock="version">
|
|
|
|
<id name="id" column="id" type="long">
|
|
<generator class="native"/>
|
|
</id>
|
|
|
|
<natural-id mutable="true">
|
|
<many-to-one name="authority"
|
|
class="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
|
|
column="auth_id"
|
|
foreign-key="fk_alf_autha_aut"
|
|
lazy="no-proxy"
|
|
fetch="select"
|
|
optimistic-lock="true"
|
|
not-null="true"/>
|
|
|
|
<many-to-one name="alias"
|
|
class="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
|
|
column="alias_id"
|
|
foreign-key="fk_alf_autha_ali"
|
|
lazy="no-proxy"
|
|
fetch="select"
|
|
optimistic-lock="true"
|
|
not-null="true"/>
|
|
</natural-id>
|
|
|
|
<version column="version" name="version" type="long"/>
|
|
|
|
</class>
|
|
|
|
|
|
<query name="permission.GetPermission" cacheable="true">
|
|
select
|
|
permission
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbPermissionImpl as permission
|
|
where
|
|
permission.typeQName = :permissionTypeQName and
|
|
permission.name = :permissionName
|
|
</query>
|
|
|
|
<query name="permission.GetAuthority" cacheable="true">
|
|
select
|
|
authority
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbAuthorityImpl as authority
|
|
where
|
|
authority.authority = :authority
|
|
</query>
|
|
|
|
<query name="permission.GetAceWithNoContext" cacheable="true">
|
|
select
|
|
ace
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl as ace
|
|
where
|
|
ace.permission.id = :permissionId and
|
|
ace.authority.id = :authorityId and
|
|
ace.allowed = :allowed and
|
|
ace.applies = :applies and
|
|
ace.context is null
|
|
</query>
|
|
|
|
<query name="permission.GetAuthorityAlias" cacheable="true">
|
|
select
|
|
alias
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbAuthorityAliasImpl as alias
|
|
join alias.authority as authority
|
|
join alias.alias as authorityAlias
|
|
where
|
|
authority.authority = :authority and
|
|
authorityAlias.authority = :alias
|
|
</query>
|
|
|
|
<query name="permission.GetAuthorityAliases" cacheable="true">
|
|
select
|
|
authorityAlias.authority
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbAuthorityAliasImpl as alias
|
|
join alias.authority as authority
|
|
join alias.alias as authorityAlias
|
|
where
|
|
authority.authority = :authority
|
|
</query>
|
|
|
|
<query name="permission.GetAcesAndAclsByAuthority" cacheable="true">
|
|
select
|
|
aclmem.id, acl.id, ace.id, authority.authority
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbAccessControlListMemberImpl as aclmem
|
|
join aclmem.accessControlList as acl
|
|
join aclmem.accessControlEntry as ace
|
|
join ace.authority as authority
|
|
where
|
|
authority.authority = :authority
|
|
</query>
|
|
|
|
|
|
<query name="permission.GetAcesForAcl" cacheable="true">
|
|
select
|
|
aclmem
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbAccessControlListMemberImpl as aclmem
|
|
where
|
|
aclmem.accessControlList.id = :id
|
|
</query>
|
|
|
|
<query name="permission.GetAclsThatInheritFromThisAcl" cacheable="true">
|
|
select
|
|
acl.id
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbAccessControlListImpl as acl
|
|
where acl.inheritsFrom = :id and acl.inherits = true
|
|
</query>
|
|
|
|
<query name="permission.FindAvmNodesByACL" cacheable="true">
|
|
select
|
|
node.id
|
|
from
|
|
org.alfresco.repo.avm.AVMNodeImpl node
|
|
where node.acl.id = :acl
|
|
</query>
|
|
|
|
<query name="permission.FindAvmNodesIndirection" cacheable="true">
|
|
select
|
|
node.id
|
|
from
|
|
org.alfresco.repo.avm.LayeredDirectoryNodeImpl node
|
|
where node.primaryIndirection = true and node.indirection = :indirection
|
|
</query>
|
|
|
|
<query name="permission.FindLatestAclByGuid" cacheable="true">
|
|
select
|
|
acl.id
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbAccessControlListImpl as acl
|
|
where acl.aclId = :aclId and latest = true
|
|
</query>
|
|
|
|
<!--
|
|
|
|
<query name="permission.GetAccessControlEntriesForAuthority">
|
|
select
|
|
ace
|
|
from
|
|
org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl as ace
|
|
where
|
|
ace.authority.recipient = :authorityRecipient
|
|
</query>
|
|
|
|
<query name="permission.GetAllAccessControlEntriesForAuthority">
|
|
select
|
|
ace, acl, node
|
|
from org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
join node.accessControlList as acl
|
|
join acl.entries as ace
|
|
where
|
|
ace.authority.recipient = :authorityRecipient
|
|
</query>
|
|
|
|
<query name="permission.FindNodesByPermission">
|
|
select
|
|
ace, acl, node
|
|
from org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
join node.accessControlList as acl
|
|
join acl.entries as ace
|
|
where
|
|
ace.authority.recipient = :authorityRecipient and
|
|
ace.allowed = :allow and
|
|
ace.permission.name = :permissionName and
|
|
ace.permission.typeQName = :permissionTypeQname
|
|
</query>
|
|
-->
|
|
</hibernate-mapping> |