Class NodeDAOImpl
- java.lang.Object
-
- org.alfresco.repo.domain.node.AbstractNodeDAOImpl
-
- org.alfresco.repo.domain.node.ibatis.NodeDAOImpl
-
- All Implemented Interfaces:
BatchingDAO,NodeDAO,NodeBulkLoader
- Direct Known Subclasses:
NodeDAOImpl.MSSQL,NodeDAOImpl.MySQL
public class NodeDAOImpl extends AbstractNodeDAOImpl
iBatis-specific extension of the Node abstract DAO- Since:
- 3.4
- Author:
- Derek Hulley
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNodeDAOImpl.MSSQLMSSQL requires some overrides to handle specific behaviour.static classNodeDAOImpl.MySQLMySQL (InnoDB) specific DAO overridesstatic classNodeDAOImpl.MySQLClusterNDBMySQL Cluster NDB specific DAO overrides WARNING: Experimental/unsupported - see MySQLClusterNDBDialect !-
Nested classes/interfaces inherited from interface org.alfresco.repo.domain.node.NodeDAO
NodeDAO.ChildAssocRefQueryCallback, NodeDAO.NodeRefQueryCallback, NodeDAO.NodeView
-
-
Field Summary
Fields Modifier and Type Field Description protected org.alfresco.service.cmr.dictionary.DictionaryServicedictionaryServiceprotected QNameDAOqnameDAO-
Fields inherited from class org.alfresco.repo.domain.node.AbstractNodeDAOImpl
isDebugEnabled, logger, LONG_ZERO
-
-
Constructor Summary
Constructors Constructor Description NodeDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountChildAssocsByParent(java.lang.Long parentNodeId, boolean isPrimary)Counts the number of child associations directly under parentNodeId.protected intdeleteChildAssocs(java.util.List<java.lang.Long> ids)protected intdeleteNodeAspects(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)protected intdeleteNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId)protected intdeleteNodeAssocs(java.util.List<java.lang.Long> ids)protected intdeleteNodeById(java.lang.Long nodeId)protected intdeleteNodeProperties(java.lang.Long nodeId, java.util.List<NodePropertyKey> propKeys)protected intdeleteNodeProperties(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)protected intdeleteNodesByCommitTime(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)protected voiddeleteSubscriptions(java.lang.Long nodeId)The default implementation relies on ON DELETE CASCADE and the subscriptions avoiding deleted nodes - NoOp.protected intdeleteTransaction(java.lang.Long txnId)intdeleteTxnsUnused(long fromCommitTime, long toCommitTime)Remove unused transactions from commit time 'fromCommitTime' to commit time 'toCommitTime'voidexecuteBatch()Write a batch of insert or update commandsjava.lang.LonggetMaxNodeId()java.lang.LonggetMinNodeId()org.alfresco.util.Pair<java.lang.Long,java.lang.Long>getNodeIdsIntervalForType(org.alfresco.service.namespace.QName type, java.lang.Long startTxnTime, java.lang.Long endTxnTime)Returns the [minId, maxId] interval for nodes of a type, with the transaction time in the given window time.java.util.List<Transaction>getOneTxnsByCommitTimeDescending(java.lang.Long fromTimeInclusive, java.lang.Long toTimeExclusive, boolean remoteOnly)Get most recent transaction made in a given commit time rangeprotected java.lang.LonginsertChildAssoc(ChildAssocEntity assoc)protected java.lang.LonginsertNode(NodeEntity node)protected voidinsertNodeAspect(java.lang.Long nodeId, java.lang.Long qnameId)protected java.lang.LonginsertNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId, int assocIndex)protected voidinsertNodeProperties(java.lang.Long nodeId, java.util.Map<NodePropertyKey,NodePropertyValue> persistableProps)protected java.lang.LonginsertServer(java.lang.String ipAddress)protected java.lang.LonginsertStore(StoreEntity store)protected java.lang.LonginsertTransaction(java.lang.Long serverId, java.lang.String changeTxnId, java.lang.Long commitTimeMs)protected voidmoveNodeData(java.lang.Long fromNodeId, java.lang.Long toNodeId)Moves all node-linked data from one node to another.protected java.util.List<StoreEntity>selectAllStores()protected ChildAssocEntityselectChildAssoc(java.lang.Long assocId)protected java.util.List<ChildAssocEntity>selectChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)protected ChildAssocEntityselectChildAssoc(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childName)protected voidselectChildAssocs(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 callbackprotected voidselectChildAssocs(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected voidselectChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.util.Collection<java.lang.String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)voidselectChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected voidselectChildAssocsByChildTypes(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected voidselectChildAssocsByPropertyValue(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName propertyQName, NodePropertyValue nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback)java.util.List<Node>selectChildAssocsWithoutNodeAssocsOfTypes(java.lang.Long parentNodeId, java.lang.Long minNodeId, java.lang.Long maxNodeId, java.util.Set<org.alfresco.service.namespace.QName> assocTypeQNames)protected voidselectChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected java.util.List<ChildAssocEntity>selectChildNodeIds(java.lang.Long nodeId, java.lang.Boolean isPrimary, java.lang.Long minChildNodeIdInclusive, int maxResults)protected TransactionselectLastTxnBeforeCommitTime(java.lang.Long maxCommitTime)protected java.lang.LongselectMaxTxnCommitTime()protected java.lang.LongselectMaxTxnId()protected java.lang.LongselectMinTxnCommitTime()protected java.lang.LongselectMinTxnCommitTimeForDeletedNodes()protected java.lang.LongselectMinTxnId()protected java.lang.LongselectMinUnusedTxnCommitTime()protected java.util.Map<NodeVersionKey,java.util.Set<org.alfresco.service.namespace.QName>>selectNodeAspects(java.util.Set<java.lang.Long> nodeIds)protected NodeAssocEntityselectNodeAssocById(java.lang.Long assocId)protected intselectNodeAssocMaxIndex(java.lang.Long sourceNodeId, java.lang.Long assocTypeQNameId)protected java.util.List<NodeAssocEntity>selectNodeAssocs(java.lang.Long nodeId)protected java.util.List<NodeAssocEntity>selectNodeAssocsBySource(java.lang.Long sourceNodeId, java.lang.Long typeQNameId)protected java.util.List<NodeAssocEntity>selectNodeAssocsBySourceAndPropertyValue(java.lang.Long sourceNodeId, java.lang.Long typeQNameId, java.lang.Long propertyQNameId, NodePropertyValue nodeValue)protected java.util.List<NodeAssocEntity>selectNodeAssocsByTarget(java.lang.Long targetNodeId, java.lang.Long typeQNameId)protected NodeEntityselectNodeById(java.lang.Long id)protected NodeEntityselectNodeByNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)protected java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>>selectNodeProperties(java.lang.Long nodeId)protected java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>>selectNodeProperties(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)protected java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>>selectNodeProperties(java.util.Set<java.lang.Long> nodeIds)java.util.List<NodePropertyEntity>selectNodePropertiesByDataType(org.alfresco.service.namespace.QName dataType, long minNodeId, long maxNodeId)Select all node properties that are between two node IDs and of the given actual typejava.util.List<NodePropertyEntity>selectNodePropertiesByTypes(java.util.Set<org.alfresco.service.namespace.QName> qnames)Used by the re-encryptor to re-encrypt encryptable properties with a new encryption key.protected java.util.List<Node>selectNodesByIds(java.util.SortedSet<java.lang.Long> ids)protected java.util.List<Node>selectNodesByUuids(java.lang.Long storeId, java.util.SortedSet<java.lang.String> uuids)protected voidselectNodesWithAspects(java.util.List<java.lang.Long> qnameIds, java.lang.Long minNodeId, java.lang.Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)protected java.util.List<ChildAssocEntity>selectParentAssocs(java.lang.Long childNodeId)protected voidselectParentAssocs(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 callbackjava.util.List<NodeIdAndAclId>selectPrimaryChildAcls(java.lang.Long nodeId)protected java.util.List<ChildAssocEntity>selectPrimaryParentAssocs(java.lang.Long childNodeId)No DB constraint, so multiple returnedprotected ServerEntityselectServer(java.lang.String ipAddress)protected StoreEntityselectStore(org.alfresco.service.cmr.repository.StoreRef storeRef)protected NodeEntityselectStoreRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)protected intselectTransactionCount()protected TransactionselectTxnById(java.lang.Long txnId)protected java.util.List<NodeEntity>selectTxnChanges(java.lang.Long txnId, java.lang.Long storeId)protected java.util.List<Transaction>selectTxns(java.lang.Long fromTimeInclusive, java.lang.Long toTimeExclusive, java.lang.Integer count, java.util.List<java.lang.Long> includeTxnIds, java.util.List<java.lang.Long> excludeTxnIds, java.lang.Long excludeServerId, java.lang.Boolean ascending)protected java.util.List<java.lang.Long>selectTxnsUnused(java.lang.Long minTxnId, java.lang.Long maxCommitTime, java.lang.Integer count)voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)voidsetQnameDAO(QNameDAO qnameDAO)voidsetSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)voidstartBatch()Start a batch of insert or update commandsprotected intupdateChildAssocIndex(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int index)protected intupdateChildAssocUniqueName(java.lang.Long assocId, java.lang.String name)protected intupdateNode(NodeUpdateEntity nodeUpdate)protected intupdateNodeAssoc(java.lang.Long id, int assocIndex)protected intupdateNodes(java.lang.Long txnId, java.util.List<java.lang.Long> nodeIds)protected intupdateNodesInStore(java.lang.Long txnId, java.lang.Long storeId)protected voidupdatePrimaryChildrenSharedAclId(java.lang.Long txnId, java.lang.Long primaryParentNodeId, java.lang.Long optionalOldSharedAlcIdInAdditionToNull, java.lang.Long newSharedAlcId)protected intupdatePrimaryParentAssocs(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 intupdateStore(StoreEntity store)protected intupdateStoreRoot(StoreEntity store)protected intupdateTransaction(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, getCachedAncestors, getChildAssoc, getChildAssoc, getChildAssoc, getChildAssocs, getChildAssocs, getChildAssocs, getChildAssocs, getChildAssocsByChildTypes, getChildAssocsByPropertyValue, getChildAssocsWithoutParentAssocsOfType, getCurrentTransactionId, getMaxTxnCommitTime, getMaxTxnId, getMaxTxnIdByCommitTime, getMinTxnCommitTime, getMinTxnCommitTimeForDeletedNodes, getMinTxnId, getMinUnusedTxnCommitTime, getNodeAclId, getNodeAspects, getNodeAssoc, getNodeAssocOrNull, getNodeAssocsToAndFrom, getNodeIdStatus, getNodePair, getNodePair, getNodeProperties, getNodeProperty, getNodeRefStatus, getNodesWithAspects, getNodeType, getParentAssocs, getPaths, getPrimaryChildrenAcls, getPrimaryParentAssoc, getRootNode, getServerId, getSourceNodeAssocs, getStore, getStores, getTargetAssocsByPropertyValue, getTargetNodeAssocs, getTransactionCount, getTxnById, getTxnChanges, getTxnChangesForStore, getTxnsByCommitTimeAscending, getTxnsByCommitTimeAscending, getTxnsByCommitTimeDescending, getTxnsUnused, hasNodeAspect, init, isInCurrentTxn, moveNode, moveStore, newChildAssoc, newChildAssocInsert, newChildAssocInsertImpl, newNode, newNodeAssoc, newNodeImplInsert, newStore, purgeNodes, purgeTxn, removeNodeAspects, removeNodeAspects, removeNodeAssoc, removeNodeAssocs, removeNodeProperties, setAccessControlListDAO, setAclDAO, setAllRootNodesCache, setAspectsCache, setCachingThreshold, setCheckNodeConsistency, setChildAssocIndex, setChildAssocsUniqueName, setChildAssocsUniqueNameImpl, setChildByNameCache, setContentDataDAO, setControlDAO, setLocaleDAO, setModifiedDate, setModifiedProperties, setNodeAclId, setNodeAssocIndex, setNodeProperties, setNodesCache, setParentAssocsCacheLimitFactor, setParentAssocsCacheSize, setPolicyBehaviourFilter, setPrimaryChildrenSharedAclId, setPropertiesCache, setRootNodesCache, setTransactionService, setUsageDAO, touchNodes, updateChildAssocUniqueNameImpl, updateNode, updatePrimaryParentAssocs, updatePrimaryParentAssocsImpl
-
-
-
-
Field Detail
-
qnameDAO
protected QNameDAO qnameDAO
-
dictionaryService
protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
-
-
Method Detail
-
setSqlSessionTemplate
public void setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)
-
setQnameDAO
public void setQnameDAO(QNameDAO qnameDAO)
- Overrides:
setQnameDAOin classAbstractNodeDAOImpl- Parameters:
qnameDAO- translates QName IDs into QName instances and vice-versa
-
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
- Overrides:
setDictionaryServicein classAbstractNodeDAOImpl- Parameters:
dictionaryService- the service help determine cm:auditable characteristics
-
startBatch
public void startBatch()
Description copied from interface:BatchingDAOStart a batch of insert or update commands
-
executeBatch
public void executeBatch()
Description copied from interface:BatchingDAOWrite a batch of insert or update commands
-
selectServer
protected ServerEntity selectServer(java.lang.String ipAddress)
- Specified by:
selectServerin classAbstractNodeDAOImpl
-
insertServer
protected java.lang.Long insertServer(java.lang.String ipAddress)
- Specified by:
insertServerin classAbstractNodeDAOImpl
-
insertTransaction
protected java.lang.Long insertTransaction(java.lang.Long serverId, java.lang.String changeTxnId, java.lang.Long commitTimeMs)- Specified by:
insertTransactionin classAbstractNodeDAOImpl
-
updateTransaction
protected int updateTransaction(java.lang.Long txnId, java.lang.Long commitTimeMs)- Specified by:
updateTransactionin classAbstractNodeDAOImpl
-
deleteTransaction
protected int deleteTransaction(java.lang.Long txnId)
- Specified by:
deleteTransactionin classAbstractNodeDAOImpl
-
selectAllStores
protected java.util.List<StoreEntity> selectAllStores()
- Specified by:
selectAllStoresin classAbstractNodeDAOImpl
-
selectStore
protected StoreEntity selectStore(org.alfresco.service.cmr.repository.StoreRef storeRef)
- Specified by:
selectStorein classAbstractNodeDAOImpl
-
selectStoreRootNode
protected NodeEntity selectStoreRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)
- Specified by:
selectStoreRootNodein classAbstractNodeDAOImpl
-
insertStore
protected java.lang.Long insertStore(StoreEntity store)
- Specified by:
insertStorein classAbstractNodeDAOImpl
-
updateStoreRoot
protected int updateStoreRoot(StoreEntity store)
- Specified by:
updateStoreRootin classAbstractNodeDAOImpl
-
updateStore
protected int updateStore(StoreEntity store)
- Specified by:
updateStorein classAbstractNodeDAOImpl
-
updateNodesInStore
protected int updateNodesInStore(java.lang.Long txnId, java.lang.Long storeId)- Specified by:
updateNodesInStorein classAbstractNodeDAOImpl
-
insertNode
protected java.lang.Long insertNode(NodeEntity node)
- Specified by:
insertNodein classAbstractNodeDAOImpl
-
updateNode
protected int updateNode(NodeUpdateEntity nodeUpdate)
- Specified by:
updateNodein classAbstractNodeDAOImpl
-
updateNodes
protected int updateNodes(java.lang.Long txnId, java.util.List<java.lang.Long> nodeIds)- Specified by:
updateNodesin classAbstractNodeDAOImpl
-
getMinNodeId
public java.lang.Long getMinNodeId()
- Returns:
- Returns the minimum node id or 0 if there are no nodes
-
getMaxNodeId
public java.lang.Long getMaxNodeId()
- Returns:
- Returns the maximum node id or 0 if there are no nodes
-
getNodeIdsIntervalForType
public org.alfresco.util.Pair<java.lang.Long,java.lang.Long> getNodeIdsIntervalForType(org.alfresco.service.namespace.QName type, java.lang.Long startTxnTime, java.lang.Long endTxnTime)Description copied from interface:NodeDAOReturns the [minId, maxId] interval for nodes of a type, with the transaction time in the given window time.- Parameters:
type- the node typestartTxnTime- the starting transaction time, null is allowed, case in which no minimum transaction time is consideredendTxnTime- the end transaction time, null is allowed, case in which no maximum transaction time is considered- Returns:
- the interval, as a pair
-
updatePrimaryChildrenSharedAclId
protected void updatePrimaryChildrenSharedAclId(java.lang.Long txnId, java.lang.Long primaryParentNodeId, java.lang.Long optionalOldSharedAlcIdInAdditionToNull, java.lang.Long newSharedAlcId)- Specified by:
updatePrimaryChildrenSharedAclIdin classAbstractNodeDAOImpl
-
deleteNodeById
protected int deleteNodeById(java.lang.Long nodeId)
- Specified by:
deleteNodeByIdin classAbstractNodeDAOImpl
-
deleteNodesByCommitTime
protected int deleteNodesByCommitTime(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)- Specified by:
deleteNodesByCommitTimein classAbstractNodeDAOImpl
-
selectNodeById
protected NodeEntity selectNodeById(java.lang.Long id)
- Specified by:
selectNodeByIdin classAbstractNodeDAOImpl
-
selectNodeByNodeRef
protected NodeEntity selectNodeByNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
- Specified by:
selectNodeByNodeRefin classAbstractNodeDAOImpl
-
selectNodesByUuids
protected java.util.List<Node> selectNodesByUuids(java.lang.Long storeId, java.util.SortedSet<java.lang.String> uuids)
- Specified by:
selectNodesByUuidsin classAbstractNodeDAOImpl
-
selectNodesByIds
protected java.util.List<Node> selectNodesByIds(java.util.SortedSet<java.lang.Long> ids)
- Specified by:
selectNodesByIdsin classAbstractNodeDAOImpl
-
selectNodeProperties
protected java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>> selectNodeProperties(java.util.Set<java.lang.Long> nodeIds)
- Specified by:
selectNodePropertiesin classAbstractNodeDAOImpl
-
selectNodeProperties
protected java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>> selectNodeProperties(java.lang.Long nodeId)
- Specified by:
selectNodePropertiesin classAbstractNodeDAOImpl
-
selectNodeProperties
protected java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>> selectNodeProperties(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)
- Specified by:
selectNodePropertiesin classAbstractNodeDAOImpl
-
selectNodePropertiesByTypes
public java.util.List<NodePropertyEntity> selectNodePropertiesByTypes(java.util.Set<org.alfresco.service.namespace.QName> qnames)
Description copied from interface:NodeDAOUsed by the re-encryptor to re-encrypt encryptable properties with a new encryption key.
-
selectNodePropertiesByDataType
public java.util.List<NodePropertyEntity> selectNodePropertiesByDataType(org.alfresco.service.namespace.QName dataType, long minNodeId, long maxNodeId)
Description copied from interface:NodeDAOSelect all node properties that are between two node IDs and of the given actual type- Parameters:
dataType- the actual, original type of the property, as given by one of the constants onDataTypeDefinitionminNodeId- the minimum node ID (inclusive)maxNodeId- the maximum node ID (exclusive)
-
deleteNodeProperties
protected int deleteNodeProperties(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)- Specified by:
deleteNodePropertiesin classAbstractNodeDAOImpl
-
deleteNodeProperties
protected int deleteNodeProperties(java.lang.Long nodeId, java.util.List<NodePropertyKey> propKeys)- Specified by:
deleteNodePropertiesin classAbstractNodeDAOImpl
-
insertNodeProperties
protected void insertNodeProperties(java.lang.Long nodeId, java.util.Map<NodePropertyKey,NodePropertyValue> persistableProps)- Specified by:
insertNodePropertiesin classAbstractNodeDAOImpl
-
selectNodeAspects
protected java.util.Map<NodeVersionKey,java.util.Set<org.alfresco.service.namespace.QName>> selectNodeAspects(java.util.Set<java.lang.Long> nodeIds)
- Specified by:
selectNodeAspectsin classAbstractNodeDAOImpl
-
insertNodeAspect
protected void insertNodeAspect(java.lang.Long nodeId, java.lang.Long qnameId)- Specified by:
insertNodeAspectin classAbstractNodeDAOImpl
-
deleteNodeAspects
protected int deleteNodeAspects(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)- Specified by:
deleteNodeAspectsin classAbstractNodeDAOImpl
-
selectNodesWithAspects
protected void selectNodesWithAspects(java.util.List<java.lang.Long> qnameIds, java.lang.Long minNodeId, java.lang.Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)- Specified by:
selectNodesWithAspectsin classAbstractNodeDAOImpl
-
insertNodeAssoc
protected java.lang.Long insertNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId, int assocIndex)- Specified by:
insertNodeAssocin classAbstractNodeDAOImpl
-
updateNodeAssoc
protected int updateNodeAssoc(java.lang.Long id, int assocIndex)- Specified by:
updateNodeAssocin classAbstractNodeDAOImpl
-
deleteNodeAssoc
protected int deleteNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId)- Specified by:
deleteNodeAssocin classAbstractNodeDAOImpl
-
deleteNodeAssocs
protected int deleteNodeAssocs(java.util.List<java.lang.Long> ids)
- Specified by:
deleteNodeAssocsin classAbstractNodeDAOImpl
-
selectNodeAssocs
protected java.util.List<NodeAssocEntity> selectNodeAssocs(java.lang.Long nodeId)
- Specified by:
selectNodeAssocsin classAbstractNodeDAOImpl
-
selectNodeAssocsBySource
protected java.util.List<NodeAssocEntity> selectNodeAssocsBySource(java.lang.Long sourceNodeId, java.lang.Long typeQNameId)
- Specified by:
selectNodeAssocsBySourcein classAbstractNodeDAOImpl
-
selectNodeAssocsBySourceAndPropertyValue
protected java.util.List<NodeAssocEntity> selectNodeAssocsBySourceAndPropertyValue(java.lang.Long sourceNodeId, java.lang.Long typeQNameId, java.lang.Long propertyQNameId, NodePropertyValue nodeValue)
- Specified by:
selectNodeAssocsBySourceAndPropertyValuein classAbstractNodeDAOImpl
-
selectNodeAssocsByTarget
protected java.util.List<NodeAssocEntity> selectNodeAssocsByTarget(java.lang.Long targetNodeId, java.lang.Long typeQNameId)
- Specified by:
selectNodeAssocsByTargetin classAbstractNodeDAOImpl
-
selectNodeAssocById
protected NodeAssocEntity selectNodeAssocById(java.lang.Long assocId)
- Specified by:
selectNodeAssocByIdin classAbstractNodeDAOImpl
-
selectNodeAssocMaxIndex
protected int selectNodeAssocMaxIndex(java.lang.Long sourceNodeId, java.lang.Long assocTypeQNameId)- Specified by:
selectNodeAssocMaxIndexin classAbstractNodeDAOImpl
-
insertChildAssoc
protected java.lang.Long insertChildAssoc(ChildAssocEntity assoc)
- Specified by:
insertChildAssocin classAbstractNodeDAOImpl
-
deleteChildAssocs
protected int deleteChildAssocs(java.util.List<java.lang.Long> ids)
- Specified by:
deleteChildAssocsin classAbstractNodeDAOImpl
-
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:
updateChildAssocIndexin classAbstractNodeDAOImpl
-
updateChildAssocUniqueName
protected int updateChildAssocUniqueName(java.lang.Long assocId, java.lang.String name)- Specified by:
updateChildAssocUniqueNamein classAbstractNodeDAOImpl
-
selectChildAssoc
protected ChildAssocEntity selectChildAssoc(java.lang.Long assocId)
- Specified by:
selectChildAssocin classAbstractNodeDAOImpl
-
selectChildNodeIds
protected java.util.List<ChildAssocEntity> selectChildNodeIds(java.lang.Long nodeId, java.lang.Boolean isPrimary, java.lang.Long minChildNodeIdInclusive, int maxResults)
- Specified by:
selectChildNodeIdsin classAbstractNodeDAOImpl
-
selectPrimaryChildAcls
public java.util.List<NodeIdAndAclId> selectPrimaryChildAcls(java.lang.Long nodeId)
- Specified by:
selectPrimaryChildAclsin classAbstractNodeDAOImpl
-
selectChildAssoc
protected java.util.List<ChildAssocEntity> selectChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)
- Specified by:
selectChildAssocin classAbstractNodeDAOImpl
-
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:AbstractNodeDAOImplParameters are all optional except the parent node ID and the callback- Specified by:
selectChildAssocsin classAbstractNodeDAOImpl
-
selectChildAssocs
public void selectChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)- Specified by:
selectChildAssocsin classAbstractNodeDAOImpl
-
selectChildAssocs
protected void selectChildAssocs(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)- Specified by:
selectChildAssocsin classAbstractNodeDAOImpl
-
selectChildAssoc
protected ChildAssocEntity selectChildAssoc(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childName)
- Specified by:
selectChildAssocin classAbstractNodeDAOImpl
-
selectChildAssocs
protected void selectChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.util.Collection<java.lang.String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)- Specified by:
selectChildAssocsin classAbstractNodeDAOImpl
-
selectChildAssocsByPropertyValue
protected void selectChildAssocsByPropertyValue(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName propertyQName, NodePropertyValue nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback)- Specified by:
selectChildAssocsByPropertyValuein classAbstractNodeDAOImpl
-
selectChildAssocsByChildTypes
protected void selectChildAssocsByChildTypes(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)- Specified by:
selectChildAssocsByChildTypesin classAbstractNodeDAOImpl
-
selectChildAssocsWithoutParentAssocsOfType
protected void selectChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)- Specified by:
selectChildAssocsWithoutParentAssocsOfTypein classAbstractNodeDAOImpl
-
selectChildAssocsWithoutNodeAssocsOfTypes
public java.util.List<Node> selectChildAssocsWithoutNodeAssocsOfTypes(java.lang.Long parentNodeId, java.lang.Long minNodeId, java.lang.Long maxNodeId, java.util.Set<org.alfresco.service.namespace.QName> assocTypeQNames)
- Parameters:
parentNodeId- the parent node idminNodeId- the minimum node ID (inclusive), null for no limitation on the minimum value of the node idmaxNodeId- the maximum node ID (exclusive), null for no limitation on the maximum value of the node idassocTypeQNames- the node associations to exclude, null for no filtering of the associations types- Returns:
- list of child nodes
-
selectPrimaryParentAssocs
protected java.util.List<ChildAssocEntity> selectPrimaryParentAssocs(java.lang.Long childNodeId)
Description copied from class:AbstractNodeDAOImplNo DB constraint, so multiple returned- Specified by:
selectPrimaryParentAssocsin classAbstractNodeDAOImpl
-
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:AbstractNodeDAOImplParameters are all optional except the parent node ID and the callback- Specified by:
selectParentAssocsin classAbstractNodeDAOImpl
-
selectParentAssocs
protected java.util.List<ChildAssocEntity> selectParentAssocs(java.lang.Long childNodeId)
- Specified by:
selectParentAssocsin classAbstractNodeDAOImpl
-
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:
updatePrimaryParentAssocsin classAbstractNodeDAOImpl
-
moveNodeData
protected void moveNodeData(java.lang.Long fromNodeId, java.lang.Long toNodeId)Description copied from class:AbstractNodeDAOImplMoves 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:
moveNodeDatain classAbstractNodeDAOImpl- Parameters:
fromNodeId- the source nodetoNodeId- 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:
deleteSubscriptionsin classAbstractNodeDAOImpl
-
selectLastTxnBeforeCommitTime
protected Transaction selectLastTxnBeforeCommitTime(java.lang.Long maxCommitTime)
- Specified by:
selectLastTxnBeforeCommitTimein classAbstractNodeDAOImpl
-
selectTransactionCount
protected int selectTransactionCount()
- Specified by:
selectTransactionCountin classAbstractNodeDAOImpl
-
selectTxnById
protected Transaction selectTxnById(java.lang.Long txnId)
- Specified by:
selectTxnByIdin classAbstractNodeDAOImpl
-
selectTxnChanges
protected java.util.List<NodeEntity> selectTxnChanges(java.lang.Long txnId, java.lang.Long storeId)
- Specified by:
selectTxnChangesin classAbstractNodeDAOImpl
-
selectTxns
protected java.util.List<Transaction> selectTxns(java.lang.Long fromTimeInclusive, java.lang.Long toTimeExclusive, java.lang.Integer count, java.util.List<java.lang.Long> includeTxnIds, java.util.List<java.lang.Long> excludeTxnIds, java.lang.Long excludeServerId, java.lang.Boolean ascending)
- Specified by:
selectTxnsin classAbstractNodeDAOImpl
-
selectTxnsUnused
protected java.util.List<java.lang.Long> selectTxnsUnused(java.lang.Long minTxnId, java.lang.Long maxCommitTime, java.lang.Integer count)- Specified by:
selectTxnsUnusedin classAbstractNodeDAOImpl
-
deleteTxnsUnused
public int deleteTxnsUnused(long fromCommitTime, long toCommitTime)Description copied from interface:NodeDAORemove unused transactions from commit time 'fromCommitTime' to commit time 'toCommitTime'- Parameters:
fromCommitTime- delete unused transactions from commit timetoCommitTime- delete unused transactions to commit time- Returns:
- int
-
selectMinTxnCommitTime
protected java.lang.Long selectMinTxnCommitTime()
- Specified by:
selectMinTxnCommitTimein classAbstractNodeDAOImpl
-
selectMaxTxnCommitTime
protected java.lang.Long selectMaxTxnCommitTime()
- Specified by:
selectMaxTxnCommitTimein classAbstractNodeDAOImpl
-
selectMinTxnCommitTimeForDeletedNodes
protected java.lang.Long selectMinTxnCommitTimeForDeletedNodes()
- Specified by:
selectMinTxnCommitTimeForDeletedNodesin classAbstractNodeDAOImpl
-
selectMinTxnId
protected java.lang.Long selectMinTxnId()
- Specified by:
selectMinTxnIdin classAbstractNodeDAOImpl
-
selectMinUnusedTxnCommitTime
protected java.lang.Long selectMinUnusedTxnCommitTime()
- Specified by:
selectMinUnusedTxnCommitTimein classAbstractNodeDAOImpl
-
selectMaxTxnId
protected java.lang.Long selectMaxTxnId()
- Specified by:
selectMaxTxnIdin classAbstractNodeDAOImpl
-
countChildAssocsByParent
public int countChildAssocsByParent(java.lang.Long parentNodeId, boolean isPrimary)Description copied from interface:NodeDAOCounts the number of child associations directly under parentNodeId.- Parameters:
parentNodeId- the parent node idisPrimary- count just primary associations?
-
getOneTxnsByCommitTimeDescending
public java.util.List<Transaction> getOneTxnsByCommitTimeDescending(java.lang.Long fromTimeInclusive, java.lang.Long toTimeExclusive, boolean remoteOnly)
Get most recent transaction made in a given commit time range
-
-