Package org.alfresco.repo.domain.node
Class AbstractNodeDAOImpl
- java.lang.Object
-
- org.alfresco.repo.domain.node.AbstractNodeDAOImpl
-
- All Implemented Interfaces:
BatchingDAO,NodeDAO,NodeBulkLoader
- Direct Known Subclasses:
NodeDAOImpl
public abstract class AbstractNodeDAOImpl extends java.lang.Object implements NodeDAO, BatchingDAO
Abstract implementation for Node DAO.This provides basic services such as caching, but defers to the underlying implementation for CRUD operations.
- Since:
- 3.4
- Author:
- Derek Hulley
-
-
Nested Class Summary
-
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 booleanisDebugEnabledprotected org.apache.commons.logging.Logloggerstatic java.lang.LongLONG_ZERO
-
Constructor Summary
Constructors Constructor Description AbstractNodeDAOImpl()Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanaddNodeAspects(java.lang.Long nodeId, java.util.Set<org.alfresco.service.namespace.QName> aspectQNames)booleanaddNodeProperties(java.lang.Long nodeId, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties)booleanaddNodeProperty(java.lang.Long nodeId, org.alfresco.service.namespace.QName qname, java.io.Serializable value)voidcacheNodes(java.util.List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)Pre-cache data relevant to the given nodes.voidcacheNodesById(java.util.List<java.lang.Long> nodeIds)Pre-cache data relevant to the given nodes.voidclear()FOR TESTING ONLY: Clears out node cache datavoidcycleCheck(java.lang.Long nodeId)Potentially cheaper than evaluating all of a node's paths to check for child association cyclesvoiddeleteChildAssoc(java.lang.Long assocId)protected abstract intdeleteChildAssocs(java.util.List<java.lang.Long> ids)voiddeleteNode(java.lang.Long nodeId)Deletes the node and all entities.protected abstract intdeleteNodeAspects(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)protected abstract intdeleteNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId)protected abstract intdeleteNodeAssocs(java.util.List<java.lang.Long> ids)protected abstract intdeleteNodeById(java.lang.Long nodeId)protected abstract intdeleteNodeProperties(java.lang.Long nodeId, java.util.List<NodePropertyKey> propKeys)protected abstract intdeleteNodeProperties(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)protected abstract intdeleteNodesByCommitTime(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)protected abstract voiddeleteSubscriptions(java.lang.Long nodeId)protected abstract intdeleteTransaction(java.lang.Long txnId)booleanexists(java.lang.Long nodeId)Find out if a node exists.booleanexists(org.alfresco.service.cmr.repository.NodeRef nodeRef)Find out if a node exists.booleanexists(org.alfresco.service.cmr.repository.StoreRef storeRef)Find out if a store exists or notjava.util.Set<org.alfresco.service.cmr.repository.NodeRef>getAllRootNodes(org.alfresco.service.cmr.repository.StoreRef storeRef)java.util.Set<java.lang.Long>getCachedAncestors(java.util.List<java.lang.Long> nodeIds)Gets the current set of cached ancestors of the given list of nodes.org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef>getChildAssoc(java.lang.Long assocId)Get a specific associationorg.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef>getChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)Get a specific child association given all the determining data.org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef>getChildAssoc(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childName)Checks a cache and then queries.voidgetChildAssocs(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)Get the child associations of a given parent node, optionally filtering on association QName and association type QName.voidgetChildAssocs(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Get the child associations of a given parent node, optionally filtering on type QName.voidgetChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.util.Collection<java.lang.String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Get the child associations of a given parent node, filtering on type QName and the cm:name of the child nodes.voidgetChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Gets the first n child associations of a given parent node, optionally filtering on association QName and association type QName.voidgetChildAssocsByChildTypes(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)voidgetChildAssocsByPropertyValue(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName propertyQName, java.io.Serializable value, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Select children by property valuesvoidgetChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Gets the set of child associations of a certain parent node without parent associations of a certain type to other nodes with the same parent! In effect the 'orphans' with respect to a certain association type.java.lang.LonggetCurrentTransactionId(boolean ensureNew)java.lang.LonggetMaxTxnCommitTime()java.lang.LonggetMaxTxnId()java.lang.LonggetMaxTxnIdByCommitTime(long maxCommitTime)Retrieves the maximum transaction ID for which the commit time is less than the given time.java.lang.LonggetMinTxnCommitTime()java.lang.LonggetMinTxnCommitTimeForDeletedNodes()java.lang.LonggetMinTxnId()java.lang.LonggetMinUnusedTxnCommitTime()java.lang.LonggetNodeAclId(java.lang.Long nodeId)java.util.Set<org.alfresco.service.namespace.QName>getNodeAspects(java.lang.Long nodeId)org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>getNodeAssoc(java.lang.Long assocId)org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>getNodeAssocOrNull(java.lang.Long assocId)java.util.Collection<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>>getNodeAssocsToAndFrom(java.lang.Long nodeId)org.alfresco.service.cmr.repository.NodeRef.StatusgetNodeIdStatus(java.lang.Long nodeId)Get the current status of the node, including deleted nodes.org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef>getNodePair(java.lang.Long nodeId)org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef>getNodePair(org.alfresco.service.cmr.repository.NodeRef nodeRef)java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable>getNodeProperties(java.lang.Long nodeId)java.io.SerializablegetNodeProperty(java.lang.Long nodeId, org.alfresco.service.namespace.QName propertyQName)org.alfresco.service.cmr.repository.NodeRef.StatusgetNodeRefStatus(org.alfresco.service.cmr.repository.NodeRef nodeRef)Get the current status of the node, including deleted nodes.voidgetNodesWithAspects(java.util.Set<org.alfresco.service.namespace.QName> aspectQNames, java.lang.Long minNodeId, java.lang.Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)Get nodes with aspects between the given rangesorg.alfresco.service.namespace.QNamegetNodeType(java.lang.Long nodeId)voidgetParentAssocs(java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, java.lang.Boolean isPrimary, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Get the parent association of a given parent node, optionally filtering on association QName and association type QName.java.util.List<org.alfresco.service.cmr.repository.Path>getPaths(org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef> nodePair, boolean primaryOnly)Build the paths for a node.java.util.List<NodeIdAndAclId>getPrimaryChildrenAcls(java.lang.Long nodeId)Fetch all primary child node IDs and corresponding ACL IDs.org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef>getPrimaryParentAssoc(java.lang.Long childNodeId)Finds the association between the node's primary parent and the node itselforg.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef>getRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)protected java.lang.LonggetServerId()Get the ID of the current server, or null if there is no ID for the current server and one can't be created.java.util.Collection<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>>getSourceNodeAssocs(java.lang.Long targetNodeId, org.alfresco.service.namespace.QName typeQName)org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.StoreRef>getStore(org.alfresco.service.cmr.repository.StoreRef storeRef)Get the ID-ref pair for a storejava.util.List<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.StoreRef>>getStores()Fetch a list of all stores in the repositoryjava.util.Collection<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>>getTargetAssocsByPropertyValue(java.lang.Long sourceNodeId, org.alfresco.service.namespace.QName typeQName, org.alfresco.service.namespace.QName propertyQName, java.io.Serializable propertyValue)Get target associations by type of the association, property name and value.java.util.Collection<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>>getTargetNodeAssocs(java.lang.Long sourceNodeId, org.alfresco.service.namespace.QName typeQName)intgetTransactionCount()TransactiongetTxnById(java.lang.Long txnId)Retrieves a specific transaction.java.util.List<org.alfresco.service.cmr.repository.NodeRef.Status>getTxnChanges(java.lang.Long txnId)java.util.List<org.alfresco.service.cmr.repository.NodeRef.Status>getTxnChangesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.Long txnId)java.util.List<Transaction>getTxnsByCommitTimeAscending(java.lang.Long fromTimeInclusive, java.lang.Long toTimeExclusive, int count, java.util.List<java.lang.Long> excludeTxnIds, boolean remoteOnly)Get all transactions in a given time range.java.util.List<Transaction>getTxnsByCommitTimeAscending(java.util.List<java.lang.Long> includeTxnIds)Get a specific list of transactions ordered by commit time.java.util.List<Transaction>getTxnsByCommitTimeDescending(java.lang.Long fromTimeInclusive, java.lang.Long toTimeExclusive, int count, java.util.List<java.lang.Long> excludeTxnIds, boolean remoteOnly)Get all transactions in a given time range.java.util.List<java.lang.Long>getTxnsUnused(java.lang.Long minTxnId, long maxCommitTime, int count)booleanhasNodeAspect(java.lang.Long nodeId, org.alfresco.service.namespace.QName aspectQName)voidinit()protected abstract java.lang.LonginsertChildAssoc(ChildAssocEntity assoc)protected abstract java.lang.LonginsertNode(NodeEntity node)protected abstract voidinsertNodeAspect(java.lang.Long nodeId, java.lang.Long qnameId)protected abstract java.lang.LonginsertNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId, int assocIndex)protected abstract voidinsertNodeProperties(java.lang.Long nodeId, java.util.Map<NodePropertyKey,NodePropertyValue> persistableProps)protected abstract java.lang.LonginsertServer(java.lang.String ipAddress)protected abstract java.lang.LonginsertStore(StoreEntity store)protected abstract java.lang.LonginsertTransaction(java.lang.Long serverId, java.lang.String changeTxnId, java.lang.Long commit_time_ms)booleanisInCurrentTxn(java.lang.Long nodeId)org.alfresco.util.Pair<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef>,org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef>>moveNode(java.lang.Long childNodeId, java.lang.Long newParentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)Update a node's primary association, giving it a new parent and new association parameters.protected abstract voidmoveNodeData(java.lang.Long fromNodeId, java.lang.Long toNodeId)Moves all node-linked data from one node to another.voidmoveStore(org.alfresco.service.cmr.repository.StoreRef oldStoreRef, org.alfresco.service.cmr.repository.StoreRef newStoreRef)Changes the old store reference to the new store reference.org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef>newChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, java.lang.String childNodeName)Create a new child association.protected java.lang.LongnewChildAssocInsert(ChildAssocEntity assoc, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childNodeName)protected java.lang.LongnewChildAssocInsertImpl(ChildAssocEntity assoc, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childNodeName)ChildAssocEntitynewNode(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String uuid, org.alfresco.service.namespace.QName nodeTypeQName, java.util.Locale nodeLocale, java.lang.String childNodeName, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> auditableProperties)Create a new node.java.lang.LongnewNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, org.alfresco.service.namespace.QName assocTypeQName, int assocIndex)Create a new associationprotected java.lang.LongnewNodeImplInsert(NodeEntity node)org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef>newStore(org.alfresco.service.cmr.repository.StoreRef storeRef)Creates a unique store for the given protocol and identifier combination.intpurgeNodes(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)Purge deleted nodes where their participating transactions are in-between the given time interval.voidpurgeTxn(java.lang.Long txnId)booleanremoveNodeAspects(java.lang.Long nodeId)booleanremoveNodeAspects(java.lang.Long nodeId, java.util.Set<org.alfresco.service.namespace.QName> aspectQNames)intremoveNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, org.alfresco.service.namespace.QName assocTypeQName)Remove a specific node associationintremoveNodeAssocs(java.util.List<java.lang.Long> ids)Remove all node associations of given IDsbooleanremoveNodeProperties(java.lang.Long nodeId, java.util.Set<org.alfresco.service.namespace.QName> propertyQNames)protected abstract java.util.List<StoreEntity>selectAllStores()protected abstract ChildAssocEntityselectChildAssoc(java.lang.Long assocId)protected abstract 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 abstract ChildAssocEntityselectChildAssoc(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childName)protected abstract 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 abstract voidselectChildAssocs(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected abstract voidselectChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.util.Collection<java.lang.String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected abstract voidselectChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected abstract voidselectChildAssocsByChildTypes(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected abstract voidselectChildAssocsByPropertyValue(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName propertyQName, NodePropertyValue nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected abstract voidselectChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)protected abstract java.util.List<ChildAssocEntity>selectChildNodeIds(java.lang.Long nodeId, java.lang.Boolean isPrimary, java.lang.Long minAssocIdInclusive, int maxResults)protected abstract TransactionselectLastTxnBeforeCommitTime(java.lang.Long maxCommitTime)protected abstract java.lang.LongselectMaxTxnCommitTime()protected abstract java.lang.LongselectMaxTxnId()protected abstract java.lang.LongselectMinTxnCommitTime()protected abstract java.lang.LongselectMinTxnCommitTimeForDeletedNodes()protected abstract java.lang.LongselectMinTxnId()protected abstract java.lang.LongselectMinUnusedTxnCommitTime()protected abstract java.util.Map<NodeVersionKey,java.util.Set<org.alfresco.service.namespace.QName>>selectNodeAspects(java.util.Set<java.lang.Long> nodeIds)protected abstract NodeAssocEntityselectNodeAssocById(java.lang.Long assocId)protected abstract intselectNodeAssocMaxIndex(java.lang.Long sourceNodeId, java.lang.Long assocTypeQNameId)protected abstract java.util.List<NodeAssocEntity>selectNodeAssocs(java.lang.Long nodeId)protected abstract java.util.List<NodeAssocEntity>selectNodeAssocsBySource(java.lang.Long sourceNodeId, java.lang.Long typeQNameId)protected abstract java.util.List<NodeAssocEntity>selectNodeAssocsBySourceAndPropertyValue(java.lang.Long sourceNodeId, java.lang.Long typeQNameId, java.lang.Long propertyQNameId, NodePropertyValue nodeValue)protected abstract java.util.List<NodeAssocEntity>selectNodeAssocsByTarget(java.lang.Long targetNodeId, java.lang.Long typeQNameId)protected abstract NodeEntityselectNodeById(java.lang.Long id)protected abstract NodeEntityselectNodeByNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)protected abstract java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>>selectNodeProperties(java.lang.Long nodeId)protected abstract java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>>selectNodeProperties(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)protected abstract java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>>selectNodeProperties(java.util.Set<java.lang.Long> nodeIds)protected abstract java.util.List<Node>selectNodesByIds(java.util.SortedSet<java.lang.Long> ids)protected abstract java.util.List<Node>selectNodesByUuids(java.lang.Long storeId, java.util.SortedSet<java.lang.String> uuids)protected abstract voidselectNodesWithAspects(java.util.List<java.lang.Long> qnameIds, java.lang.Long minNodeId, java.lang.Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)protected abstract java.util.List<ChildAssocEntity>selectParentAssocs(java.lang.Long childNodeId)protected abstract 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 callbackprotected abstract java.util.List<NodeIdAndAclId>selectPrimaryChildAcls(java.lang.Long nodeId)protected abstract java.util.List<ChildAssocEntity>selectPrimaryParentAssocs(java.lang.Long childNodeId)No DB constraint, so multiple returnedprotected abstract ServerEntityselectServer(java.lang.String ipAddress)protected abstract StoreEntityselectStore(org.alfresco.service.cmr.repository.StoreRef storeRef)protected abstract NodeEntityselectStoreRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)protected abstract intselectTransactionCount()protected abstract TransactionselectTxnById(java.lang.Long txnId)protected abstract java.util.List<NodeEntity>selectTxnChanges(java.lang.Long txnId, java.lang.Long storeId)protected abstract 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 abstract java.util.List<java.lang.Long>selectTxnsUnused(java.lang.Long minTxnId, java.lang.Long maxCommitTime, java.lang.Integer count)voidsetAccessControlListDAO(AccessControlListDAO accessControlListDAO)voidsetAclDAO(AclDAO aclDAO)voidsetAllRootNodesCache(org.alfresco.repo.cache.SimpleCache<org.alfresco.service.cmr.repository.StoreRef,java.util.Set<org.alfresco.service.cmr.repository.NodeRef>> allRootNodesCache)Set the cache that maintains the extended Store root node datavoidsetAspectsCache(org.alfresco.repo.cache.SimpleCache<NodeVersionKey,java.util.Set<org.alfresco.service.namespace.QName>> aspectsCache)Set the cache that maintains the Node QName IDsvoidsetCachingThreshold(int cachingThreshold)voidsetCheckNodeConsistency()Transaction-scope setting to make the Node loader to guarantee the validity of all caches: some cache data will be reloaded; some cache data will be considered safe.intsetChildAssocIndex(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int index)Sets the association index ordering.voidsetChildAssocsUniqueName(java.lang.Long childNodeId, java.lang.String childName)TODO: See about pulling automatic cm:name update logic into this DAOprotected intsetChildAssocsUniqueNameImpl(java.lang.Long childNodeId, java.lang.String childName)voidsetChildByNameCache(org.alfresco.repo.cache.SimpleCache<org.alfresco.repo.domain.node.ChildByNameKey,ChildAssocEntity> childByNameCache)Set the cache that maintains lookups by child cm:namevoidsetContentDataDAO(ContentDataDAO contentDataDAO)voidsetControlDAO(ControlDAO controlDAO)voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)voidsetLocaleDAO(LocaleDAO localeDAO)booleansetModifiedDate(java.lang.Long nodeId, java.util.Date modifiedDate)Pull the cm:modified up to the current time without changing any other cm:auditable properties.booleansetModifiedProperties(java.lang.Long nodeId, java.util.Date modifiedDate, java.lang.String modifiedBy)Pull the cm:modified up to the current time without changing any other cm:auditable properties.voidsetNodeAclId(java.lang.Long nodeId, java.lang.Long aclId)voidsetNodeAssocIndex(java.lang.Long id, int assocIndex)Update an existing assoc's index.booleansetNodeProperties(java.lang.Long nodeId, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties)voidsetNodesCache(org.alfresco.repo.cache.SimpleCache<java.io.Serializable,java.io.Serializable> cache)Set the cache that maintains node ID-NodeRef cross referencing datavoidsetParentAssocsCacheLimitFactor(int parentAssocsCacheLimitFactor)Sets the average number of parents expected per cache entry.voidsetParentAssocsCacheSize(int parentAssocsCacheSize)Sets the maximum capacity of the parent assocs cachevoidsetPolicyBehaviourFilter(BehaviourFilter policyBehaviourFilter)voidsetPrimaryChildrenSharedAclId(java.lang.Long primaryParentNodeId, java.lang.Long optionalOldSharedAlcIdInAdditionToNull, java.lang.Long newSharedAclId)voidsetPropertiesCache(org.alfresco.repo.cache.SimpleCache<NodeVersionKey,java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable>> propertiesCache)Set the cache that maintains the Node property valuesvoidsetQnameDAO(QNameDAO qnameDAO)voidsetRootNodesCache(org.alfresco.repo.cache.SimpleCache<java.io.Serializable,java.io.Serializable> cache)Set the cache that maintains the Store root node datavoidsetTransactionService(TransactionService transactionService)voidsetUsageDAO(UsageDAO usageDAO)inttouchNodes(java.lang.Long txnId, java.util.List<java.lang.Long> nodeIds)Update the transaction associated with a lust of nodesprotected abstract intupdateChildAssocIndex(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int index)protected abstract intupdateChildAssocUniqueName(java.lang.Long assocId, java.lang.String name)protected intupdateChildAssocUniqueNameImpl(java.lang.Long childNodeId, java.lang.String childName)booleanupdateNode(java.lang.Long nodeId, org.alfresco.service.namespace.QName nodeTypeQName, java.util.Locale nodeLocale)protected abstract intupdateNode(NodeUpdateEntity nodeUpdate)protected abstract intupdateNodeAssoc(java.lang.Long id, int assocIndex)protected abstract intupdateNodes(java.lang.Long txnId, java.util.List<java.lang.Long> nodeIds)protected abstract intupdateNodesInStore(java.lang.Long txnId, java.lang.Long storeId)protected abstract voidupdatePrimaryChildrenSharedAclId(java.lang.Long txnId, java.lang.Long primaryParentNodeId, java.lang.Long optionalOldSharedAlcIdInAdditionToNull, java.lang.Long newSharedAlcId)protected abstract 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 voidupdatePrimaryParentAssocs(ChildAssocEntity primaryParentAssoc, Node newParentNode, Node childNode, java.lang.Long newChildNodeId, java.lang.String childNodeName, java.lang.Long oldParentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)protected intupdatePrimaryParentAssocsImpl(ChildAssocEntity primaryParentAssoc, Node newParentNode, Node childNode, java.lang.Long newChildNodeId, java.lang.String childNodeName, java.lang.Long oldParentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)protected abstract intupdateStore(StoreEntity store)protected abstract intupdateStoreRoot(StoreEntity store)protected abstract intupdateTransaction(java.lang.Long txnId, java.lang.Long commit_time_ms)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.ibatis.BatchingDAO
executeBatch, startBatch
-
Methods inherited from interface org.alfresco.repo.domain.node.NodeDAO
countChildAssocsByParent, deleteTxnsUnused, getMaxNodeId, getMinNodeId, getNodeIdsIntervalForType, getOneTxnsByCommitTimeDescending, selectChildAssocsWithoutNodeAssocsOfTypes, selectNodePropertiesByDataType, selectNodePropertiesByTypes
-
-
-
-
Method Detail
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
- Parameters:
transactionService- the service to start post-txn processes
-
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
- Parameters:
dictionaryService- the service help determine cm:auditable characteristics
-
setCachingThreshold
public void setCachingThreshold(int cachingThreshold)
-
setPolicyBehaviourFilter
public void setPolicyBehaviourFilter(BehaviourFilter policyBehaviourFilter)
- Parameters:
policyBehaviourFilter- the service to determine the behaviour for cm:auditable and other inherent capabilities.
-
setAclDAO
public void setAclDAO(AclDAO aclDAO)
- Parameters:
aclDAO- used to update permissions during certain operations
-
setAccessControlListDAO
public void setAccessControlListDAO(AccessControlListDAO accessControlListDAO)
- Parameters:
accessControlListDAO- used to update ACL inheritance during node moves
-
setControlDAO
public void setControlDAO(ControlDAO controlDAO)
- Parameters:
controlDAO- create Savepoints
-
setQnameDAO
public void setQnameDAO(QNameDAO qnameDAO)
- Parameters:
qnameDAO- translates QName IDs into QName instances and vice-versa
-
setContentDataDAO
public void setContentDataDAO(ContentDataDAO contentDataDAO)
- Parameters:
contentDataDAO- used to create and delete content references
-
setLocaleDAO
public void setLocaleDAO(LocaleDAO localeDAO)
- Parameters:
localeDAO- used to handle MLText properties
-
setUsageDAO
public void setUsageDAO(UsageDAO usageDAO)
- Parameters:
usageDAO- used to keep content usage calculations in line
-
setRootNodesCache
public void setRootNodesCache(org.alfresco.repo.cache.SimpleCache<java.io.Serializable,java.io.Serializable> cache)
Set the cache that maintains the Store root node data- Parameters:
cache- the cache
-
setAllRootNodesCache
public void setAllRootNodesCache(org.alfresco.repo.cache.SimpleCache<org.alfresco.service.cmr.repository.StoreRef,java.util.Set<org.alfresco.service.cmr.repository.NodeRef>> allRootNodesCache)
Set the cache that maintains the extended Store root node data- Parameters:
allRootNodesCache- the cache
-
setNodesCache
public void setNodesCache(org.alfresco.repo.cache.SimpleCache<java.io.Serializable,java.io.Serializable> cache)
Set the cache that maintains node ID-NodeRef cross referencing data- Parameters:
cache- the cache
-
setAspectsCache
public void setAspectsCache(org.alfresco.repo.cache.SimpleCache<NodeVersionKey,java.util.Set<org.alfresco.service.namespace.QName>> aspectsCache)
Set the cache that maintains the Node QName IDs- Parameters:
aspectsCache- the cache
-
setPropertiesCache
public void setPropertiesCache(org.alfresco.repo.cache.SimpleCache<NodeVersionKey,java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable>> propertiesCache)
Set the cache that maintains the Node property values- Parameters:
propertiesCache- the cache
-
setParentAssocsCacheSize
public void setParentAssocsCacheSize(int parentAssocsCacheSize)
Sets the maximum capacity of the parent assocs cache- Parameters:
parentAssocsCacheSize- the cache size
-
setParentAssocsCacheLimitFactor
public void setParentAssocsCacheLimitFactor(int parentAssocsCacheLimitFactor)
Sets the average number of parents expected per cache entry. This parameter is multiplied by thesetParentAssocsCacheSize(int)parameter to compute a limit on the total number of cached parents, which will be proportional to the cache's memory usage. The cache will be pruned when this limit is exceeded to avoid excessive memory usage.- Parameters:
parentAssocsCacheLimitFactor- the parentAssocsCacheLimitFactor to set
-
setChildByNameCache
public void setChildByNameCache(org.alfresco.repo.cache.SimpleCache<org.alfresco.repo.domain.node.ChildByNameKey,ChildAssocEntity> childByNameCache)
Set the cache that maintains lookups by child cm:name- Parameters:
childByNameCache- the cache
-
init
public void init()
-
getServerId
protected java.lang.Long getServerId()
Get the ID of the current server, or null if there is no ID for the current server and one can't be created.
-
getCurrentTransactionId
public java.lang.Long getCurrentTransactionId(boolean ensureNew)
- Specified by:
getCurrentTransactionIdin interfaceNodeDAO- Parameters:
ensureNew- true to ensure that a new transaction entry is created if the current transaction does not have one.- Returns:
- Returns the ID of the current transaction entry or null if there have not been any modifications to nodes registered in the transaction and forceNew is false
-
getStore
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.StoreRef> getStore(org.alfresco.service.cmr.repository.StoreRef storeRef)
Description copied from interface:NodeDAOGet the ID-ref pair for a store
-
getStores
public java.util.List<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.StoreRef>> getStores()
Description copied from interface:NodeDAOFetch a list of all stores in the repository
-
exists
public boolean exists(org.alfresco.service.cmr.repository.StoreRef storeRef)
Description copied from interface:NodeDAOFind out if a store exists or not
-
getRootNode
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef> getRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)
- Specified by:
getRootNodein interfaceNodeDAO
-
getAllRootNodes
public java.util.Set<org.alfresco.service.cmr.repository.NodeRef> getAllRootNodes(org.alfresco.service.cmr.repository.StoreRef storeRef)
- Specified by:
getAllRootNodesin interfaceNodeDAO
-
newStore
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef> newStore(org.alfresco.service.cmr.repository.StoreRef storeRef)
Description copied from interface:NodeDAOCreates a unique store for the given protocol and identifier combination. The root node is created with the "root" aspect.
-
moveStore
public void moveStore(org.alfresco.service.cmr.repository.StoreRef oldStoreRef, org.alfresco.service.cmr.repository.StoreRef newStoreRef)Description copied from interface:NodeDAOChanges the old store reference to the new store reference.
-
exists
public boolean exists(java.lang.Long nodeId)
Description copied from interface:NodeDAOFind out if a node exists. Unpurged deleted nodes do not count as they are the DAO's concern only.
-
exists
public boolean exists(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:NodeDAOFind out if a node exists. Unpurged deleted nodes do not count as they are the DAO's concern only.
-
isInCurrentTxn
public boolean isInCurrentTxn(java.lang.Long nodeId)
- Specified by:
isInCurrentTxnin interfaceNodeDAO- Returns:
- Returns true if the node was last modified in the current transaction, otherwise false.
-
getNodeRefStatus
public org.alfresco.service.cmr.repository.NodeRef.Status getNodeRefStatus(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface:NodeDAOGet the current status of the node, including deleted nodes.- Specified by:
getNodeRefStatusin interfaceNodeDAO- Parameters:
nodeRef- the node reference- Returns:
- Returns the current status of the reference. This will only be null if the node never existed or has been purged following deletion.
-
getNodeIdStatus
public org.alfresco.service.cmr.repository.NodeRef.Status getNodeIdStatus(java.lang.Long nodeId)
Description copied from interface:NodeDAOGet the current status of the node, including deleted nodes.- Specified by:
getNodeIdStatusin interfaceNodeDAO- Parameters:
nodeId- the node id- Returns:
- Returns the current status of the reference. This will only be null if the node never existed or has been purged following deletion.
-
getNodePair
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef> getNodePair(org.alfresco.service.cmr.repository.NodeRef nodeRef)
- Specified by:
getNodePairin interfaceNodeDAO
-
getNodePair
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef> getNodePair(java.lang.Long nodeId)
- Specified by:
getNodePairin interfaceNodeDAO
-
getNodeType
public org.alfresco.service.namespace.QName getNodeType(java.lang.Long nodeId)
- Specified by:
getNodeTypein interfaceNodeDAO
-
getNodeAclId
public java.lang.Long getNodeAclId(java.lang.Long nodeId)
- Specified by:
getNodeAclIdin interfaceNodeDAO
-
newNode
public ChildAssocEntity newNode(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String uuid, org.alfresco.service.namespace.QName nodeTypeQName, java.util.Locale nodeLocale, java.lang.String childNodeName, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> auditableProperties) throws org.alfresco.service.cmr.dictionary.InvalidTypeException
Description copied from interface:NodeDAOCreate a new node. Note that allowing the uuid to be assigned by passing in a null is more efficient.- Specified by:
newNodein interfaceNodeDAO- Parameters:
parentNodeId- the ID of the parent node (may not be null)assocTypeQName- the primary association (may not be null)assocQName- the association path (may not be null)storeRef- the store to which the node must belonguuid- the node store-unique identifier, or null to assign a GUIDnodeTypeQName- the type of the nodenodeLocale- the locale of the nodechildNodeName- the cm:name of the child node or null to use the node's UUIDauditableProperties- a map containing any cm:auditable properties for the node- Returns:
- Returns the details of the child association created
- Throws:
org.alfresco.service.cmr.dictionary.InvalidTypeException- if the node type is invalid or if the node type is not a valid real node
-
newNodeImplInsert
protected java.lang.Long newNodeImplInsert(NodeEntity node)
-
moveNode
public org.alfresco.util.Pair<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef>,org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef>> moveNode(java.lang.Long childNodeId, java.lang.Long newParentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)Description copied from interface:NodeDAOUpdate a node's primary association, giving it a new parent and new association parameters. **NEW**: If the parent node's store differs from the child node's store, then a new child node's is created.- Specified by:
moveNodein interfaceNodeDAO- Parameters:
childNodeId- the child node that is movingnewParentNodeId- the new parent node (may not be null)assocTypeQName- the new association type or null to keep the existing typeassocQName- the new association qname or null to keep the existing name- Returns:
- Returns the (first) new association reference and new child reference (second)
-
updatePrimaryParentAssocs
protected void updatePrimaryParentAssocs(ChildAssocEntity primaryParentAssoc, Node newParentNode, Node childNode, java.lang.Long newChildNodeId, java.lang.String childNodeName, java.lang.Long oldParentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)
-
updatePrimaryParentAssocsImpl
protected int updatePrimaryParentAssocsImpl(ChildAssocEntity primaryParentAssoc, Node newParentNode, Node childNode, java.lang.Long newChildNodeId, java.lang.String childNodeName, java.lang.Long oldParentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)
-
updateNode
public boolean updateNode(java.lang.Long nodeId, org.alfresco.service.namespace.QName nodeTypeQName, java.util.Locale nodeLocale)- Specified by:
updateNodein interfaceNodeDAOnodeTypeQName- the new type QName for the node or null to keep the existing onenodeLocale- the new locale for the node or null to keep the existing one- Returns:
- true if any changes were made
-
touchNodes
public int touchNodes(java.lang.Long txnId, java.util.List<java.lang.Long> nodeIds)Description copied from interface:NodeDAOUpdate the transaction associated with a lust of nodes- Specified by:
touchNodesin interfaceNodeDAO- Parameters:
txnId- - the tx id to setnodeIds- - the nodes to update- Returns:
- the number of nodes touched
-
setNodeAclId
public void setNodeAclId(java.lang.Long nodeId, java.lang.Long aclId)- Specified by:
setNodeAclIdin interfaceNodeDAO
-
setPrimaryChildrenSharedAclId
public void setPrimaryChildrenSharedAclId(java.lang.Long primaryParentNodeId, java.lang.Long optionalOldSharedAlcIdInAdditionToNull, java.lang.Long newSharedAclId)- Specified by:
setPrimaryChildrenSharedAclIdin interfaceNodeDAO
-
deleteNode
public void deleteNode(java.lang.Long nodeId)
Description copied from interface:NodeDAODeletes the node and all entities. Note that the node entry will still exist and be associated with a live transaction.- Specified by:
deleteNodein interfaceNodeDAO
-
purgeNodes
public int purgeNodes(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)Description copied from interface:NodeDAOPurge deleted nodes where their participating transactions are in-between the given time interval.- Specified by:
purgeNodesin interfaceNodeDAO- Parameters:
fromTxnCommitTimeMs- from commit timetoTxnCommitTimeMs- to commit time- Returns:
- Returns the number of deleted nodes purged
-
getNodeProperties
public java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> getNodeProperties(java.lang.Long nodeId)
- Specified by:
getNodePropertiesin interfaceNodeDAO
-
getNodeProperty
public java.io.Serializable getNodeProperty(java.lang.Long nodeId, org.alfresco.service.namespace.QName propertyQName)- Specified by:
getNodePropertyin interfaceNodeDAO
-
setNodeProperties
public boolean setNodeProperties(java.lang.Long nodeId, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties)- Specified by:
setNodePropertiesin interfaceNodeDAO
-
addNodeProperty
public boolean addNodeProperty(java.lang.Long nodeId, org.alfresco.service.namespace.QName qname, java.io.Serializable value)- Specified by:
addNodePropertyin interfaceNodeDAO
-
addNodeProperties
public boolean addNodeProperties(java.lang.Long nodeId, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties)- Specified by:
addNodePropertiesin interfaceNodeDAO
-
removeNodeProperties
public boolean removeNodeProperties(java.lang.Long nodeId, java.util.Set<org.alfresco.service.namespace.QName> propertyQNames)- Specified by:
removeNodePropertiesin interfaceNodeDAO
-
setModifiedDate
public boolean setModifiedDate(java.lang.Long nodeId, java.util.Date modifiedDate)Description copied from interface:NodeDAOPull the cm:modified up to the current time without changing any other cm:auditable properties. The change may be done in the current transaction or in a later transaction.- Specified by:
setModifiedDatein interfaceNodeDAO- Parameters:
nodeId- the node to changemodifiedDate- the date to set for cm:modified- Returns:
- Returns true if the cm:modified property was actually set
-
setModifiedProperties
public boolean setModifiedProperties(java.lang.Long nodeId, java.util.Date modifiedDate, java.lang.String modifiedBy)Description copied from interface:NodeDAOPull the cm:modified up to the current time without changing any other cm:auditable properties. The change may be done in the current transaction or in a later transaction.- Specified by:
setModifiedPropertiesin interfaceNodeDAO- Parameters:
nodeId- the node to changemodifiedDate- the date to set for cm:modifiedmodifiedBy- the name to set for cm:modifier- Returns:
- Returns true if the cm:modified and cm:modifier properties were actually set
-
getNodeAspects
public java.util.Set<org.alfresco.service.namespace.QName> getNodeAspects(java.lang.Long nodeId)
- Specified by:
getNodeAspectsin interfaceNodeDAO
-
hasNodeAspect
public boolean hasNodeAspect(java.lang.Long nodeId, org.alfresco.service.namespace.QName aspectQName)- Specified by:
hasNodeAspectin interfaceNodeDAO
-
addNodeAspects
public boolean addNodeAspects(java.lang.Long nodeId, java.util.Set<org.alfresco.service.namespace.QName> aspectQNames)- Specified by:
addNodeAspectsin interfaceNodeDAO
-
removeNodeAspects
public boolean removeNodeAspects(java.lang.Long nodeId)
- Specified by:
removeNodeAspectsin interfaceNodeDAO
-
removeNodeAspects
public boolean removeNodeAspects(java.lang.Long nodeId, java.util.Set<org.alfresco.service.namespace.QName> aspectQNames)- Specified by:
removeNodeAspectsin interfaceNodeDAO
-
getNodesWithAspects
public void getNodesWithAspects(java.util.Set<org.alfresco.service.namespace.QName> aspectQNames, java.lang.Long minNodeId, java.lang.Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)Description copied from interface:NodeDAOGet nodes with aspects between the given ranges- Specified by:
getNodesWithAspectsin interfaceNodeDAO- Parameters:
aspectQNames- the aspects that must be on the nodesminNodeId- the minimum node ID (inclusive)maxNodeId- the maximum node ID (exclusive)resultsCallback- callback to process results
-
newNodeAssoc
public java.lang.Long newNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, org.alfresco.service.namespace.QName assocTypeQName, int assocIndex)Description copied from interface:NodeDAOCreate a new association- Specified by:
newNodeAssocin interfaceNodeDAO- Parameters:
sourceNodeId- the association sourcetargetNodeId- the association targetassocTypeQName- the type of the association (will be resolved to an ID)assocIndex- the index of the new association (-1 indicates next value)
-
setNodeAssocIndex
public void setNodeAssocIndex(java.lang.Long id, int assocIndex)Description copied from interface:NodeDAOUpdate an existing assoc's index.- Specified by:
setNodeAssocIndexin interfaceNodeDAO- Parameters:
id- the association IDassocIndex- the new index (greater than 0)
-
removeNodeAssoc
public int removeNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, org.alfresco.service.namespace.QName assocTypeQName)Description copied from interface:NodeDAORemove a specific node association- Specified by:
removeNodeAssocin interfaceNodeDAO- Parameters:
sourceNodeId- the source node IDtargetNodeId- the target node idassocTypeQName- the node association QName- Returns:
- Returns the number of associations removed
-
removeNodeAssocs
public int removeNodeAssocs(java.util.List<java.lang.Long> ids)
Description copied from interface:NodeDAORemove all node associations of given IDs- Specified by:
removeNodeAssocsin interfaceNodeDAO- Parameters:
ids- the IDs of the associations to remove- Returns:
- Returns the number of associations removed
-
getNodeAssocsToAndFrom
public java.util.Collection<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>> getNodeAssocsToAndFrom(java.lang.Long nodeId)
- Specified by:
getNodeAssocsToAndFromin interfaceNodeDAO- Parameters:
nodeId- the source or target of the associations- Returns:
- Returns all the node associations where the node is the source or target
-
getSourceNodeAssocs
public java.util.Collection<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>> getSourceNodeAssocs(java.lang.Long targetNodeId, org.alfresco.service.namespace.QName typeQName)- Specified by:
getSourceNodeAssocsin interfaceNodeDAO- Parameters:
targetNodeId- the target of the associationtypeQName- the type of the association (optional)- Returns:
- Returns all the node associations where the node is the target
-
getTargetNodeAssocs
public java.util.Collection<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>> getTargetNodeAssocs(java.lang.Long sourceNodeId, org.alfresco.service.namespace.QName typeQName)- Specified by:
getTargetNodeAssocsin interfaceNodeDAO- Parameters:
sourceNodeId- the source of the associationtypeQName- the type of the association (optional)- Returns:
- Returns all the node associations where the node is the source
-
getTargetAssocsByPropertyValue
public java.util.Collection<org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef>> getTargetAssocsByPropertyValue(java.lang.Long sourceNodeId, org.alfresco.service.namespace.QName typeQName, org.alfresco.service.namespace.QName propertyQName, java.io.Serializable propertyValue)Description copied from interface:NodeDAOGet target associations by type of the association, property name and value.- Specified by:
getTargetAssocsByPropertyValuein interfaceNodeDAO- Parameters:
sourceNodeId- the source of the associationtypeQName- the type of the association (null allowed)propertyQName- property QName (null allowed)propertyValue- property value (null allowed only if the propertyQName is null)- Returns:
- Returns all the node associations where the node is the source.
-
getNodeAssocOrNull
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef> getNodeAssocOrNull(java.lang.Long assocId)
- Specified by:
getNodeAssocOrNullin interfaceNodeDAO- Returns:
- Returns a specific node association with the given ID or null if it doesn't exist
-
getNodeAssoc
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.AssociationRef> getNodeAssoc(java.lang.Long assocId)
- Specified by:
getNodeAssocin interfaceNodeDAO- Returns:
- Returns a specific node association with the given ID
-
newChildAssocInsert
protected java.lang.Long newChildAssocInsert(ChildAssocEntity assoc, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childNodeName)
-
newChildAssocInsertImpl
protected java.lang.Long newChildAssocInsertImpl(ChildAssocEntity assoc, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childNodeName)
-
newChildAssoc
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef> newChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, java.lang.String childNodeName)Description copied from interface:NodeDAOCreate a new child association. The unique enforcement for cm:name will be done as part of the association creation i.e. there is no need to update it after the fact.- Specified by:
newChildAssocin interfaceNodeDAOchildNodeName- the cm:name to apply to the association- Returns:
- Returns the persisted and filled association's ID
-
deleteChildAssoc
public void deleteChildAssoc(java.lang.Long assocId)
- Specified by:
deleteChildAssocin interfaceNodeDAO- Parameters:
assocId- the ID of the child association to delete
-
setChildAssocIndex
public int setChildAssocIndex(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int index)Description copied from interface:NodeDAOSets the association index ordering.- Specified by:
setChildAssocIndexin interfaceNodeDAO- Parameters:
parentNodeId- the parent node IDchildNodeId- the child node IDassocTypeQName- the association typeassocQName- the association path qualified nameindex- the new index- Returns:
- Returns the number of associations modified
-
setChildAssocsUniqueName
public void setChildAssocsUniqueName(java.lang.Long childNodeId, java.lang.String childName)TODO: See about pulling automatic cm:name update logic into this DAO- Specified by:
setChildAssocsUniqueNamein interfaceNodeDAO- Parameters:
childNodeId- the child node who's name is changingchildName- the new cm:name value
-
setChildAssocsUniqueNameImpl
protected int setChildAssocsUniqueNameImpl(java.lang.Long childNodeId, java.lang.String childName)
-
updateChildAssocUniqueNameImpl
protected int updateChildAssocUniqueNameImpl(java.lang.Long childNodeId, java.lang.String childName)
-
getChildAssoc
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssoc(java.lang.Long assocId)
Description copied from interface:NodeDAOGet a specific association- Specified by:
getChildAssocin interfaceNodeDAO- Parameters:
assocId- the ID of the association- Returns:
- Returns the association reference or null if it doesn't exist
-
getPrimaryChildrenAcls
public java.util.List<NodeIdAndAclId> getPrimaryChildrenAcls(java.lang.Long nodeId)
Description copied from interface:NodeDAOFetch all primary child node IDs and corresponding ACL IDs.- Specified by:
getPrimaryChildrenAclsin interfaceNodeDAO- Parameters:
nodeId- the parent node ID- Returns:
- Returns a list of Node ID - ACL ID pairs
-
getChildAssoc
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)Description copied from interface:NodeDAOGet a specific child association given all the determining data.The implementation may find multiple entries (there is no constraint to prevent it) although the cm:name constraint will normally prevent the association from being created twice. The lowest ID association will always be returned and the others will be cleaned up if the transaction is read-write.
- Specified by:
getChildAssocin interfaceNodeDAO- Returns:
- Returns a matching association or null if one was not found.
-
getChildAssocs
public void getChildAssocs(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 interface:NodeDAOGet the child associations of a given parent node, optionally filtering on association QName and association type QName. This is an efficient query for node paths.- Specified by:
getChildAssocsin interfaceNodeDAO- Parameters:
parentNodeId- the parent node IDchildNodeId- the child node ID to filter on; null for no filteringassocTypeQName- the association type qname to filter on; null for no filteringassocQName- the association qname to filter on; null for no filteringisPrimary- filter for primary (true) or secondary associations; null for no filtering.sameStore- null to ignore, true to only get children that are in the same store as the parent, or false to only get children that are in a different store from the parent.resultsCallback- the callback that will be called with the results
-
getChildAssocs
public void getChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Description copied from interface:NodeDAOGets 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.- Specified by:
getChildAssocsin interfaceNodeDAO- Parameters:
parentNodeId- the parent node IDassocTypeQName- the association type qname to filter on; null for no filteringassocQName- the association qname to filter on; null for no filteringmaxResults- the maximum number of results to return. The query will be terminated efficiently after that number of resultsresultsCallback- the callback that will be called with the results
-
getChildAssocs
public void getChildAssocs(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Description copied from interface:NodeDAOGet the child associations of a given parent node, optionally filtering on type QName.- Specified by:
getChildAssocsin interfaceNodeDAO- Parameters:
parentNodeId- the parent node IDassocTypeQNames- the association type qnames to filter on; null for no filteringresultsCallback- the callback that will be called with the results
-
getChildAssoc
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssoc(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childName)Checks a cache and then queries. Note: If we were to cach misses, then we would have to ensure that the cache is kept up to date whenever any affection association is changed. This is actually not possible without forcing the cache to be fully clustered. So to avoid clustering the cache, we instead watch the node child version, which relies on a cache that is already clustered.- Specified by:
getChildAssocin interfaceNodeDAO- Parameters:
parentNodeId- the parent Node IDassocTypeQName- the association type to filter onchildName- the cm:name value to filter on- Returns:
- Returns an association matching the given parent, type and child name (cm:name) - or null if not found
-
getChildAssocs
public void getChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.util.Collection<java.lang.String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Description copied from interface:NodeDAOGet the child associations of a given parent node, filtering on type QName and the cm:name of the child nodes.NOTE: This method only works if the association type fundamentally supports unique-name enforcement.
- Specified by:
getChildAssocsin interfaceNodeDAO- Parameters:
parentNodeId- the parent nodeassocTypeQName- the type of the association to check; or null for no filtering. If the association type is not specified, then the same child node may be included several times.childNames- the names of the child nodes (cm:name). These will be matched exactly.resultsCallback- the callback that will be called with the results
-
getChildAssocsByPropertyValue
public void getChildAssocsByPropertyValue(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName propertyQName, java.io.Serializable value, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Description copied from interface:NodeDAOSelect children by property values- Specified by:
getChildAssocsByPropertyValuein interfaceNodeDAO
-
getChildAssocsByChildTypes
public void getChildAssocsByChildTypes(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)- Specified by:
getChildAssocsByChildTypesin interfaceNodeDAO
-
getChildAssocsWithoutParentAssocsOfType
public void getChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)Description copied from interface:NodeDAOGets the set of child associations of a certain parent node without parent associations of a certain type to other nodes with the same parent! In effect the 'orphans' with respect to a certain association type.- Specified by:
getChildAssocsWithoutParentAssocsOfTypein interfaceNodeDAO- Parameters:
parentNodeId- the parent node IDassocTypeQName- the association type QNameresultsCallback- the callback that will be called with the results
-
getPrimaryParentAssoc
public org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.ChildAssociationRef> getPrimaryParentAssoc(java.lang.Long childNodeId)
Description copied from interface:NodeDAOFinds the association between the node's primary parent and the node itself- Specified by:
getPrimaryParentAssocin interfaceNodeDAO- Returns:
- Returns the primary (defining) association or null if it is a root node
-
getParentAssocs
public void getParentAssocs(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 interface:NodeDAOGet the parent association of a given parent node, optionally filtering on association QName and association type QName. This is an efficient query for node paths.- Specified by:
getParentAssocsin interfaceNodeDAO- Parameters:
childNodeId- the child node IDassocTypeQName- the association type qname to filter on; null for no filteringassocQName- the association qname to filter on; null for no filteringisPrimary- filter for primary (true) or secondary associations; null for no filtering.resultsCallback- the callback that will be called with the results
-
cycleCheck
public void cycleCheck(java.lang.Long nodeId)
Potentially cheaper than evaluating all of a node's paths to check for child association cycles TODO: When is it cheaper to go up and when is it cheaper to go down? Look at using direct queries to pass through layers both up and down.- Specified by:
cycleCheckin interfaceNodeDAO- Parameters:
nodeId- the node to start with
-
getPaths
public java.util.List<org.alfresco.service.cmr.repository.Path> getPaths(org.alfresco.util.Pair<java.lang.Long,org.alfresco.service.cmr.repository.NodeRef> nodePair, boolean primaryOnly) throws org.alfresco.service.cmr.repository.InvalidNodeRefExceptionDescription copied from interface:NodeDAOBuild the paths for a node. When searching forprimaryOnly == true, checks that there is exactly one path.
-
setCheckNodeConsistency
public void setCheckNodeConsistency()
Description copied from interface:NodeBulkLoaderTransaction-scope setting to make the Node loader to guarantee the validity of all caches: some cache data will be reloaded; some cache data will be considered safe.- Specified by:
setCheckNodeConsistencyin interfaceNodeBulkLoader
-
getCachedAncestors
public java.util.Set<java.lang.Long> getCachedAncestors(java.util.List<java.lang.Long> nodeIds)
Description copied from interface:NodeBulkLoaderGets the current set of cached ancestors of the given list of nodes.- Specified by:
getCachedAncestorsin interfaceNodeBulkLoader- Parameters:
nodeIds- a list of node IDs to visit- Returns:
- the current set of cached ancestors of the given list of nodes, including the nodes themselves.
-
cacheNodesById
public void cacheNodesById(java.util.List<java.lang.Long> nodeIds)
Description copied from interface:NodeBulkLoaderPre-cache data relevant to the given nodes. There is no need to split the collection up before calling this method; it is up to the implementations to ensure that batching is done where necessary.- Specified by:
cacheNodesByIdin interfaceNodeBulkLoader- Parameters:
nodeIds- the nodes that will be cached.
-
cacheNodes
public void cacheNodes(java.util.List<org.alfresco.service.cmr.repository.NodeRef> nodeRefs)
Pre-cache data relevant to the given nodes. There is no need to split the collection up before calling this method; it is up to the implementations to ensure that batching is done where necessary. Loads properties, aspects, parent associations and the ID-noderef cache.- Specified by:
cacheNodesin interfaceNodeBulkLoader- Parameters:
nodeRefs- the nodes that will be cached.
-
clear
public void clear()
FOR TESTING ONLY: Clears out node cache data Simply clears out all the node-related caches.- Specified by:
clearin interfaceNodeBulkLoader
-
getMaxTxnIdByCommitTime
public java.lang.Long getMaxTxnIdByCommitTime(long maxCommitTime)
Description copied from interface:NodeDAORetrieves the maximum transaction ID for which the commit time is less than the given time.- Specified by:
getMaxTxnIdByCommitTimein interfaceNodeDAO- Parameters:
maxCommitTime- the max commit time (ms)- Returns:
- the last transaction on or before the given time
-
getTransactionCount
public int getTransactionCount()
- Specified by:
getTransactionCountin interfaceNodeDAO
-
getTxnById
public Transaction getTxnById(java.lang.Long txnId)
Description copied from interface:NodeDAORetrieves a specific transaction.- Specified by:
getTxnByIdin interfaceNodeDAO- Parameters:
txnId- the unique transaction ID.- Returns:
- the requested transaction or null
-
getTxnChanges
public java.util.List<org.alfresco.service.cmr.repository.NodeRef.Status> getTxnChanges(java.lang.Long txnId)
- Specified by:
getTxnChangesin interfaceNodeDAO- Returns:
- Returns the node statuses for a transaction, regardless of store
-
getTxnChangesForStore
public java.util.List<org.alfresco.service.cmr.repository.NodeRef.Status> getTxnChangesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.Long txnId)- Specified by:
getTxnChangesForStorein interfaceNodeDAO- Returns:
- Returns the node statuses for a transaction, limited to the store
-
getTxnsByCommitTimeAscending
public java.util.List<Transaction> getTxnsByCommitTimeAscending(java.lang.Long fromTimeInclusive, java.lang.Long toTimeExclusive, int count, java.util.List<java.lang.Long> excludeTxnIds, boolean remoteOnly)
Description copied from interface:NodeDAOGet all transactions in a given time range. Since time-based retrieval doesn't guarantee uniqueness for any given millisecond, a list of optional exclusions may be provided.- Specified by:
getTxnsByCommitTimeAscendingin interfaceNodeDAOexcludeTxnIds- a list of txn IDs to ignore. null is allowed.remoteOnly- true if locally-written transactions must be ignored
-
getTxnsByCommitTimeDescending
public java.util.List<Transaction> getTxnsByCommitTimeDescending(java.lang.Long fromTimeInclusive, java.lang.Long toTimeExclusive, int count, java.util.List<java.lang.Long> excludeTxnIds, boolean remoteOnly)
Description copied from interface:NodeDAOGet all transactions in a given time range. Since time-based retrieval doesn't guarantee uniqueness for any given millisecond, a list of optional exclusions may be provided.- Specified by:
getTxnsByCommitTimeDescendingin interfaceNodeDAOexcludeTxnIds- a list of txn IDs to ignore. null is allowed.remoteOnly- true if locally-written transactions must be ignored
-
getTxnsByCommitTimeAscending
public java.util.List<Transaction> getTxnsByCommitTimeAscending(java.util.List<java.lang.Long> includeTxnIds)
Description copied from interface:NodeDAOGet a specific list of transactions ordered by commit time.- Specified by:
getTxnsByCommitTimeAscendingin interfaceNodeDAO- Parameters:
includeTxnIds- a list of transaction IDs to search for- Returns:
- Returns the transactions by commit time for the given IDs
-
getTxnsUnused
public java.util.List<java.lang.Long> getTxnsUnused(java.lang.Long minTxnId, long maxCommitTime, int count)- Specified by:
getTxnsUnusedin interfaceNodeDAO
-
getMinTxnCommitTime
public java.lang.Long getMinTxnCommitTime()
- Specified by:
getMinTxnCommitTimein interfaceNodeDAO- Returns:
- Returns the minimum commit time or null if there are no transactions
-
getMaxTxnCommitTime
public java.lang.Long getMaxTxnCommitTime()
- Specified by:
getMaxTxnCommitTimein interfaceNodeDAO- Returns:
- Returns the maximum commit time or null if there are no transactions
-
getMinTxnCommitTimeForDeletedNodes
public java.lang.Long getMinTxnCommitTimeForDeletedNodes()
- Specified by:
getMinTxnCommitTimeForDeletedNodesin interfaceNodeDAO- Returns:
- Returns the minimum commit time for deleted nodes or null if there are no transactions
-
getMinTxnId
public java.lang.Long getMinTxnId()
- Specified by:
getMinTxnIdin interfaceNodeDAO- Returns:
- Returns the minimum id or 0 if there are no transactions
-
getMinUnusedTxnCommitTime
public java.lang.Long getMinUnusedTxnCommitTime()
- Specified by:
getMinUnusedTxnCommitTimein interfaceNodeDAO- Returns:
- the commit time of the oldest unused transaction
-
getMaxTxnId
public java.lang.Long getMaxTxnId()
- Specified by:
getMaxTxnIdin interfaceNodeDAO- Returns:
- Returns the maximum id or 0 if there are no transactions
-
selectServer
protected abstract ServerEntity selectServer(java.lang.String ipAddress)
-
insertServer
protected abstract java.lang.Long insertServer(java.lang.String ipAddress)
-
insertTransaction
protected abstract java.lang.Long insertTransaction(java.lang.Long serverId, java.lang.String changeTxnId, java.lang.Long commit_time_ms)
-
updateTransaction
protected abstract int updateTransaction(java.lang.Long txnId, java.lang.Long commit_time_ms)
-
deleteTransaction
protected abstract int deleteTransaction(java.lang.Long txnId)
-
selectAllStores
protected abstract java.util.List<StoreEntity> selectAllStores()
-
selectStore
protected abstract StoreEntity selectStore(org.alfresco.service.cmr.repository.StoreRef storeRef)
-
selectStoreRootNode
protected abstract NodeEntity selectStoreRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)
-
insertStore
protected abstract java.lang.Long insertStore(StoreEntity store)
-
updateStoreRoot
protected abstract int updateStoreRoot(StoreEntity store)
-
updateStore
protected abstract int updateStore(StoreEntity store)
-
updateNodesInStore
protected abstract int updateNodesInStore(java.lang.Long txnId, java.lang.Long storeId)
-
insertNode
protected abstract java.lang.Long insertNode(NodeEntity node)
-
updateNode
protected abstract int updateNode(NodeUpdateEntity nodeUpdate)
-
updateNodes
protected abstract int updateNodes(java.lang.Long txnId, java.util.List<java.lang.Long> nodeIds)
-
updatePrimaryChildrenSharedAclId
protected abstract void updatePrimaryChildrenSharedAclId(java.lang.Long txnId, java.lang.Long primaryParentNodeId, java.lang.Long optionalOldSharedAlcIdInAdditionToNull, java.lang.Long newSharedAlcId)
-
deleteNodeById
protected abstract int deleteNodeById(java.lang.Long nodeId)
-
deleteNodesByCommitTime
protected abstract int deleteNodesByCommitTime(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)
-
selectNodeById
protected abstract NodeEntity selectNodeById(java.lang.Long id)
-
selectNodeByNodeRef
protected abstract NodeEntity selectNodeByNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
-
selectNodesByUuids
protected abstract java.util.List<Node> selectNodesByUuids(java.lang.Long storeId, java.util.SortedSet<java.lang.String> uuids)
-
selectNodesByIds
protected abstract java.util.List<Node> selectNodesByIds(java.util.SortedSet<java.lang.Long> ids)
-
selectNodeProperties
protected abstract java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>> selectNodeProperties(java.util.Set<java.lang.Long> nodeIds)
-
selectNodeProperties
protected abstract java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>> selectNodeProperties(java.lang.Long nodeId)
-
selectNodeProperties
protected abstract java.util.Map<NodeVersionKey,java.util.Map<NodePropertyKey,NodePropertyValue>> selectNodeProperties(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)
-
deleteNodeProperties
protected abstract int deleteNodeProperties(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)
-
deleteNodeProperties
protected abstract int deleteNodeProperties(java.lang.Long nodeId, java.util.List<NodePropertyKey> propKeys)
-
insertNodeProperties
protected abstract void insertNodeProperties(java.lang.Long nodeId, java.util.Map<NodePropertyKey,NodePropertyValue> persistableProps)
-
selectNodeAspects
protected abstract java.util.Map<NodeVersionKey,java.util.Set<org.alfresco.service.namespace.QName>> selectNodeAspects(java.util.Set<java.lang.Long> nodeIds)
-
insertNodeAspect
protected abstract void insertNodeAspect(java.lang.Long nodeId, java.lang.Long qnameId)
-
deleteNodeAspects
protected abstract int deleteNodeAspects(java.lang.Long nodeId, java.util.Set<java.lang.Long> qnameIds)
-
selectNodesWithAspects
protected abstract void selectNodesWithAspects(java.util.List<java.lang.Long> qnameIds, java.lang.Long minNodeId, java.lang.Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)
-
insertNodeAssoc
protected abstract java.lang.Long insertNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId, int assocIndex)
-
updateNodeAssoc
protected abstract int updateNodeAssoc(java.lang.Long id, int assocIndex)
-
deleteNodeAssoc
protected abstract int deleteNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, java.lang.Long assocTypeQNameId)
-
deleteNodeAssocs
protected abstract int deleteNodeAssocs(java.util.List<java.lang.Long> ids)
-
selectNodeAssocs
protected abstract java.util.List<NodeAssocEntity> selectNodeAssocs(java.lang.Long nodeId)
-
selectNodeAssocsBySource
protected abstract java.util.List<NodeAssocEntity> selectNodeAssocsBySource(java.lang.Long sourceNodeId, java.lang.Long typeQNameId)
-
selectNodeAssocsBySourceAndPropertyValue
protected abstract java.util.List<NodeAssocEntity> selectNodeAssocsBySourceAndPropertyValue(java.lang.Long sourceNodeId, java.lang.Long typeQNameId, java.lang.Long propertyQNameId, NodePropertyValue nodeValue)
-
selectNodeAssocsByTarget
protected abstract java.util.List<NodeAssocEntity> selectNodeAssocsByTarget(java.lang.Long targetNodeId, java.lang.Long typeQNameId)
-
selectNodeAssocById
protected abstract NodeAssocEntity selectNodeAssocById(java.lang.Long assocId)
-
selectNodeAssocMaxIndex
protected abstract int selectNodeAssocMaxIndex(java.lang.Long sourceNodeId, java.lang.Long assocTypeQNameId)
-
insertChildAssoc
protected abstract java.lang.Long insertChildAssoc(ChildAssocEntity assoc)
-
deleteChildAssocs
protected abstract int deleteChildAssocs(java.util.List<java.lang.Long> ids)
-
updateChildAssocIndex
protected abstract int updateChildAssocIndex(java.lang.Long parentNodeId, java.lang.Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int index)
-
updateChildAssocUniqueName
protected abstract int updateChildAssocUniqueName(java.lang.Long assocId, java.lang.String name)
-
selectChildAssoc
protected abstract ChildAssocEntity selectChildAssoc(java.lang.Long assocId)
-
selectChildNodeIds
protected abstract java.util.List<ChildAssocEntity> selectChildNodeIds(java.lang.Long nodeId, java.lang.Boolean isPrimary, java.lang.Long minAssocIdInclusive, int maxResults)
-
selectPrimaryChildAcls
protected abstract java.util.List<NodeIdAndAclId> selectPrimaryChildAcls(java.lang.Long nodeId)
-
selectChildAssoc
protected abstract 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)
-
selectChildAssocs
protected abstract 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
-
selectChildAssocs
protected abstract void selectChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
-
selectChildAssocs
protected abstract void selectChildAssocs(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
-
selectChildAssoc
protected abstract ChildAssocEntity selectChildAssoc(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childName)
-
selectChildAssocs
protected abstract void selectChildAssocs(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.util.Collection<java.lang.String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
-
selectChildAssocsByPropertyValue
protected abstract void selectChildAssocsByPropertyValue(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName propertyQName, NodePropertyValue nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
-
selectChildAssocsByChildTypes
protected abstract void selectChildAssocsByChildTypes(java.lang.Long parentNodeId, java.util.Set<org.alfresco.service.namespace.QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
-
selectChildAssocsWithoutParentAssocsOfType
protected abstract void selectChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
-
selectParentAssocs
protected abstract 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
-
selectParentAssocs
protected abstract java.util.List<ChildAssocEntity> selectParentAssocs(java.lang.Long childNodeId)
-
selectPrimaryParentAssocs
protected abstract java.util.List<ChildAssocEntity> selectPrimaryParentAssocs(java.lang.Long childNodeId)
No DB constraint, so multiple returned
-
updatePrimaryParentAssocs
protected abstract 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)
-
moveNodeData
protected abstract void moveNodeData(java.lang.Long fromNodeId, java.lang.Long toNodeId)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.- Parameters:
fromNodeId- the source nodetoNodeId- the target node
-
deleteSubscriptions
protected abstract void deleteSubscriptions(java.lang.Long nodeId)
-
selectLastTxnBeforeCommitTime
protected abstract Transaction selectLastTxnBeforeCommitTime(java.lang.Long maxCommitTime)
-
selectTransactionCount
protected abstract int selectTransactionCount()
-
selectTxnById
protected abstract Transaction selectTxnById(java.lang.Long txnId)
-
selectTxnChanges
protected abstract java.util.List<NodeEntity> selectTxnChanges(java.lang.Long txnId, java.lang.Long storeId)
-
selectTxns
protected abstract 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)
-
selectTxnsUnused
protected abstract java.util.List<java.lang.Long> selectTxnsUnused(java.lang.Long minTxnId, java.lang.Long maxCommitTime, java.lang.Integer count)
-
selectMinTxnCommitTime
protected abstract java.lang.Long selectMinTxnCommitTime()
-
selectMaxTxnCommitTime
protected abstract java.lang.Long selectMaxTxnCommitTime()
-
selectMinTxnCommitTimeForDeletedNodes
protected abstract java.lang.Long selectMinTxnCommitTimeForDeletedNodes()
-
selectMinTxnId
protected abstract java.lang.Long selectMinTxnId()
-
selectMaxTxnId
protected abstract java.lang.Long selectMaxTxnId()
-
selectMinUnusedTxnCommitTime
protected abstract java.lang.Long selectMinUnusedTxnCommitTime()
-
-