mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
9018: MT: system-wide jobs should run across all stores/indexes 9204: Merged V2.2 to V2.9 8633: Merged V2.1 to V2.2 8629: Merged V2.1-A to V2.1 8493: Fixed ADB-51: ImporterBootstrap doesn't use transaction retrying 8494: EHCache and JGroup patches and upgrades 8546: ACT-1650: performance optimization 8550: Fixes to transactional cache handling 8553: Fixed tests: MLText is a Map, but will always have at least one entry, even that entry is null. 8583: ACT-954: IndexInfo files now reopen when they close (for whatever reason) 8640: Merged V2.1 to V2.2 8638: Used correct exception type for IO channel reopen logic 9102: Unit test to check that transactional cache size overrun is handled 9106: Merged V2.1 to V2.2 9043: Fixed AR-2291: SchemaBootstrap lock is only required before first SQL execution 9045: Fix AR-2291: SchemaBootstrap lock is only required before first SQL execution 9047: Fixed AR-2305: Index tracking in AUTO mode doesn't report anything on bootstrap 9048: Fixed AR-2300: Random-based GUID instead of time-based GUIDs 9049: Fix patches to only run once 9050 <Defered>: Changed getString() method to use the available buffer length rather than a hard coded value. 9060: Fixed ETWOONE-109 and ETWOONE-128: RetryingTransactionHelper fixes and improvements 9061: Fixed NodeRefPropertyMethodInterceptorTest 9075 <Defered>: Added delete permission check when marking a file for delete on close. ETWOONE-141/ACT-2416. 9080: Fixed EHCache source zip 9081: Fixed ETWOONE-118: Tomcat failed bootstrap doesn't clean up EHCache cluster structures 9085: Fixed ETWOONE-154: Added JSR107 Jar to WAR 9115: Fixed test: TransactionalCache uses LRU so repeatedly checking if a entry is there keeps it in the cache. 9206: Merged V2.2 to V2.9 8857: Improvements to ACL performance for large ACLs 8951: Always check permission entry changes are made at position 0 9219 <No change>: Made NTLMLogonDetails class Serializable, port of r8973. 9220: Added delete permission check when marking a file for delete on close. Port of r9075. 9222: Merged V2.1 to V2.9 8683: Early warning for nodes indexed in the wrong store (ACT-964) 8684: Enhanced tests 8685: Enhanced tests 8686: Additional tests 9223: Merged V2.2 to V2.9 9120: Merged V2.1 to V2.2 8740: Fix for AR-2173 - do no recheck case of the user name when validating tickets (it has been done) 9122: Additional unit test from support case. 9224: Merged V2.2 to V2.9 9076: Fixed ETWOTWO-426: Upgrading alfresco from 2.1.1 to 2.2 throws errors with Mysql 5.0.51 9104: Merged V2.1 to V2.2 9025: Fixed AR-2314, AR-2299: Optimizations after profiling 9105: Merged V2.1 to V2.2 8745: Fix AR-2233 (regression introduced by fix for AR-2221) 9121: Merged V2.1 to V2.2 9017: Fix index back up failing due to background index merge/deletions (inlcudes back port of CHK-2588) 9137: Incorporated additions from Will into AVM console (ETWOTWO-439) 9225: Merged V2.1 to V2.9 8641: Merged V2.1-A to V2.1 7729: Fix to Repository Web Service (queryAssociated) to allow reverse association lookup (ie. given target, get the source) 8673: Fix for AR-2098 - shorter URL form now has NTLM filter mapping example in web.xml 8682: Fix for AR-2005 8695: AR-2054. 8696: Improved sort test to include prefix form of field name 9226: Fix ALFCOM-994 (see also earlier change in r9223) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9233 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
562 lines
19 KiB
XML
562 lines
19 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>
|
|
|
|
<typedef class="org.alfresco.repo.domain.hibernate.LocaleUserType" name="Locale" />
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.NodeImpl"
|
|
proxy="org.alfresco.repo.domain.Node"
|
|
table="alf_node"
|
|
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>
|
|
<!-- the natural ID of the node -->
|
|
<natural-id mutable="true">
|
|
<!-- forward assoc to store -->
|
|
<many-to-one
|
|
name="store"
|
|
class="org.alfresco.repo.domain.hibernate.StoreImpl"
|
|
not-null="true"
|
|
lazy="proxy"
|
|
foreign-key="fk_alf_n_store"
|
|
optimistic-lock="true"
|
|
fetch="join">
|
|
<column name="protocol" not-null="true" />
|
|
<column name="identifier" not-null="true" />
|
|
</many-to-one>
|
|
<!-- the store-unique identifier -->
|
|
<property name="uuid" column="uuid" type="string" length="36" />
|
|
</natural-id>
|
|
<!-- Optimistic locking -->
|
|
<version column="version" name="version" type="long" />
|
|
|
|
<!-- forward assoc to node type (mandatory) -->
|
|
<many-to-one
|
|
name="typeQName"
|
|
class="org.alfresco.repo.domain.hibernate.QNameEntityImpl"
|
|
column="type_qname_id"
|
|
foreign-key="fk_alf_n_tqname"
|
|
lazy="proxy"
|
|
fetch="select"
|
|
unique="false"
|
|
not-null="true"
|
|
cascade="none" />
|
|
<!-- forward assoc to access control list (optional) -->
|
|
<many-to-one
|
|
name="accessControlList"
|
|
class="org.alfresco.repo.domain.hibernate.DbAccessControlListImpl"
|
|
column="acl_id"
|
|
foreign-key="fk_alf_n_acl"
|
|
lazy="false"
|
|
fetch="join"
|
|
unique="false"
|
|
not-null="false"
|
|
cascade="none" />
|
|
<!-- forward assoc to properties -->
|
|
<map
|
|
name="properties"
|
|
table="alf_node_properties"
|
|
lazy="true"
|
|
fetch="select"
|
|
batch-size="128"
|
|
sort="unsorted"
|
|
inverse="false"
|
|
optimistic-lock="true"
|
|
cascade="delete" >
|
|
<key column="node_id" foreign-key="fk_alf_n_prop" not-null="true" />
|
|
<map-key column="qname_id" type="long" />
|
|
<composite-element class="org.alfresco.repo.domain.PropertyValue" >
|
|
<property name="actualType" column="actual_type_n" type="integer" not-null="true" />
|
|
<property name="persistedType" column="persisted_type_n" type="integer" not-null="true" />
|
|
<property name="multiValued" column="multi_valued" type="boolean" not-null="true" />
|
|
<property name="booleanValue" column="boolean_value" type="boolean" />
|
|
<property name="longValue" column="long_value" type="long" />
|
|
<property name="floatValue" column="float_value" type="float" />
|
|
<property name="doubleValue" column="double_value" type="double" />
|
|
<property name="stringValue" column="string_value" type="string" length="1024"/>
|
|
<many-to-one name="attributeValue" column="attribute_value" foreign-key="fk_alf_np_attr" class="org.alfresco.repo.attributes.AttributeImpl" />
|
|
<property name="serializableValue" column="serializable_value" type="serializable" length="16384"/>
|
|
</composite-element>
|
|
</map>
|
|
<!-- forward assoc to aspects -->
|
|
<set
|
|
name="aspects"
|
|
table="alf_node_aspects"
|
|
lazy="true"
|
|
fetch="select"
|
|
batch-size="128"
|
|
inverse="false"
|
|
sort="unsorted"
|
|
optimistic-lock="true"
|
|
cascade="delete" >
|
|
<key column="node_id" foreign-key="fk_alf_n_asp" not-null="true" />
|
|
<element column="qname_id" type="long" not-null="true" />
|
|
</set>
|
|
</class>
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.NodeStatusImpl"
|
|
proxy="org.alfresco.repo.domain.NodeStatus"
|
|
table="alf_node_status"
|
|
dynamic-update="false"
|
|
dynamic-insert="false"
|
|
select-before-update="false"
|
|
lazy="true"
|
|
optimistic-lock="version" >
|
|
<!-- composite PK -->
|
|
<composite-id name="key" class="org.alfresco.repo.domain.NodeKey">
|
|
<key-property name="protocol" length="50" />
|
|
<key-property name="identifier" length="100" />
|
|
<key-property name="guid" length="36" />
|
|
</composite-id>
|
|
<!-- Optimistic locking -->
|
|
<version column="version" name="version" type="long" />
|
|
<!-- forward assoc to transaction -->
|
|
<many-to-one
|
|
name="transaction"
|
|
class="org.alfresco.repo.domain.hibernate.TransactionImpl"
|
|
column="transaction_id"
|
|
foreign-key="fk_alf_ns_trans"
|
|
lazy="proxy"
|
|
fetch="select"
|
|
unique="false"
|
|
not-null="true"
|
|
cascade="none" />
|
|
<!-- forward assoc to node (optional) -->
|
|
<many-to-one
|
|
name="node"
|
|
class="org.alfresco.repo.domain.hibernate.NodeImpl"
|
|
column="node_id"
|
|
foreign-key="fk_alf_ns_node"
|
|
lazy="false"
|
|
fetch="join"
|
|
unique="false"
|
|
not-null="false" />
|
|
</class>
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.ChildAssocImpl"
|
|
proxy="org.alfresco.repo.domain.ChildAssoc"
|
|
dynamic-insert="false"
|
|
dynamic-update="false"
|
|
lazy="true"
|
|
optimistic-lock="version"
|
|
table="alf_child_assoc" >
|
|
<!-- auto-generated ID -->
|
|
<id name="id" column="id" type="long" >
|
|
<generator class="native" />
|
|
</id>
|
|
<!-- Optimistic locking -->
|
|
<version column="version" name="version" type="long" />
|
|
<!-- forward assoc to parent node -->
|
|
<many-to-one
|
|
name="parent"
|
|
class="org.alfresco.repo.domain.hibernate.NodeImpl"
|
|
lazy="proxy"
|
|
foreign-key="fk_alf_ca_pnode"
|
|
fetch="select"
|
|
optimistic-lock="false"
|
|
not-null="true"
|
|
unique-key="UIDX_CHILD_NAME" >
|
|
<column name="parent_node_id" not-null="true" />
|
|
</many-to-one>
|
|
<!-- forward assoc to child node -->
|
|
<many-to-one
|
|
name="child"
|
|
lazy="proxy"
|
|
foreign-key="fk_alf_ca_cnode"
|
|
fetch="select"
|
|
class="org.alfresco.repo.domain.hibernate.NodeImpl"
|
|
optimistic-lock="false"
|
|
not-null="true" >
|
|
<column name="child_node_id" not-null="true"/>
|
|
</many-to-one>
|
|
<!-- forward assoc to assoc type (mandatory) -->
|
|
<many-to-one
|
|
name="typeQName"
|
|
class="org.alfresco.repo.domain.hibernate.QNameEntityImpl"
|
|
column="type_qname_id"
|
|
foreign-key="fk_alf_ca_tqn"
|
|
unique-key="UIDX_CHILD_NAME"
|
|
lazy="proxy"
|
|
fetch="select"
|
|
unique="false"
|
|
not-null="true"
|
|
cascade="none" />
|
|
<!-- forward assoc to namespace for local QName (mandatory) -->
|
|
<many-to-one
|
|
name="qnameNamespace"
|
|
class="org.alfresco.repo.domain.hibernate.NamespaceEntityImpl"
|
|
column="qname_ns_id"
|
|
foreign-key="fk_alf_ca_qn_ns"
|
|
lazy="proxy"
|
|
fetch="select"
|
|
unique="false"
|
|
not-null="true"
|
|
cascade="none" />
|
|
<property name="qnameLocalName" column="qname_localname" type="string" length="200" not-null="true" index="idx_alf_ca_qn_ln" />
|
|
<property name="childNodeName" column="child_node_name" type="string" length="50" not-null="true" unique-key="UIDX_CHILD_NAME" />
|
|
<property name="childNodeNameCrc" column="child_node_name_crc" type="long" not-null="true" unique-key="UIDX_CHILD_NAME" />
|
|
<property name="isPrimary" column="is_primary" />
|
|
<property name="index" column="assoc_index" />
|
|
</class>
|
|
|
|
<class
|
|
name="org.alfresco.repo.domain.hibernate.NodeAssocImpl"
|
|
proxy="org.alfresco.repo.domain.NodeAssoc"
|
|
table="alf_node_assoc" >
|
|
<!-- auto-generated ID -->
|
|
<id name="id" column="id" type="long" >
|
|
<generator class="native" />
|
|
</id>
|
|
<natural-id mutable="true">
|
|
<!-- forward assoc to source node -->
|
|
<many-to-one
|
|
name="source"
|
|
class="org.alfresco.repo.domain.hibernate.NodeImpl"
|
|
optimistic-lock="false"
|
|
foreign-key="fk_alf_na_snode"
|
|
lazy="false"
|
|
fetch="join"
|
|
not-null="true" >
|
|
<column name="source_node_id" not-null="true" />
|
|
</many-to-one>
|
|
<!-- forward assoc to target node -->
|
|
<many-to-one
|
|
name="target"
|
|
class="org.alfresco.repo.domain.hibernate.NodeImpl"
|
|
optimistic-lock="false"
|
|
foreign-key="fk_alf_na_tnode"
|
|
lazy="false"
|
|
fetch="join"
|
|
not-null="true" >
|
|
<column name="target_node_id" not-null="true" />
|
|
</many-to-one>
|
|
<!-- forward assoc to assoc type (mandatory) -->
|
|
<many-to-one
|
|
name="typeQName"
|
|
class="org.alfresco.repo.domain.hibernate.QNameEntityImpl"
|
|
column="type_qname_id"
|
|
foreign-key="fk_alf_na_tqn"
|
|
lazy="proxy"
|
|
fetch="select"
|
|
unique="false"
|
|
not-null="true"
|
|
cascade="none" />
|
|
</natural-id>
|
|
<!-- Optimistic locking -->
|
|
<version column="version" name="version" type="long" />
|
|
</class>
|
|
|
|
<query name="store.GetAllStores">
|
|
select
|
|
store
|
|
from
|
|
org.alfresco.repo.domain.hibernate.StoreImpl as store
|
|
</query>
|
|
|
|
<query name="node.updateChildAssocName">
|
|
update
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl assoc
|
|
set
|
|
assoc.childNodeName = :newName,
|
|
assoc.childNodeNameCrc = :newNameCrc
|
|
where
|
|
assoc = :childAssoc
|
|
</query>
|
|
|
|
<query name="node.GetParentAssocs">
|
|
select
|
|
assoc
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
where
|
|
assoc.child = :child
|
|
order by
|
|
assoc.index,
|
|
assoc.id
|
|
</query>
|
|
|
|
<query name="node.GetPrimaryChildNodeStatuses">
|
|
select
|
|
status
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status,
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
join assoc.child as child
|
|
where
|
|
assoc.parent = :parent and
|
|
assoc.isPrimary = true and
|
|
status.node = child
|
|
</query>
|
|
|
|
<query name="node.GetChildAssocsByAll">
|
|
select
|
|
assoc
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
where
|
|
assoc.parent = :parent and
|
|
assoc.child = :child and
|
|
assoc.typeQName = :typeQName and
|
|
assoc.qnameNamespace = :qnameNamespace and
|
|
assoc.qnameLocalName = :qnameLocalName
|
|
order by
|
|
assoc.index,
|
|
assoc.id
|
|
</query>
|
|
|
|
<query name="node.GetChildAssocs">
|
|
select
|
|
assoc
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
where
|
|
assoc.parent = :parent
|
|
order by
|
|
assoc.index,
|
|
assoc.id
|
|
</query>
|
|
|
|
<query name="node.GetChildAssocIdByTypeAndName">
|
|
select
|
|
assoc.id
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
where
|
|
assoc.parent = :parent and
|
|
assoc.typeQName = :typeQName and
|
|
assoc.childNodeName = :childNodeName and
|
|
assoc.childNodeNameCrc = :childNodeNameCrc
|
|
</query>
|
|
|
|
<query name="node.GetChildAssocByTypeAndName">
|
|
select
|
|
assoc
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
where
|
|
assoc.parent = :parent and
|
|
assoc.typeQName = :typeQName and
|
|
assoc.childNodeName = :childNodeName and
|
|
assoc.childNodeNameCrc = :childNodeNameCrc
|
|
order by
|
|
assoc.index,
|
|
assoc.id
|
|
</query>
|
|
|
|
<query name="node.GetChildAssocRefs">
|
|
select
|
|
assoc.typeQName,
|
|
assoc.qnameNamespace,
|
|
assoc.qnameLocalName,
|
|
assoc.isPrimary,
|
|
assoc.index,
|
|
child.id,
|
|
child.store.key.protocol,
|
|
child.store.key.identifier,
|
|
child.uuid as parentUuid
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
join assoc.parent as parent
|
|
join assoc.child as child
|
|
where
|
|
assoc.parent = :parent
|
|
order by
|
|
assoc.index,
|
|
assoc.id
|
|
</query>
|
|
|
|
<query name="node.GetChildAssocRefsByQName">
|
|
select
|
|
assoc.typeQName,
|
|
assoc.qnameNamespace,
|
|
assoc.qnameLocalName,
|
|
assoc.isPrimary,
|
|
assoc.index,
|
|
child.id,
|
|
child.store.key.protocol,
|
|
child.store.key.identifier,
|
|
child.uuid as parentUuid
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
join assoc.parent as parent
|
|
join assoc.child as child
|
|
where
|
|
assoc.parent = :parent and
|
|
assoc.qnameNamespace = :qnameNamespace and
|
|
assoc.qnameLocalName = :qnameLocalName
|
|
order by
|
|
assoc.index,
|
|
assoc.id
|
|
</query>
|
|
|
|
<query name="node.GetNodeAssoc">
|
|
select
|
|
assoc
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeAssocImpl as assoc
|
|
where
|
|
assoc.source = :source and
|
|
assoc.target = :target and
|
|
assoc.typeQName = :assocTypeQName
|
|
</query>
|
|
|
|
<query name="node.GetNodeAssocsToAndFrom">
|
|
select
|
|
assoc
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeAssocImpl as assoc
|
|
where
|
|
assoc.source = :node or
|
|
assoc.target = :node
|
|
</query>
|
|
|
|
<query name="node.GetTargetAssocs">
|
|
select
|
|
assoc
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeAssocImpl as assoc
|
|
join assoc.source as source
|
|
join assoc.target as target
|
|
where
|
|
assoc.source = :source
|
|
</query>
|
|
|
|
<query name="node.GetSourceAssocs">
|
|
select
|
|
assoc
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeAssocImpl as assoc
|
|
join assoc.source as source
|
|
join assoc.target as target
|
|
where
|
|
assoc.target = :target
|
|
</query>
|
|
|
|
<query name="node.GetNodesWithPropertyValuesByActualType">
|
|
select
|
|
node
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
join
|
|
node.properties prop
|
|
where
|
|
(
|
|
prop.actualType = :actualType or
|
|
prop.actualType = 9
|
|
) and
|
|
prop.persistedType != 0
|
|
</query>
|
|
|
|
<query name="node.patch.GetNodesWithPersistedSerializableProperties">
|
|
select distinct
|
|
node
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
where
|
|
node.properties.serializableValue is not null and
|
|
node.properties.multiValued = false
|
|
</query>
|
|
|
|
<query name="node.patch.GetAssocsAndChildNames">
|
|
<![CDATA[
|
|
select
|
|
assoc,
|
|
child
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
join assoc.child as child
|
|
where
|
|
assoc.id > :lastAssocId and
|
|
assoc.typeQName = :assocTypeQName
|
|
order by
|
|
assoc.id
|
|
]]>
|
|
</query>
|
|
|
|
<query name="node.GetNodeStatusesForStore">
|
|
select
|
|
status
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
|
where
|
|
status.key.protocol = :protocol and
|
|
status.key.identifier = :identifier
|
|
</query>
|
|
|
|
<query name="node.GetChildAssocsForStore">
|
|
select
|
|
assoc
|
|
from
|
|
org.alfresco.repo.domain.hibernate.ChildAssocImpl as assoc
|
|
where
|
|
assoc.parent.id in (select
|
|
node.id
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl node
|
|
where
|
|
node.store.key.protocol = :protocol and
|
|
node.store.key.identifier = :identifier)
|
|
</query>
|
|
|
|
<query name="node.GetNodesExceptRootForStore">
|
|
select
|
|
node
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
where
|
|
node.store.key.protocol = :nodeProtocol and
|
|
node.store.key.identifier = :nodeIdentifier and
|
|
node.id != (select
|
|
rootNode.id
|
|
from
|
|
org.alfresco.repo.domain.hibernate.StoreImpl store
|
|
where
|
|
store.key.protocol = :storeProtocol and
|
|
store.key.identifier = :storeIdentifier)
|
|
</query>
|
|
|
|
<query name="node.GetNodeCount">
|
|
select
|
|
count(node.id)
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
</query>
|
|
|
|
<query name="node.GetNodeCountForStore">
|
|
select
|
|
count(node.id)
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
where
|
|
node.store.key.protocol = :protocol and
|
|
node.store.key.identifier = :identifier
|
|
</query>
|
|
|
|
<query name="node.GetNodesWithPropertyStringValueForStore">
|
|
select
|
|
node
|
|
from
|
|
org.alfresco.repo.domain.hibernate.NodeImpl as node
|
|
join node.properties prop
|
|
where
|
|
node.store.key.protocol = :protocol and
|
|
node.store.key.identifier = :identifier and
|
|
index(prop) = :propQNameId and
|
|
prop.stringValue = :propStringValue
|
|
</query>
|
|
|
|
</hibernate-mapping>
|