mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3925 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3965 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3966 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -44,6 +44,7 @@ import org.alfresco.util.BaseSpringTest;
|
||||
import org.alfresco.util.GUID;
|
||||
import org.hibernate.CacheMode;
|
||||
import org.hibernate.exception.ConstraintViolationException;
|
||||
import org.hibernate.exception.GenericJDBCException;
|
||||
|
||||
/**
|
||||
* Test persistence and retrieval of Hibernate-specific implementations of the
|
||||
@@ -161,6 +162,11 @@ public class HibernateNodeTest extends BaseSpringTest
|
||||
{
|
||||
// expected
|
||||
}
|
||||
catch(GenericJDBCException e)
|
||||
{
|
||||
// Sybase
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,8 +257,8 @@ public class HibernateNodeTest extends BaseSpringTest
|
||||
assoc1.setQname(QName.createQName(null, "number1"));
|
||||
assoc1.setChildNodeName("number1");
|
||||
assoc1.setChildNodeNameCrc(1);
|
||||
getSession().save(assoc1);
|
||||
assoc1.buildAssociation(containerNode, contentNode);
|
||||
getSession().save(assoc1);
|
||||
|
||||
// make another association between the same two parent and child nodes
|
||||
ChildAssoc assoc2 = new ChildAssocImpl();
|
||||
@@ -261,8 +267,8 @@ public class HibernateNodeTest extends BaseSpringTest
|
||||
assoc2.setQname(QName.createQName(null, "number2"));
|
||||
assoc2.setChildNodeName("number2");
|
||||
assoc2.setChildNodeNameCrc(2);
|
||||
getSession().save(assoc2);
|
||||
assoc2.buildAssociation(containerNode, contentNode);
|
||||
getSession().save(assoc2);
|
||||
|
||||
assertFalse("Hashcode incorrent", assoc2.hashCode() == 0);
|
||||
assertNotSame("Assoc equals failure", assoc1, assoc2);
|
||||
|
@@ -314,56 +314,6 @@
|
||||
assoc.target.id = :targetId
|
||||
</query>
|
||||
|
||||
<query name="node.GetNextChangeTxnIds">
|
||||
select distinct
|
||||
transaction.changeTxnId
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.TransactionImpl as transaction
|
||||
where
|
||||
transaction.changeTxnId > :currentTxnId
|
||||
order by
|
||||
transaction.changeTxnId
|
||||
</query>
|
||||
|
||||
<query name="node.GetChangedNodeStatusesCount">
|
||||
select
|
||||
count(transaction.changeTxnId)
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
join status.transaction as transaction
|
||||
where
|
||||
status.key.protocol = :storeProtocol and
|
||||
status.key.identifier = :storeIdentifier and
|
||||
status.node.id is not null and
|
||||
transaction.changeTxnId = :changeTxnId
|
||||
</query>
|
||||
|
||||
<query name="node.GetChangedNodeStatuses">
|
||||
select
|
||||
status
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
join status.transaction as transaction
|
||||
where
|
||||
status.key.protocol = :storeProtocol and
|
||||
status.key.identifier = :storeIdentifier and
|
||||
status.node.id is not null and
|
||||
transaction.changeTxnId = :changeTxnId
|
||||
</query>
|
||||
|
||||
<query name="node.GetDeletedNodeStatuses">
|
||||
select
|
||||
status
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
join status.transaction as transaction
|
||||
where
|
||||
status.key.protocol = :storeProtocol and
|
||||
status.key.identifier = :storeIdentifier and
|
||||
status.node.id is null and
|
||||
transaction.changeTxnId = :changeTxnId
|
||||
</query>
|
||||
|
||||
<query name="node.GetNodesWithPropertyValuesByActualType">
|
||||
select
|
||||
node
|
||||
|
@@ -59,4 +59,81 @@
|
||||
server.ipAddress = :ipAddress
|
||||
</query>
|
||||
|
||||
<query name="txn.GetLastTxnIdForStore">
|
||||
select
|
||||
max(txn.id)
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
join status.transaction as txn
|
||||
where
|
||||
status.key.protocol = :protocol and
|
||||
status.key.identifier = :identifier
|
||||
</query>
|
||||
|
||||
<query name="txn.CountTransactions">
|
||||
select
|
||||
count(txn.id)
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
||||
</query>
|
||||
|
||||
<query name="txn.GetNextTxns">
|
||||
<![CDATA[
|
||||
select
|
||||
txn
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
||||
where
|
||||
txn.id > :lastTxnId
|
||||
order by
|
||||
txn.id
|
||||
]]>
|
||||
</query>
|
||||
|
||||
<query name="txn.GetTxnUpdateCountForStore">
|
||||
select
|
||||
count(status.key.guid)
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
join status.transaction as txn
|
||||
where
|
||||
txn.id = :txnId and
|
||||
status.node is not null and
|
||||
status.key.protocol = :protocol and
|
||||
status.key.identifier = :identifier
|
||||
</query>
|
||||
|
||||
<query name="txn.GetTxnDeleteCountForStore">
|
||||
select
|
||||
count(status.key.guid)
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
join status.transaction as txn
|
||||
where
|
||||
txn.id = :txnId and
|
||||
status.node is null and
|
||||
status.key.protocol = :protocol and
|
||||
status.key.identifier = :identifier
|
||||
</query>
|
||||
|
||||
<query name="txn.GetTxnChangesForStore">
|
||||
select
|
||||
status
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
where
|
||||
status.transaction.id = :txnId and
|
||||
status.key.protocol = :protocol and
|
||||
status.key.identifier = :identifier
|
||||
</query>
|
||||
|
||||
<query name="txn.GetTxnChanges">
|
||||
select
|
||||
status
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
where
|
||||
status.transaction.id = :txnId
|
||||
</query>
|
||||
|
||||
</hibernate-mapping>
|
||||
|
Reference in New Issue
Block a user