use of org.alfresco.repo.domain.node.TransactionQueryEntity in project alfresco-repository by Alfresco.
the class NodeDAOImpl method selectTxnsUnused.
@Override
protected List<Long> selectTxnsUnused(Long minTxnId, Long maxCommitTime, Integer count) {
TransactionQueryEntity query = new TransactionQueryEntity();
query.setMinId(minTxnId);
query.setMaxCommitTime(maxCommitTime);
if (count == null) {
return template.selectList(SELECT_TXNS_UNUSED, query);
} else {
return template.selectList(SELECT_TXNS_UNUSED, query, new RowBounds(0, count));
}
}
use of org.alfresco.repo.domain.node.TransactionQueryEntity in project alfresco-repository by Alfresco.
the class NodeDAOImpl method selectTxnById.
@Override
protected Transaction selectTxnById(Long txnId) {
TransactionQueryEntity query = new TransactionQueryEntity();
query.setId(txnId);
return template.selectOne(SELECT_TXNS, query);
}
use of org.alfresco.repo.domain.node.TransactionQueryEntity in project alfresco-repository by Alfresco.
the class NodeDAOImpl method selectMinTxnCommitTimeForDeletedNodes.
@Override
protected Long selectMinTxnCommitTimeForDeletedNodes() {
// Get the deleted nodes
Pair<Long, QName> deletedTypePair = qnameDAO.getQName(ContentModel.TYPE_DELETED);
if (deletedTypePair == null) {
// Nothing to do
return LONG_ZERO;
}
TransactionQueryEntity txnQuery = new TransactionQueryEntity();
txnQuery.setTypeQNameId(deletedTypePair.getFirst());
return (Long) template.selectOne(SELECT_TXN_MIN_COMMIT_TIME_FOR_NODE_TYPE, txnQuery);
}
use of org.alfresco.repo.domain.node.TransactionQueryEntity in project alfresco-repository by Alfresco.
the class NodeDAOImpl method selectLastTxnBeforeCommitTime.
@Override
protected Transaction selectLastTxnBeforeCommitTime(Long maxCommitTime) {
Assert.notNull(maxCommitTime, "maxCommitTime");
TransactionQueryEntity query = new TransactionQueryEntity();
query.setMaxCommitTime(maxCommitTime);
List<Transaction> txns = template.selectList(SELECT_TXN_LAST, query, new RowBounds(0, 1));
if (txns.size() > 0) {
return txns.get(0);
} else {
return null;
}
}
use of org.alfresco.repo.domain.node.TransactionQueryEntity in project alfresco-repository by Alfresco.
the class NodeDAOImpl method selectTxnChanges.
@Override
protected List<NodeEntity> selectTxnChanges(Long txnId, Long storeId) {
TransactionQueryEntity query = new TransactionQueryEntity();
query.setId(txnId);
if (storeId != null) {
query.setStoreId(storeId);
}
// TODO: Return List<Node> for quicker node_deleted access
return template.selectList(SELECT_TXN_NODES, query);
}
Aggregations