org.alfresco.repo.domain.node.ibatis
Class NodeDAOImpl

java.lang.Object
  extended by org.alfresco.repo.domain.node.AbstractNodeDAOImpl
      extended by org.alfresco.repo.domain.node.ibatis.NodeDAOImpl
All Implemented Interfaces:
org.alfresco.ibatis.BatchingDAO, NodeDAO, NodeBulkLoader
Direct Known Subclasses:
NodeDAOImpl.MSSQL

public class NodeDAOImpl
extends AbstractNodeDAOImpl

iBatis-specific extension of the Node abstract DAO

Since:
3.4

Nested Class Summary
static class NodeDAOImpl.MSSQL
          MSSQL requires some overrides to handle specific behaviour.
 
Nested classes/interfaces inherited from interface org.alfresco.repo.domain.node.NodeDAO
NodeDAO.ChildAssocRefQueryCallback, NodeDAO.NodeRefQueryCallback
 
Field Summary
 
Fields inherited from class org.alfresco.repo.domain.node.AbstractNodeDAOImpl
isDebugEnabled, logger, LONG_ZERO
 
Constructor Summary
NodeDAOImpl()
           
 
Method Summary
protected  int deleteChildAssocById(java.lang.Long assocId)
           
protected  int deleteChildAssocsToAndFrom(java.lang.Long nodeId)
           
protected  int deleteNodeAspects(java.lang.Long nodeId, java.util.Set qnameIds)
           
protected  int deleteNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId)
           
protected  int deleteNodeAssocs(java.util.List ids)
           
protected  int deleteNodeAssocsToAndFrom(java.lang.Long nodeId)
           
protected  int deleteNodeAssocsToAndFrom(java.lang.Long nodeId, java.util.Set assocTypeQNameIds)
           
protected  int deleteNodeById(java.lang.Long nodeId, boolean deletedOnly)
           
protected  int deleteNodeProperties(java.lang.Long nodeId, java.util.List propKeys)
           
protected  int deleteNodeProperties(java.lang.Long nodeId, java.util.Set qnameIds)
           
protected  int deleteNodesByCommitTime(boolean deletedOnly, long maxTxnCommitTimeMs)
           
protected  void deleteSubscriptions(java.lang.Long nodeId)
          The default implementation relies on ON DELETE CASCADE and the subscriptions avoiding deleted nodes - NoOp.
protected  int deleteTransaction(java.lang.Long txnId)
           
 void executeBatch()
           
 java.util.List getChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int maxResults, boolean preload)
          Gets the first n child associations of a given parent node, optionally filtering on association QName and association type QName.
protected  java.lang.Long insertChildAssoc(ChildAssocEntity assoc)
           
protected  java.lang.Long insertNode(NodeEntity node)
           
protected  void insertNodeAspect(java.lang.Long nodeId, java.lang.Long qnameId)
           
protected  java.lang.Long insertNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId, int assocIndex)
           
protected  void insertNodeProperties(java.lang.Long nodeId, java.util.Map persistableProps)
           
protected  java.lang.Long insertServer(java.lang.String ipAddress)
           
protected  java.lang.Long insertStore(StoreEntity store)
           
protected  java.lang.Long insertTransaction(java.lang.Long serverId, java.lang.String changeTxnId, java.lang.Long commitTimeMs)
           
protected  void moveNodeData(java.lang.Long fromNodeId, java.lang.Long toNodeId)
          Moves all node-linked data from one node to another.
protected  java.util.List selectAllStores()
           
protected  ChildAssocEntity selectChildAssoc(java.lang.Long assocId)
           
protected  java.util.List selectChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)
           
protected  ChildAssocEntity selectChildAssoc(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childName)
           
protected  void selectChildAssocs(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, java.lang.Boolean isPrimary, java.lang.Boolean sameStore, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
          Parameters are all optional except the parent node ID and the callback
protected  void selectChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.util.Collection childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
           
protected  void selectChildAssocs(java.lang.Long parentNodeId, java.util.Set assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
           
protected  void selectChildAssocsByChildTypes(java.lang.Long parentNodeId, java.util.Set childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
           
protected  void selectChildAssocsByPropertyValue(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName propertyQName, NodePropertyValue nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
           
protected  void selectChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
           
protected  Transaction selectLastTxnBeforeCommitTime(java.lang.Long maxCommitTime)
           
protected  java.lang.Long selectMaxTxnCommitTime()
           
protected  java.lang.Long selectMinTxnCommitTime()
           
protected  java.util.Set selectNodeAspectIds(java.lang.Long nodeId)
           
protected  java.util.List selectNodeAspects(java.util.Set nodeIds)
           
protected  NodeAssocEntity selectNodeAssocById(java.lang.Long assocId)
           
protected  int selectNodeAssocMaxIndex(java.lang.Long sourceNodeId, java.lang.Long assocTypeQNameId)
           
protected  java.util.List selectNodeAssocsBySource(java.lang.Long sourceNodeId, java.lang.Long typeQNameId)
           
protected  java.util.List selectNodeAssocsByTarget(java.lang.Long targetNodeId, java.lang.Long typeQNameId)
           
protected  NodeEntity selectNodeById(java.lang.Long id, java.lang.Boolean deleted)
           
protected  NodeEntity selectNodeByNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.Boolean deleted)
           
protected  java.util.Map selectNodeProperties(java.lang.Long nodeId)
           
protected  java.util.Map selectNodeProperties(java.lang.Long nodeId, java.util.Set qnameIds)
           
protected  java.util.Map selectNodeProperties(java.util.Set nodeIds)
           
protected  java.util.List selectNodesByIds(java.util.SortedSet ids)
           
protected  java.util.List selectNodesByUuids(java.lang.Long storeId, java.util.SortedSet uuids)
           
protected  void selectNodesWithAspects(java.util.List qnameIds, java.lang.Long minNodeId, java.lang.Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)
           
protected  java.util.List selectParentAssocs(java.lang.Long childNodeId)
           
protected  void selectParentAssocs(java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, java.lang.Boolean isPrimary, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
          Parameters are all optional except the parent node ID and the callback
 java.util.List selectPrimaryChildAcls(java.lang.Long nodeId)
           
protected  java.util.List selectPrimaryParentAssocs(java.lang.Long childNodeId)
          No DB constraint, so multiple returned
 java.util.List selectProperties(java.util.Collection propertyDefs)
          Used by the re-encryptor to re-encrypt encryptable properties with a new encryption key.
protected  ServerEntity selectServer(java.lang.String ipAddress)
           
protected  NodeEntity selectStoreRootNode(java.lang.Long storeId)
           
protected  NodeEntity selectStoreRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)
           
protected  int selectTransactionCount()
           
protected  Transaction selectTxnById(java.lang.Long txnId)
           
protected  java.util.List selectTxnChanges(java.lang.Long txnId, java.lang.Long storeId)
           
protected  int selectTxnNodeChangeCount(java.lang.Long txnId, java.lang.Boolean updates)
           
protected  java.util.List selectTxns(java.lang.Long fromTimeInclusive, java.lang.Long toTimeExclusive, java.lang.Integer count, java.util.List includeTxnIds, java.util.List excludeTxnIds, java.lang.Long excludeServerId, java.lang.Boolean ascending)
           
protected  java.util.List selectTxnsUnused(java.lang.Long minTxnId, java.lang.Long maxCommitTime, java.lang.Integer count)
           
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
           
 void setQnameDAO(QNameDAO qnameDAO)
           
 void setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)
           
 void startBatch()
           
protected  int updateChildAssocIndex(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int index)
           
protected  int updateChildAssocsUniqueName(java.lang.Long childNodeId, java.lang.String name)
           
protected  int updateNode(NodeUpdateEntity nodeUpdate)
           
protected  int updateNodeAssoc(java.lang.Long id, int assocIndex)
           
protected  int updateNodePatchAcl(NodeUpdateEntity nodeUpdate)
           
protected  void updatePrimaryChildrenSharedAclId(java.lang.Long primaryParentNodeId, java.lang.Long optionalOldSharedAlcIdInAdditionToNull, java.lang.Long newSharedAlcId)
           
protected  int updatePrimaryParentAssocs(java.lang.Long childNodeId, java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, java.lang.String childNodeName)
           
protected  int updateStore(StoreEntity store)
           
protected  int updateStoreRoot(StoreEntity store)
           
protected  int updateTransaction(java.lang.Long txnId, java.lang.Long commitTimeMs)
           
 
Methods inherited from class org.alfresco.repo.domain.node.AbstractNodeDAOImpl
addNodeAspects, addNodeProperties, addNodeProperty, cacheNodes, cacheNodesById, clear, cycleCheck, deleteChildAssoc, deleteNode, exists, exists, exists, getAllRootNodes, getChildAssoc, getChildAssoc, getChildAssoc, getChildAssocs, getChildAssocs, getChildAssocs, getChildAssocsByChildTypes, getChildAssocsByPropertyValue, getChildAssocsWithoutParentAssocsOfType, getCurrentTransactionId, getMaxTxnCommitTime, getMaxTxnIdByCommitTime, getMinTxnCommitTime, getNodeAclId, getNodeAspects, getNodeAssoc, getNodeAssocOrNull, getNodePair, getNodePair, getNodeProperties, getNodeProperty, getNodeRefStatus, getNodesWithAspects, getNodeType, getParentAssocs, getPaths, getPrimaryChildrenAcls, getPrimaryParentAssoc, getRootNode, getSourceNodeAssocs, getStores, getTargetNodeAssocs, getTransactionCount, getTxnById, getTxnChanges, getTxnChangesForStore, getTxnDeleteCount, getTxnsByCommitTimeAscending, getTxnsByCommitTimeAscending, getTxnsByCommitTimeDescending, getTxnsUnused, getTxnUpdateCount, hasNodeAspect, init, isInCurrentTxn, moveNode, moveStore, newChildAssoc, newNode, newNodeAssoc, newStore, purgeNodes, purgeTxn, removeNodeAspects, removeNodeAspects, removeNodeAssoc, removeNodeAssocs, removeNodeAssocsToAndFrom, removeNodeAssocsToAndFrom, removeNodeProperties, setAccessControlListDAO, setAclDAO, setAllRootNodesCache, setAspectsCache, setChildAssocIndex, setChildAssocsUniqueName, setContentDataDAO, setControlDAO, setLocaleDAO, setModifiedDate, setNodeAclId, setNodeAssocIndex, setNodeDefiningAclId, setNodeProperties, setNodesCache, setParentAssocsCache, setPolicyBehaviourFilter, setPrimaryChildrenSharedAclId, setPropertiesCache, setRootNodesCache, setTransactionService, setUsageDAO, updateNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeDAOImpl

public NodeDAOImpl()
Method Detail

setSqlSessionTemplate

public void setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)

setQnameDAO

public void setQnameDAO(QNameDAO qnameDAO)
Overrides:
setQnameDAO in class AbstractNodeDAOImpl
Parameters:
qnameDAO - translates QName IDs into QName instances and vice-versa

setDictionaryService

public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Overrides:
setDictionaryService in class AbstractNodeDAOImpl
Parameters:
dictionaryService - the service help determine cm:auditable characteristics

startBatch

public void startBatch()

executeBatch

public void executeBatch()

selectServer

protected ServerEntity selectServer(java.lang.String ipAddress)
Specified by:
selectServer in class AbstractNodeDAOImpl

insertServer

protected java.lang.Long insertServer(java.lang.String ipAddress)
Specified by:
insertServer in class AbstractNodeDAOImpl

insertTransaction

protected java.lang.Long insertTransaction(java.lang.Long serverId,
                                           java.lang.String changeTxnId,
                                           java.lang.Long commitTimeMs)
Specified by:
insertTransaction in class AbstractNodeDAOImpl

updateTransaction

protected int updateTransaction(java.lang.Long txnId,
                                java.lang.Long commitTimeMs)
Specified by:
updateTransaction in class AbstractNodeDAOImpl

deleteTransaction

protected int deleteTransaction(java.lang.Long txnId)
Specified by:
deleteTransaction in class AbstractNodeDAOImpl

selectAllStores

protected java.util.List selectAllStores()
Specified by:
selectAllStores in class AbstractNodeDAOImpl

selectStoreRootNode

protected NodeEntity selectStoreRootNode(java.lang.Long storeId)
Specified by:
selectStoreRootNode in class AbstractNodeDAOImpl

selectStoreRootNode

protected NodeEntity selectStoreRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)
Specified by:
selectStoreRootNode in class AbstractNodeDAOImpl

insertStore

protected java.lang.Long insertStore(StoreEntity store)
Specified by:
insertStore in class AbstractNodeDAOImpl

updateStoreRoot

protected int updateStoreRoot(StoreEntity store)
Specified by:
updateStoreRoot in class AbstractNodeDAOImpl

updateStore

protected int updateStore(StoreEntity store)
Specified by:
updateStore in class AbstractNodeDAOImpl

insertNode

protected java.lang.Long insertNode(NodeEntity node)
Specified by:
insertNode in class AbstractNodeDAOImpl

updateNode

protected int updateNode(NodeUpdateEntity nodeUpdate)
Specified by:
updateNode in class AbstractNodeDAOImpl

updateNodePatchAcl

protected int updateNodePatchAcl(NodeUpdateEntity nodeUpdate)
Specified by:
updateNodePatchAcl in class AbstractNodeDAOImpl

updatePrimaryChildrenSharedAclId

protected void updatePrimaryChildrenSharedAclId(java.lang.Long primaryParentNodeId,
                                                java.lang.Long optionalOldSharedAlcIdInAdditionToNull,
                                                java.lang.Long newSharedAlcId)
Specified by:
updatePrimaryChildrenSharedAclId in class AbstractNodeDAOImpl

deleteNodeById

protected int deleteNodeById(java.lang.Long nodeId,
                             boolean deletedOnly)
Specified by:
deleteNodeById in class AbstractNodeDAOImpl

deleteNodesByCommitTime

protected int deleteNodesByCommitTime(boolean deletedOnly,
                                      long maxTxnCommitTimeMs)
Specified by:
deleteNodesByCommitTime in class AbstractNodeDAOImpl

selectNodeById

protected NodeEntity selectNodeById(java.lang.Long id,
                                    java.lang.Boolean deleted)
Specified by:
selectNodeById in class AbstractNodeDAOImpl

selectNodeByNodeRef

protected NodeEntity selectNodeByNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                         java.lang.Boolean deleted)
Specified by:
selectNodeByNodeRef in class AbstractNodeDAOImpl

selectNodesByUuids

protected java.util.List selectNodesByUuids(java.lang.Long storeId,
                                            java.util.SortedSet uuids)
Specified by:
selectNodesByUuids in class AbstractNodeDAOImpl

selectNodesByIds

protected java.util.List selectNodesByIds(java.util.SortedSet ids)
Specified by:
selectNodesByIds in class AbstractNodeDAOImpl

selectNodeAspects

protected java.util.List selectNodeAspects(java.util.Set nodeIds)
Specified by:
selectNodeAspects in class AbstractNodeDAOImpl

selectNodeProperties

protected java.util.Map selectNodeProperties(java.util.Set nodeIds)
Specified by:
selectNodeProperties in class AbstractNodeDAOImpl

selectNodeProperties

protected java.util.Map selectNodeProperties(java.lang.Long nodeId)
Specified by:
selectNodeProperties in class AbstractNodeDAOImpl

selectNodeProperties

protected java.util.Map selectNodeProperties(java.lang.Long nodeId,
                                             java.util.Set qnameIds)
Specified by:
selectNodeProperties in class AbstractNodeDAOImpl

deleteNodeProperties

protected int deleteNodeProperties(java.lang.Long nodeId,
                                   java.util.Set qnameIds)
Specified by:
deleteNodeProperties in class AbstractNodeDAOImpl

deleteNodeProperties

protected int deleteNodeProperties(java.lang.Long nodeId,
                                   java.util.List propKeys)
Specified by:
deleteNodeProperties in class AbstractNodeDAOImpl

insertNodeProperties

protected void insertNodeProperties(java.lang.Long nodeId,
                                    java.util.Map persistableProps)
Specified by:
insertNodeProperties in class AbstractNodeDAOImpl

selectNodeAspectIds

protected java.util.Set selectNodeAspectIds(java.lang.Long nodeId)
Specified by:
selectNodeAspectIds in class AbstractNodeDAOImpl

insertNodeAspect

protected void insertNodeAspect(java.lang.Long nodeId,
                                java.lang.Long qnameId)
Specified by:
insertNodeAspect in class AbstractNodeDAOImpl

deleteNodeAspects

protected int deleteNodeAspects(java.lang.Long nodeId,
                                java.util.Set qnameIds)
Specified by:
deleteNodeAspects in class AbstractNodeDAOImpl

selectNodesWithAspects

protected void selectNodesWithAspects(java.util.List qnameIds,
                                      java.lang.Long minNodeId,
                                      java.lang.Long maxNodeId,
                                      NodeDAO.NodeRefQueryCallback resultsCallback)
Specified by:
selectNodesWithAspects in class AbstractNodeDAOImpl

insertNodeAssoc

protected java.lang.Long insertNodeAssoc(java.lang.Long sourceNodeId,
                                         java.lang.Long targetNodeId,
                                         java.lang.Long assocTypeQNameId,
                                         int assocIndex)
Specified by:
insertNodeAssoc in class AbstractNodeDAOImpl

updateNodeAssoc

protected int updateNodeAssoc(java.lang.Long id,
                              int assocIndex)
Specified by:
updateNodeAssoc in class AbstractNodeDAOImpl

deleteNodeAssoc

protected int deleteNodeAssoc(java.lang.Long sourceNodeId,
                              java.lang.Long targetNodeId,
                              java.lang.Long assocTypeQNameId)
Specified by:
deleteNodeAssoc in class AbstractNodeDAOImpl

deleteNodeAssocsToAndFrom

protected int deleteNodeAssocsToAndFrom(java.lang.Long nodeId)
Specified by:
deleteNodeAssocsToAndFrom in class AbstractNodeDAOImpl

deleteNodeAssocsToAndFrom

protected int deleteNodeAssocsToAndFrom(java.lang.Long nodeId,
                                        java.util.Set assocTypeQNameIds)
Specified by:
deleteNodeAssocsToAndFrom in class AbstractNodeDAOImpl

deleteNodeAssocs

protected int deleteNodeAssocs(java.util.List ids)
Specified by:
deleteNodeAssocs in class AbstractNodeDAOImpl

selectNodeAssocsBySource

protected java.util.List selectNodeAssocsBySource(java.lang.Long sourceNodeId,
                                                  java.lang.Long typeQNameId)
Specified by:
selectNodeAssocsBySource in class AbstractNodeDAOImpl

selectNodeAssocsByTarget

protected java.util.List selectNodeAssocsByTarget(java.lang.Long targetNodeId,
                                                  java.lang.Long typeQNameId)
Specified by:
selectNodeAssocsByTarget in class AbstractNodeDAOImpl

selectNodeAssocById

protected NodeAssocEntity selectNodeAssocById(java.lang.Long assocId)
Specified by:
selectNodeAssocById in class AbstractNodeDAOImpl

selectNodeAssocMaxIndex

protected int selectNodeAssocMaxIndex(java.lang.Long sourceNodeId,
                                      java.lang.Long assocTypeQNameId)
Specified by:
selectNodeAssocMaxIndex in class AbstractNodeDAOImpl

insertChildAssoc

protected java.lang.Long insertChildAssoc(ChildAssocEntity assoc)
Specified by:
insertChildAssoc in class AbstractNodeDAOImpl

deleteChildAssocById

protected int deleteChildAssocById(java.lang.Long assocId)
Specified by:
deleteChildAssocById in class AbstractNodeDAOImpl

updateChildAssocIndex

protected int updateChildAssocIndex(java.lang.Long parentNodeId,
                                    java.lang.Long childNodeId,
                                    org.alfresco.service.namespace.QName assocTypeQName,
                                    org.alfresco.service.namespace.QName assocQName,
                                    int index)
Specified by:
updateChildAssocIndex in class AbstractNodeDAOImpl

updateChildAssocsUniqueName

protected int updateChildAssocsUniqueName(java.lang.Long childNodeId,
                                          java.lang.String name)
Specified by:
updateChildAssocsUniqueName in class AbstractNodeDAOImpl

deleteChildAssocsToAndFrom

protected int deleteChildAssocsToAndFrom(java.lang.Long nodeId)
Specified by:
deleteChildAssocsToAndFrom in class AbstractNodeDAOImpl

selectChildAssoc

protected ChildAssocEntity selectChildAssoc(java.lang.Long assocId)
Specified by:
selectChildAssoc in class AbstractNodeDAOImpl

selectPrimaryChildAcls

public java.util.List selectPrimaryChildAcls(java.lang.Long nodeId)
Specified by:
selectPrimaryChildAcls in class AbstractNodeDAOImpl

selectChildAssoc

protected java.util.List selectChildAssoc(java.lang.Long parentNodeId,
                                          java.lang.Long childNodeId,
                                          org.alfresco.service.namespace.QName assocTypeQName,
                                          org.alfresco.service.namespace.QName assocQName)
Specified by:
selectChildAssoc in class AbstractNodeDAOImpl

selectChildAssocs

protected void selectChildAssocs(java.lang.Long parentNodeId,
                                 java.lang.Long childNodeId,
                                 org.alfresco.service.namespace.QName assocTypeQName,
                                 org.alfresco.service.namespace.QName assocQName,
                                 java.lang.Boolean isPrimary,
                                 java.lang.Boolean sameStore,
                                 NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Description copied from class: AbstractNodeDAOImpl
Parameters are all optional except the parent node ID and the callback

Specified by:
selectChildAssocs in class AbstractNodeDAOImpl

getChildAssocs

public java.util.List getChildAssocs(java.lang.Long parentNodeId,
                                     org.alfresco.service.namespace.QName assocTypeQName,
                                     org.alfresco.service.namespace.QName assocQName,
                                     int maxResults,
                                     boolean preload)
Description copied from interface: NodeDAO
Gets the first n child associations of a given parent node, optionally filtering on association QName and association type QName.

This is an efficient query for node paths.

Parameters:
parentNodeId - the parent node ID
assocTypeQName - the association type qname to filter on; null for no filtering
assocQName - the association qname to filter on; null for no filtering
maxResults - the maximum number of results to return. The query will be terminated efficiently after that number of results
preload - should the child nodes be batch loaded?
Returns:
a list of child associations

selectChildAssocs

protected void selectChildAssocs(java.lang.Long parentNodeId,
                                 java.util.Set assocTypeQNames,
                                 NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Specified by:
selectChildAssocs in class AbstractNodeDAOImpl

selectChildAssoc

protected ChildAssocEntity selectChildAssoc(java.lang.Long parentNodeId,
                                            org.alfresco.service.namespace.QName assocTypeQName,
                                            java.lang.String childName)
Specified by:
selectChildAssoc in class AbstractNodeDAOImpl

selectChildAssocs

protected void selectChildAssocs(java.lang.Long parentNodeId,
                                 org.alfresco.service.namespace.QName assocTypeQName,
                                 java.util.Collection childNames,
                                 NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Specified by:
selectChildAssocs in class AbstractNodeDAOImpl

selectChildAssocsByChildTypes

protected void selectChildAssocsByChildTypes(java.lang.Long parentNodeId,
                                             java.util.Set childNodeTypeQNames,
                                             NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Specified by:
selectChildAssocsByChildTypes in class AbstractNodeDAOImpl

selectChildAssocsWithoutParentAssocsOfType

protected void selectChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId,
                                                          org.alfresco.service.namespace.QName assocTypeQName,
                                                          NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Specified by:
selectChildAssocsWithoutParentAssocsOfType in class AbstractNodeDAOImpl

selectPrimaryParentAssocs

protected java.util.List selectPrimaryParentAssocs(java.lang.Long childNodeId)
Description copied from class: AbstractNodeDAOImpl
No DB constraint, so multiple returned

Specified by:
selectPrimaryParentAssocs in class AbstractNodeDAOImpl

selectParentAssocs

protected void selectParentAssocs(java.lang.Long childNodeId,
                                  org.alfresco.service.namespace.QName assocTypeQName,
                                  org.alfresco.service.namespace.QName assocQName,
                                  java.lang.Boolean isPrimary,
                                  NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Description copied from class: AbstractNodeDAOImpl
Parameters are all optional except the parent node ID and the callback

Specified by:
selectParentAssocs in class AbstractNodeDAOImpl

selectParentAssocs

protected java.util.List selectParentAssocs(java.lang.Long childNodeId)
Specified by:
selectParentAssocs in class AbstractNodeDAOImpl

updatePrimaryParentAssocs

protected int updatePrimaryParentAssocs(java.lang.Long childNodeId,
                                        java.lang.Long parentNodeId,
                                        org.alfresco.service.namespace.QName assocTypeQName,
                                        org.alfresco.service.namespace.QName assocQName,
                                        java.lang.String childNodeName)
Specified by:
updatePrimaryParentAssocs in class AbstractNodeDAOImpl

moveNodeData

protected void moveNodeData(java.lang.Long fromNodeId,
                            java.lang.Long toNodeId)
Description copied from class: AbstractNodeDAOImpl
Moves all node-linked data from one node to another. The source node will be left in an orphaned state and without any attached data other than the current transaction.

Specified by:
moveNodeData in class AbstractNodeDAOImpl
Parameters:
fromNodeId - the source node
toNodeId - the target node

deleteSubscriptions

protected void deleteSubscriptions(java.lang.Long nodeId)
The default implementation relies on ON DELETE CASCADE and the subscriptions avoiding deleted nodes - NoOp.

Specified by:
deleteSubscriptions in class AbstractNodeDAOImpl

selectLastTxnBeforeCommitTime

protected Transaction selectLastTxnBeforeCommitTime(java.lang.Long maxCommitTime)
Specified by:
selectLastTxnBeforeCommitTime in class AbstractNodeDAOImpl

selectTransactionCount

protected int selectTransactionCount()
Specified by:
selectTransactionCount in class AbstractNodeDAOImpl

selectTxnById

protected Transaction selectTxnById(java.lang.Long txnId)
Specified by:
selectTxnById in class AbstractNodeDAOImpl

selectTxnChanges

protected java.util.List selectTxnChanges(java.lang.Long txnId,
                                          java.lang.Long storeId)
Specified by:
selectTxnChanges in class AbstractNodeDAOImpl

selectTxnNodeChangeCount

protected int selectTxnNodeChangeCount(java.lang.Long txnId,
                                       java.lang.Boolean updates)
Specified by:
selectTxnNodeChangeCount in class AbstractNodeDAOImpl
Parameters:
txnId - the transaction ID (never null)
updates - TRUE to select node updates, FALSE to select node deletions or null to select all changes.
Returns:
Returns the number of nodes affected by the transaction

selectTxns

protected java.util.List selectTxns(java.lang.Long fromTimeInclusive,
                                    java.lang.Long toTimeExclusive,
                                    java.lang.Integer count,
                                    java.util.List includeTxnIds,
                                    java.util.List excludeTxnIds,
                                    java.lang.Long excludeServerId,
                                    java.lang.Boolean ascending)
Specified by:
selectTxns in class AbstractNodeDAOImpl

selectTxnsUnused

protected java.util.List selectTxnsUnused(java.lang.Long minTxnId,
                                          java.lang.Long maxCommitTime,
                                          java.lang.Integer count)
Specified by:
selectTxnsUnused in class AbstractNodeDAOImpl

selectMinTxnCommitTime

protected java.lang.Long selectMinTxnCommitTime()
Specified by:
selectMinTxnCommitTime in class AbstractNodeDAOImpl

selectMaxTxnCommitTime

protected java.lang.Long selectMaxTxnCommitTime()
Specified by:
selectMaxTxnCommitTime in class AbstractNodeDAOImpl

selectChildAssocsByPropertyValue

protected void selectChildAssocsByPropertyValue(java.lang.Long parentNodeId,
                                                org.alfresco.service.namespace.QName propertyQName,
                                                NodePropertyValue nodeValue,
                                                NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Specified by:
selectChildAssocsByPropertyValue in class AbstractNodeDAOImpl

selectProperties

public java.util.List selectProperties(java.util.Collection propertyDefs)
Description copied from interface: NodeDAO
Used by the re-encryptor to re-encrypt encryptable properties with a new encryption key.

Returns:


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.