Jan Vonka 21bb599e20 Merged V3.0 to HEAD
12140: Merged V2.2 to V3.0
    11732: Fixed ETWOTWO-804: Node and Transaction Cleanup Job
    11747: Missed config for Node and Txn purging
    11826: WCM - fix ETWOTWO-817
    11951: Fixed ETWOTWO-901: NodeService cleanup must be pluggable
    11961: Merged V2.1 to V2.2
      11561: ETWOONE-224: when renaming duplicates during copy association names where not renamed 
      11583: (ALREADY PRESENT) Updated NTLM config example in web.xml - adding missing servlet mappings
      11584: Fix for ETWOONE-209 - JavaScript People.createGroup() API now correctly checks for actual group name when testing for existence
      11585: Fix for ETWOONE-214 - View In CIFS link now works even when users des not have view permissions on the parent folder
      11612: Fix for ETWOONE-91: the description textarea in the modify space properties web form eats one leading newline each time it is submitted
      11613: Fix 2.1 build and adjust implementation of ETWOONE-224 fix
      11621: Fix for ETWOONE-343
      11669: Improved debug from index tracking when exceptions occur
  12141: Avoid annoying Spring WARN messages for ClientAbortException
  12143: File that should have been deleted in CHK-5460 (rev 12140)
  12177: Fix failing FS Deployment Tests since introduction of transaction check advice.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12507 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2008-12-19 10:21:51 +00:00

216 lines
6.0 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.TransactionImpl"
proxy="org.alfresco.repo.domain.Transaction"
table="alf_transaction"
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" />
<!-- forward assoc to server IP -->
<many-to-one
name="server"
class="org.alfresco.repo.domain.hibernate.ServerImpl"
column="server_id"
foreign-key="fk_alf_txn_svr"
lazy="proxy"
fetch="select"
unique="false"
not-null="false"
cascade="none" />
<property name="changeTxnId" column="change_txn_id" type="string" length="56" not-null="true" />
<property name="commitTimeMs" column="commit_time_ms" type="long" not-null="false" index="idx_alf_txn_ctms" />
</class>
<class
name="org.alfresco.repo.domain.hibernate.ServerImpl"
proxy="org.alfresco.repo.domain.Server"
table="alf_server"
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>
<natural-id>
<property name="ipAddress" column="ip_address" type="string" length="15" not-null="true" />
</natural-id>
<!-- Optimistic locking -->
<version column="version" name="version" type="long" />
</class>
<query name="server.getServerByIpAddress">
select
server
from
org.alfresco.repo.domain.hibernate.ServerImpl as server
where
server.ipAddress = :ipAddress
</query>
<query name="txn.GetTxnById">
select
txn
from
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
where
txn.id = :txnId
</query>
<query name="txn.GetMinCommitTime">
select
min(txn.commitTimeMs)
from
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
</query>
<query name="txn.GetMaxCommitTime">
select
max(txn.commitTimeMs)
from
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
</query>
<query name="txn.GetMaxIdByCommitTime">
<![CDATA[
select
max(txn.id)
from
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
where
txn.commitTimeMs <= :maxCommitTime
]]>
</query>
<query name="txn.GetTxnsByCommitTimeAsc">
<![CDATA[
select
txn
from
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
where
txn.commitTimeMs >= :fromTimeInclusive and
txn.commitTimeMs < :toTimeExclusive and
txn.id not in (:excludeTxnIds) and
txn.server.id not in (:excludeServerIds)
order by
txn.commitTimeMs asc,
txn.id asc
]]>
</query>
<query name="txn.GetTxnsByCommitTimeDesc">
<![CDATA[
select
txn
from
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
where
txn.commitTimeMs >= :fromTimeInclusive and
txn.commitTimeMs < :toTimeExclusive and
txn.id not in (:excludeTxnIds) and
txn.server.id not in (:excludeServerIds)
order by
txn.commitTimeMs desc,
txn.id desc
]]>
</query>
<query name="txn.GetSelectedTxnsByCommitAsc">
<![CDATA[
select
txn
from
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
where
txn.id in (:includeTxnIds)
order by
txn.commitTimeMs asc,
txn.id asc
]]>
</query>
<query name="txn.CountTransactions">
select
count(txn.id)
from
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
</query>
<query name="txn.GetTxnUpdateCountForStore">
select
count(node.uuid)
from
org.alfresco.repo.domain.hibernate.NodeImpl as node
join node.transaction as txn
where
txn.id = :txnId and
node.deleted = false
</query>
<query name="txn.GetTxnDeleteCountForStore">
select
count(node.uuid)
from
org.alfresco.repo.domain.hibernate.NodeImpl as node
join node.transaction as txn
where
txn.id = :txnId and
node.deleted = true
</query>
<query name="txn.GetTxnChangesForStore">
select
node
from
org.alfresco.repo.domain.hibernate.NodeImpl as node
where
node.transaction.id = :txnId and
node.store.protocol = :protocol and
node.store.identifier = :identifier
</query>
<query name="txn.GetTxnChanges">
select
node
from
org.alfresco.repo.domain.hibernate.NodeImpl as node
where
node.transaction.id = :txnId
</query>
<query name="txn.GetTxnsUnused">
<![CDATA[
select
txn.id
from
org.alfresco.repo.domain.hibernate.NodeImpl as node
right join node.transaction as txn
where
node.id is null and
txn.id >= :minTxnId and
txn.commitTimeMs <= :maxCommitTime
order by
txn.id asc
]]>
</query>
</hibernate-mapping>