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 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(Long parentNodeId, boolean isPrimary)Counts the number of child associations directly under parentNodeId.protected intdeleteChildAssocs(List<Long> ids)protected intdeleteNodeAspects(Long nodeId, Set<Long> qnameIds)protected intdeleteNodeAssoc(Long sourceNodeId, Long targetNodeId, Long assocTypeQNameId)protected intdeleteNodeAssocs(List<Long> ids)protected intdeleteNodeById(Long nodeId)protected intdeleteNodeProperties(Long nodeId, List<NodePropertyKey> propKeys)protected intdeleteNodeProperties(Long nodeId, Set<Long> qnameIds)protected intdeleteNodesByCommitTime(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)protected voiddeleteSubscriptions(Long nodeId)The default implementation relies on ON DELETE CASCADE and the subscriptions avoiding deleted nodes - NoOp.protected intdeleteTransaction(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 commandsLonggetMaxNodeId()LonggetMinNodeId()Pair<Long,Long>getNodeIdsIntervalForType(QName type, Long startTxnTime, Long endTxnTime)Returns the [minId, maxId] interval for nodes of a type, with the transaction time in the given window time.List<Transaction>getOneTxnsByCommitTimeDescending(Long fromTimeInclusive, Long toTimeExclusive, boolean remoteOnly)Get most recent transaction made in a given commit time rangeprotected LonginsertChildAssoc(ChildAssocEntity assoc)protected LonginsertNode(NodeEntity node)protected voidinsertNodeAspect(Long nodeId, Long qnameId)protected LonginsertNodeAssoc(Long sourceNodeId, Long targetNodeId, Long assocTypeQNameId, int assocIndex)protected voidinsertNodeProperties(Long nodeId, Map<NodePropertyKey,NodePropertyValue> persistableProps)protected LonginsertServer(String ipAddress)protected LonginsertStore(StoreEntity store)protected LonginsertTransaction(Long serverId, String changeTxnId, Long commitTimeMs)protected voidmoveNodeData(Long fromNodeId, Long toNodeId)Moves all node-linked data from one node to another.protected List<StoreEntity>selectAllStores()protected ChildAssocEntityselectChildAssoc(Long assocId)protected List<ChildAssocEntity>selectChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName)protected ChildAssocEntityselectChildAssoc(Long parentNodeId, QName assocTypeQName, String childName)protected voidselectChildAssocs(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, Boolean sameStore, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Parameters are all optional except the parent node ID and the callbackprotected voidselectChildAssocs(Long parentNodeId, Set<QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected voidselectChildAssocs(Long parentNodeId, QName assocTypeQName, Collection<String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)voidselectChildAssocs(Long parentNodeId, QName assocTypeQName, QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected voidselectChildAssocsByChildTypes(Long parentNodeId, Set<QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected voidselectChildAssocsByPropertyValue(Long parentNodeId, QName propertyQName, NodePropertyValue nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback)List<Node>selectChildAssocsWithoutNodeAssocsOfTypes(Long parentNodeId, Long minNodeId, Long maxNodeId, Set<QName> assocTypeQNames)protected voidselectChildAssocsWithoutParentAssocsOfType(Long parentNodeId, QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected List<ChildAssocEntity>selectChildNodeIds(Long nodeId, Boolean isPrimary, Long minChildNodeIdInclusive, int maxResults)protected TransactionselectLastTxnBeforeCommitTime(Long maxCommitTime)protected LongselectMaxTxInNodeIdRange(Long fromNodeId, Long toNodeId)Gets the maximum commit time from transactions including a node id in the range [fromNodeId:toNodeId]protected LongselectMaxTxnCommitTime()protected LongselectMaxTxnId()protected LongselectMinTxInNodeIdRange(Long fromNodeId, Long toNodeId)Gets the minimum commit time from transactions including a node id in the range [fromNodeId:toNodeId]protected LongselectMinTxnCommitTime()protected LongselectMinTxnCommitTimeForDeletedNodes()protected LongselectMinTxnId()protected LongselectMinUnusedTxnCommitTime()LongselectNextTxCommitTime(Long fromCommitTime)Gets the next commit time from [fromCommitTime]protected Map<NodeVersionKey,Set<QName>>selectNodeAspects(Set<Long> nodeIds)protected NodeAssocEntityselectNodeAssocById(Long assocId)protected intselectNodeAssocMaxIndex(Long sourceNodeId, Long assocTypeQNameId)protected List<NodeAssocEntity>selectNodeAssocs(Long nodeId)protected List<NodeAssocEntity>selectNodeAssocsBySource(Long sourceNodeId, Long typeQNameId)protected List<NodeAssocEntity>selectNodeAssocsBySourceAndPropertyValue(Long sourceNodeId, Long typeQNameId, Long propertyQNameId, NodePropertyValue nodeValue)protected List<NodeAssocEntity>selectNodeAssocsByTarget(Long targetNodeId, Long typeQNameId)protected NodeEntityselectNodeById(Long id)protected NodeEntityselectNodeByNodeRef(NodeRef nodeRef)protected Map<NodeVersionKey,Map<NodePropertyKey,NodePropertyValue>>selectNodeProperties(Long nodeId)protected Map<NodeVersionKey,Map<NodePropertyKey,NodePropertyValue>>selectNodeProperties(Long nodeId, Set<Long> qnameIds)protected Map<NodeVersionKey,Map<NodePropertyKey,NodePropertyValue>>selectNodeProperties(Set<Long> nodeIds)List<NodePropertyEntity>selectNodePropertiesByDataType(QName dataType, long minNodeId, long maxNodeId)Select all node properties that are between two node IDs and of the given actual typeList<NodePropertyEntity>selectNodePropertiesByTypes(Set<QName> qnames)Used by the re-encryptor to re-encrypt encryptable properties with a new encryption key.protected List<Node>selectNodesByIds(SortedSet<Long> ids)protected List<Node>selectNodesByUuids(Long storeId, SortedSet<String> uuids)protected voidselectNodesWithAspects(List<Long> qnameIds, Long minNodeId, Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)protected List<ChildAssocEntity>selectParentAssocs(Long childNodeId)protected voidselectParentAssocs(Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Parameters are all optional except the parent node ID and the callbackList<NodeIdAndAclId>selectPrimaryChildAcls(Long nodeId)protected List<ChildAssocEntity>selectPrimaryParentAssocs(Long childNodeId)No DB constraint, so multiple returnedprotected ServerEntityselectServer(String ipAddress)protected StoreEntityselectStore(StoreRef storeRef)protected NodeEntityselectStoreRootNode(StoreRef storeRef)protected intselectTransactionCount()protected TransactionselectTxnById(Long txnId)protected List<NodeEntity>selectTxnChanges(Long txnId, Long storeId)protected List<Transaction>selectTxns(Long fromTimeInclusive, Long toTimeExclusive, Integer count, List<Long> includeTxnIds, List<Long> excludeTxnIds, Long excludeServerId, Boolean ascending)protected List<Long>selectTxnsUnused(Long minTxnId, Long maxCommitTime, Integer count)voidsetDictionaryService(DictionaryService dictionaryService)voidsetQnameDAO(QNameDAO qnameDAO)voidsetSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)voidstartBatch()Start a batch of insert or update commandsprotected intupdateChildAssocIndex(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, int index)protected intupdateChildAssocUniqueName(Long assocId, String name)protected intupdateNode(NodeUpdateEntity nodeUpdate)protected intupdateNodeAssoc(Long id, int assocIndex)protected intupdateNodes(Long txnId, List<Long> nodeIds)protected intupdateNodesInStore(Long txnId, Long storeId)protected voidupdatePrimaryChildrenSharedAclId(Long txnId, Long primaryParentNodeId, Long optionalOldSharedAlcIdInAdditionToNull, Long newSharedAlcId)protected intupdatePrimaryParentAssocs(Long childNodeId, Long parentNodeId, QName assocTypeQName, QName assocQName, String childNodeName)protected intupdateStore(StoreEntity store)protected intupdateStoreRoot(StoreEntity store)protected intupdateTransaction(Long txnId, 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, getMaxTxInNodeIdRange, getMaxTxnCommitTime, getMaxTxnId, getMaxTxnIdByCommitTime, getMinTxInNodeIdRange, getMinTxnCommitTime, getMinTxnCommitTimeForDeletedNodes, getMinTxnId, getMinUnusedTxnCommitTime, getNextTxCommitTime, 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 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(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(String ipAddress)
- Specified by:
selectServerin classAbstractNodeDAOImpl
-
insertServer
protected Long insertServer(String ipAddress)
- Specified by:
insertServerin classAbstractNodeDAOImpl
-
insertTransaction
protected Long insertTransaction(Long serverId, String changeTxnId, Long commitTimeMs)
- Specified by:
insertTransactionin classAbstractNodeDAOImpl
-
updateTransaction
protected int updateTransaction(Long txnId, Long commitTimeMs)
- Specified by:
updateTransactionin classAbstractNodeDAOImpl
-
deleteTransaction
protected int deleteTransaction(Long txnId)
- Specified by:
deleteTransactionin classAbstractNodeDAOImpl
-
selectAllStores
protected List<StoreEntity> selectAllStores()
- Specified by:
selectAllStoresin classAbstractNodeDAOImpl
-
selectStore
protected StoreEntity selectStore(StoreRef storeRef)
- Specified by:
selectStorein classAbstractNodeDAOImpl
-
selectStoreRootNode
protected NodeEntity selectStoreRootNode(StoreRef storeRef)
- Specified by:
selectStoreRootNodein classAbstractNodeDAOImpl
-
insertStore
protected 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(Long txnId, Long storeId)
- Specified by:
updateNodesInStorein classAbstractNodeDAOImpl
-
insertNode
protected Long insertNode(NodeEntity node)
- Specified by:
insertNodein classAbstractNodeDAOImpl
-
updateNode
protected int updateNode(NodeUpdateEntity nodeUpdate)
- Specified by:
updateNodein classAbstractNodeDAOImpl
-
updateNodes
protected int updateNodes(Long txnId, List<Long> nodeIds)
- Specified by:
updateNodesin classAbstractNodeDAOImpl
-
getMinNodeId
public Long getMinNodeId()
- Returns:
- Returns the minimum node id or 0 if there are no nodes
-
getMaxNodeId
public Long getMaxNodeId()
- Returns:
- Returns the maximum node id or 0 if there are no nodes
-
getNodeIdsIntervalForType
public Pair<Long,Long> getNodeIdsIntervalForType(QName type, Long startTxnTime, 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(Long txnId, Long primaryParentNodeId, Long optionalOldSharedAlcIdInAdditionToNull, Long newSharedAlcId)
- Specified by:
updatePrimaryChildrenSharedAclIdin classAbstractNodeDAOImpl
-
deleteNodeById
protected int deleteNodeById(Long nodeId)
- Specified by:
deleteNodeByIdin classAbstractNodeDAOImpl
-
deleteNodesByCommitTime
protected int deleteNodesByCommitTime(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)- Specified by:
deleteNodesByCommitTimein classAbstractNodeDAOImpl
-
selectNodeById
protected NodeEntity selectNodeById(Long id)
- Specified by:
selectNodeByIdin classAbstractNodeDAOImpl
-
selectNodeByNodeRef
protected NodeEntity selectNodeByNodeRef(NodeRef nodeRef)
- Specified by:
selectNodeByNodeRefin classAbstractNodeDAOImpl
-
selectNodesByUuids
protected List<Node> selectNodesByUuids(Long storeId, SortedSet<String> uuids)
- Specified by:
selectNodesByUuidsin classAbstractNodeDAOImpl
-
selectNodesByIds
protected List<Node> selectNodesByIds(SortedSet<Long> ids)
- Specified by:
selectNodesByIdsin classAbstractNodeDAOImpl
-
selectNodeProperties
protected Map<NodeVersionKey,Map<NodePropertyKey,NodePropertyValue>> selectNodeProperties(Set<Long> nodeIds)
- Specified by:
selectNodePropertiesin classAbstractNodeDAOImpl
-
selectNodeProperties
protected Map<NodeVersionKey,Map<NodePropertyKey,NodePropertyValue>> selectNodeProperties(Long nodeId)
- Specified by:
selectNodePropertiesin classAbstractNodeDAOImpl
-
selectNodeProperties
protected Map<NodeVersionKey,Map<NodePropertyKey,NodePropertyValue>> selectNodeProperties(Long nodeId, Set<Long> qnameIds)
- Specified by:
selectNodePropertiesin classAbstractNodeDAOImpl
-
selectNodePropertiesByTypes
public List<NodePropertyEntity> selectNodePropertiesByTypes(Set<QName> qnames)
Description copied from interface:NodeDAOUsed by the re-encryptor to re-encrypt encryptable properties with a new encryption key.
-
selectNodePropertiesByDataType
public List<NodePropertyEntity> selectNodePropertiesByDataType(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(Long nodeId, Set<Long> qnameIds)
- Specified by:
deleteNodePropertiesin classAbstractNodeDAOImpl
-
deleteNodeProperties
protected int deleteNodeProperties(Long nodeId, List<NodePropertyKey> propKeys)
- Specified by:
deleteNodePropertiesin classAbstractNodeDAOImpl
-
insertNodeProperties
protected void insertNodeProperties(Long nodeId, Map<NodePropertyKey,NodePropertyValue> persistableProps)
- Specified by:
insertNodePropertiesin classAbstractNodeDAOImpl
-
selectNodeAspects
protected Map<NodeVersionKey,Set<QName>> selectNodeAspects(Set<Long> nodeIds)
- Specified by:
selectNodeAspectsin classAbstractNodeDAOImpl
-
insertNodeAspect
protected void insertNodeAspect(Long nodeId, Long qnameId)
- Specified by:
insertNodeAspectin classAbstractNodeDAOImpl
-
deleteNodeAspects
protected int deleteNodeAspects(Long nodeId, Set<Long> qnameIds)
- Specified by:
deleteNodeAspectsin classAbstractNodeDAOImpl
-
selectNodesWithAspects
protected void selectNodesWithAspects(List<Long> qnameIds, Long minNodeId, Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)
- Specified by:
selectNodesWithAspectsin classAbstractNodeDAOImpl
-
insertNodeAssoc
protected Long insertNodeAssoc(Long sourceNodeId, Long targetNodeId, Long assocTypeQNameId, int assocIndex)
- Specified by:
insertNodeAssocin classAbstractNodeDAOImpl
-
updateNodeAssoc
protected int updateNodeAssoc(Long id, int assocIndex)
- Specified by:
updateNodeAssocin classAbstractNodeDAOImpl
-
deleteNodeAssoc
protected int deleteNodeAssoc(Long sourceNodeId, Long targetNodeId, Long assocTypeQNameId)
- Specified by:
deleteNodeAssocin classAbstractNodeDAOImpl
-
deleteNodeAssocs
protected int deleteNodeAssocs(List<Long> ids)
- Specified by:
deleteNodeAssocsin classAbstractNodeDAOImpl
-
selectNodeAssocs
protected List<NodeAssocEntity> selectNodeAssocs(Long nodeId)
- Specified by:
selectNodeAssocsin classAbstractNodeDAOImpl
-
selectNodeAssocsBySource
protected List<NodeAssocEntity> selectNodeAssocsBySource(Long sourceNodeId, Long typeQNameId)
- Specified by:
selectNodeAssocsBySourcein classAbstractNodeDAOImpl
-
selectNodeAssocsBySourceAndPropertyValue
protected List<NodeAssocEntity> selectNodeAssocsBySourceAndPropertyValue(Long sourceNodeId, Long typeQNameId, Long propertyQNameId, NodePropertyValue nodeValue)
- Specified by:
selectNodeAssocsBySourceAndPropertyValuein classAbstractNodeDAOImpl
-
selectNodeAssocsByTarget
protected List<NodeAssocEntity> selectNodeAssocsByTarget(Long targetNodeId, Long typeQNameId)
- Specified by:
selectNodeAssocsByTargetin classAbstractNodeDAOImpl
-
selectNodeAssocById
protected NodeAssocEntity selectNodeAssocById(Long assocId)
- Specified by:
selectNodeAssocByIdin classAbstractNodeDAOImpl
-
selectNodeAssocMaxIndex
protected int selectNodeAssocMaxIndex(Long sourceNodeId, Long assocTypeQNameId)
- Specified by:
selectNodeAssocMaxIndexin classAbstractNodeDAOImpl
-
insertChildAssoc
protected Long insertChildAssoc(ChildAssocEntity assoc)
- Specified by:
insertChildAssocin classAbstractNodeDAOImpl
-
deleteChildAssocs
protected int deleteChildAssocs(List<Long> ids)
- Specified by:
deleteChildAssocsin classAbstractNodeDAOImpl
-
updateChildAssocIndex
protected int updateChildAssocIndex(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, int index)
- Specified by:
updateChildAssocIndexin classAbstractNodeDAOImpl
-
updateChildAssocUniqueName
protected int updateChildAssocUniqueName(Long assocId, String name)
- Specified by:
updateChildAssocUniqueNamein classAbstractNodeDAOImpl
-
selectChildAssoc
protected ChildAssocEntity selectChildAssoc(Long assocId)
- Specified by:
selectChildAssocin classAbstractNodeDAOImpl
-
selectChildNodeIds
protected List<ChildAssocEntity> selectChildNodeIds(Long nodeId, Boolean isPrimary, Long minChildNodeIdInclusive, int maxResults)
- Specified by:
selectChildNodeIdsin classAbstractNodeDAOImpl
-
selectPrimaryChildAcls
public List<NodeIdAndAclId> selectPrimaryChildAcls(Long nodeId)
- Specified by:
selectPrimaryChildAclsin classAbstractNodeDAOImpl
-
selectChildAssoc
protected List<ChildAssocEntity> selectChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName)
- Specified by:
selectChildAssocin classAbstractNodeDAOImpl
-
selectChildAssocs
protected void selectChildAssocs(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, 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(Long parentNodeId, QName assocTypeQName, QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
- Specified by:
selectChildAssocsin classAbstractNodeDAOImpl
-
selectChildAssocs
protected void selectChildAssocs(Long parentNodeId, Set<QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
- Specified by:
selectChildAssocsin classAbstractNodeDAOImpl
-
selectChildAssoc
protected ChildAssocEntity selectChildAssoc(Long parentNodeId, QName assocTypeQName, String childName)
- Specified by:
selectChildAssocin classAbstractNodeDAOImpl
-
selectChildAssocs
protected void selectChildAssocs(Long parentNodeId, QName assocTypeQName, Collection<String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
- Specified by:
selectChildAssocsin classAbstractNodeDAOImpl
-
selectChildAssocsByPropertyValue
protected void selectChildAssocsByPropertyValue(Long parentNodeId, QName propertyQName, NodePropertyValue nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
- Specified by:
selectChildAssocsByPropertyValuein classAbstractNodeDAOImpl
-
selectChildAssocsByChildTypes
protected void selectChildAssocsByChildTypes(Long parentNodeId, Set<QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
- Specified by:
selectChildAssocsByChildTypesin classAbstractNodeDAOImpl
-
selectChildAssocsWithoutParentAssocsOfType
protected void selectChildAssocsWithoutParentAssocsOfType(Long parentNodeId, QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
- Specified by:
selectChildAssocsWithoutParentAssocsOfTypein classAbstractNodeDAOImpl
-
selectChildAssocsWithoutNodeAssocsOfTypes
public List<Node> selectChildAssocsWithoutNodeAssocsOfTypes(Long parentNodeId, Long minNodeId, Long maxNodeId, Set<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 List<ChildAssocEntity> selectPrimaryParentAssocs(Long childNodeId)
Description copied from class:AbstractNodeDAOImplNo DB constraint, so multiple returned- Specified by:
selectPrimaryParentAssocsin classAbstractNodeDAOImpl
-
selectParentAssocs
protected void selectParentAssocs(Long childNodeId, QName assocTypeQName, QName assocQName, 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 List<ChildAssocEntity> selectParentAssocs(Long childNodeId)
- Specified by:
selectParentAssocsin classAbstractNodeDAOImpl
-
updatePrimaryParentAssocs
protected int updatePrimaryParentAssocs(Long childNodeId, Long parentNodeId, QName assocTypeQName, QName assocQName, String childNodeName)
- Specified by:
updatePrimaryParentAssocsin classAbstractNodeDAOImpl
-
moveNodeData
protected void moveNodeData(Long fromNodeId, 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(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(Long maxCommitTime)
- Specified by:
selectLastTxnBeforeCommitTimein classAbstractNodeDAOImpl
-
selectTransactionCount
protected int selectTransactionCount()
- Specified by:
selectTransactionCountin classAbstractNodeDAOImpl
-
selectTxnById
protected Transaction selectTxnById(Long txnId)
- Specified by:
selectTxnByIdin classAbstractNodeDAOImpl
-
selectTxnChanges
protected List<NodeEntity> selectTxnChanges(Long txnId, Long storeId)
- Specified by:
selectTxnChangesin classAbstractNodeDAOImpl
-
selectTxns
protected List<Transaction> selectTxns(Long fromTimeInclusive, Long toTimeExclusive, Integer count, List<Long> includeTxnIds, List<Long> excludeTxnIds, Long excludeServerId, Boolean ascending)
- Specified by:
selectTxnsin classAbstractNodeDAOImpl
-
selectTxnsUnused
protected List<Long> selectTxnsUnused(Long minTxnId, Long maxCommitTime, 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 Long selectMinTxnCommitTime()
- Specified by:
selectMinTxnCommitTimein classAbstractNodeDAOImpl
-
selectMaxTxnCommitTime
protected Long selectMaxTxnCommitTime()
- Specified by:
selectMaxTxnCommitTimein classAbstractNodeDAOImpl
-
selectMinTxnCommitTimeForDeletedNodes
protected Long selectMinTxnCommitTimeForDeletedNodes()
- Specified by:
selectMinTxnCommitTimeForDeletedNodesin classAbstractNodeDAOImpl
-
selectMinTxnId
protected Long selectMinTxnId()
- Specified by:
selectMinTxnIdin classAbstractNodeDAOImpl
-
selectMinUnusedTxnCommitTime
protected Long selectMinUnusedTxnCommitTime()
- Specified by:
selectMinUnusedTxnCommitTimein classAbstractNodeDAOImpl
-
selectMaxTxnId
protected Long selectMaxTxnId()
- Specified by:
selectMaxTxnIdin classAbstractNodeDAOImpl
-
countChildAssocsByParent
public int countChildAssocsByParent(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?
-
selectMinTxInNodeIdRange
protected Long selectMinTxInNodeIdRange(Long fromNodeId, Long toNodeId)
Gets the minimum commit time from transactions including a node id in the range [fromNodeId:toNodeId]- Specified by:
selectMinTxInNodeIdRangein classAbstractNodeDAOImpl- Parameters:
fromNodeId- Initial node idtoNodeId- Final node id- Returns:
- minimum commit time
-
selectMaxTxInNodeIdRange
protected Long selectMaxTxInNodeIdRange(Long fromNodeId, Long toNodeId)
Gets the maximum commit time from transactions including a node id in the range [fromNodeId:toNodeId]- Specified by:
selectMaxTxInNodeIdRangein classAbstractNodeDAOImpl- Parameters:
fromNodeId- Initial node idtoNodeId- Final node id- Returns:
- maximum commit time
-
selectNextTxCommitTime
public Long selectNextTxCommitTime(Long fromCommitTime)
Gets the next commit time from [fromCommitTime]- Specified by:
selectNextTxCommitTimein classAbstractNodeDAOImpl- Parameters:
fromCommitTime- Initial commit time- Returns:
- next commit time
-
getOneTxnsByCommitTimeDescending
public List<Transaction> getOneTxnsByCommitTimeDescending(Long fromTimeInclusive, Long toTimeExclusive, boolean remoteOnly)
Get most recent transaction made in a given commit time range
-
-