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
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddNodeAspects(Long nodeId, Set<QName> aspectQNames) booleanaddNodeProperties(Long nodeId, Map<QName, Serializable> properties) booleanaddNodeProperty(Long nodeId, QName qname, Serializable value) voidcacheNodes(List<NodeRef> nodeRefs) Pre-cache data relevant to the given nodes.voidcacheNodesById(List<Long> nodeIds) Pre-cache data relevant to the given nodes.voidclear()FOR TESTING ONLY: Clears out node cache datavoidcycleCheck(Long nodeId) Potentially cheaper than evaluating all of a node's paths to check for child association cyclesvoiddeleteChildAssoc(Long assocId) protected abstract intdeleteChildAssocs(List<Long> ids) voiddeleteNode(Long nodeId) Deletes the node and all entities.protected abstract intdeleteNodeAspects(Long nodeId, Set<Long> qnameIds) protected abstract intdeleteNodeAssoc(Long sourceNodeId, Long targetNodeId, Long assocTypeQNameId) protected abstract intdeleteNodeAssocs(List<Long> ids) protected abstract intdeleteNodeById(Long nodeId) protected abstract intdeleteNodeProperties(Long nodeId, List<NodePropertyKey> propKeys) protected abstract intdeleteNodeProperties(Long nodeId, Set<Long> qnameIds) protected abstract intdeleteNodesByCommitTime(long fromTxnCommitTimeMs, long toTxnCommitTimeMs) protected abstract voiddeleteSubscriptions(Long nodeId) protected abstract intdeleteTransaction(Long txnId) booleanFind out if a node exists.booleanFind out if a node exists.booleanFind out if a store exists or notgetAllRootNodes(StoreRef storeRef) getCachedAncestors(List<Long> nodeIds) Gets the current set of cached ancestors of the given list of nodes.getChildAssoc(Long assocId) Get a specific associationgetChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName) Get a specific child association given all the determining data.getChildAssoc(Long parentNodeId, QName assocTypeQName, String childName) Checks a cache and then queries.voidgetChildAssocs(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, Boolean sameStore, NodeDAO.ChildAssocRefQueryCallback resultsCallback) Get the child associations of a given parent node, optionally filtering on association QName and association type QName.voidgetChildAssocs(Long parentNodeId, Set<QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) Get the child associations of a given parent node, optionally filtering on type QName.voidgetChildAssocs(Long parentNodeId, QName assocTypeQName, Collection<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(Long parentNodeId, QName assocTypeQName, 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(Long parentNodeId, Set<QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) voidgetChildAssocsByPropertyValue(Long parentNodeId, QName propertyQName, Serializable value, NodeDAO.ChildAssocRefQueryCallback resultsCallback) Select children by property valuesvoidgetChildAssocsWithoutParentAssocsOfType(Long parentNodeId, 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!getCurrentTransactionId(boolean ensureNew) getMaxTxInNodeIdRange(Long fromNodeId, Long toNodeId) Gets the maximum commit time from transactions including a node id in the range [fromNodeId:toNodeId]getMaxTxnIdByCommitTime(long maxCommitTime) Retrieves the maximum transaction ID for which the commit time is less than the given time.getMinTxInNodeIdRange(Long fromNodeId, Long toNodeId) Gets the minimum commit time from transactions including a node id in the range [fromNodeId:toNodeId]getNextTxCommitTime(Long fromCommitTime) Gets the next commit time from [fromCommitTime]getNodeAclId(Long nodeId) getNodeAspects(Long nodeId) getNodeAssoc(Long assocId) getNodeAssocOrNull(Long assocId) getNodeAssocsToAndFrom(Long nodeId) getNodeIdStatus(Long nodeId) Get the current status of the node, including deleted nodes.getNodePair(Long nodeId) getNodePair(NodeRef nodeRef) getNodeProperties(Long nodeId) getNodeProperty(Long nodeId, QName propertyQName) getNodeRefStatus(NodeRef nodeRef) Get the current status of the node, including deleted nodes.voidgetNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, Long maxNodeId, boolean ordered, int maxResults, NodeDAO.NodeRefQueryCallback resultsCallback) Get nodes with aspects between the given ranges, ordering the results optionally and limit the result setvoidgetNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, Long maxNodeId, boolean ordered, NodeDAO.NodeRefQueryCallback resultsCallback) Get nodes with aspects between the given ranges, ordering the results optionallyvoidgetNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback) Get nodes with aspects between the given rangesgetNodeType(Long nodeId) voidgetParentAssocs(Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, NodeDAO.ChildAssocRefQueryCallback resultsCallback) Get the parent association of a given parent node, optionally filtering on association QName and association type QName.Build the paths for a node.getPrimaryChildrenAcls(Long nodeId) Fetch all primary child node IDs and corresponding ACL IDs.getPrimaryParentAssoc(Long childNodeId) Finds the association between the node's primary parent and the node itselfgetRootNode(StoreRef storeRef) getSourceNodeAssocs(Long targetNodeId, QName typeQName) Get the ID-ref pair for a storeFetch a list of all stores in the repositorygetTargetAssocsByPropertyValue(Long sourceNodeId, QName typeQName, QName propertyQName, Serializable propertyValue) Get target associations by type of the association, property name and value.getTargetNodeAssocs(Long sourceNodeId, QName typeQName) intgetTxnById(Long txnId) Retrieves a specific transaction.getTxnChanges(Long txnId) getTxnChangesForStore(StoreRef storeRef, Long txnId) getTxnsUnused(Long minTxnId, long maxCommitTime, int count) booleanhasNodeAspect(Long nodeId, QName aspectQName) voidinit()protected abstract LonginsertChildAssoc(ChildAssocEntity assoc) protected abstract LonginsertNode(NodeEntity node) protected abstract voidinsertNodeAspect(Long nodeId, Long qnameId) protected abstract LonginsertNodeAssoc(Long sourceNodeId, Long targetNodeId, Long assocTypeQNameId, int assocIndex) protected abstract voidinsertNodeProperties(Long nodeId, Map<NodePropertyKey, NodePropertyValue> persistableProps) protected abstract LonginsertStore(StoreEntity store) protected abstract LonginsertTransaction(String changeTxnId, Long commit_time_ms) booleanisInCurrentTxn(Long nodeId) Update a node's primary association, giving it a new parent and new association parameters.protected abstract voidmoveNodeData(Long fromNodeId, Long toNodeId) Moves all node-linked data from one node to another.voidChanges the old store reference to the new store reference.newChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, String childNodeName) Create a new child association.protected LongnewChildAssocInsert(ChildAssocEntity assoc, QName assocTypeQName, String childNodeName) protected LongnewChildAssocInsertImpl(ChildAssocEntity assoc, QName assocTypeQName, String childNodeName) newNode(Long parentNodeId, QName assocTypeQName, QName assocQName, StoreRef storeRef, String uuid, QName nodeTypeQName, Locale nodeLocale, String childNodeName, Map<QName, Serializable> auditableProperties) Create a new node.newNodeAssoc(Long sourceNodeId, Long targetNodeId, QName assocTypeQName, int assocIndex) Create a new associationprotected LongnewNodeImplInsert(NodeEntity node) 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.voidbooleanremoveNodeAspects(Long nodeId) booleanremoveNodeAspects(Long nodeId, Set<QName> aspectQNames) intremoveNodeAssoc(Long sourceNodeId, Long targetNodeId, QName assocTypeQName) Remove a specific node associationintremoveNodeAssocs(List<Long> ids) Remove all node associations of given IDsbooleanremoveNodeProperties(Long nodeId, Set<QName> propertyQNames) protected abstract List<StoreEntity>protected abstract ChildAssocEntityselectChildAssoc(Long assocId) protected abstract List<ChildAssocEntity>selectChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName) protected abstract ChildAssocEntityselectChildAssoc(Long parentNodeId, QName assocTypeQName, String childName) protected abstract 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 abstract voidselectChildAssocs(Long parentNodeId, Set<QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) protected abstract voidselectChildAssocs(Long parentNodeId, QName assocTypeQName, Collection<String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) protected abstract voidselectChildAssocs(Long parentNodeId, QName assocTypeQName, QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback) protected abstract voidselectChildAssocsByChildTypes(Long parentNodeId, Set<QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) protected abstract voidselectChildAssocsByPropertyValue(Long parentNodeId, QName propertyQName, NodePropertyValue nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback) protected abstract voidselectChildAssocsWithoutParentAssocsOfType(Long parentNodeId, QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback) protected abstract List<ChildAssocEntity>selectChildNodeIds(Long nodeId, Boolean isPrimary, Long minAssocIdInclusive, int maxResults) protected abstract TransactionselectLastTxnBeforeCommitTime(Long maxCommitTime) protected abstract LongselectMaxTxInNodeIdRange(Long fromNodeId, Long toNodeId) protected abstract Longprotected abstract Longprotected abstract LongselectMinTxInNodeIdRange(Long fromNodeId, Long toNodeId) protected abstract Longprotected abstract Longprotected abstract Longprotected abstract Longprotected abstract LongselectNextTxCommitTime(Long fromCommitTime) protected abstract Map<NodeVersionKey,Set<QName>> selectNodeAspects(Set<Long> nodeIds) protected abstract NodeAssocEntityselectNodeAssocById(Long assocId) protected abstract intselectNodeAssocMaxIndex(Long sourceNodeId, Long assocTypeQNameId) protected abstract List<NodeAssocEntity>selectNodeAssocs(Long nodeId) protected abstract List<NodeAssocEntity>selectNodeAssocsBySource(Long sourceNodeId, Long typeQNameId) protected abstract List<NodeAssocEntity>selectNodeAssocsBySourceAndPropertyValue(Long sourceNodeId, Long typeQNameId, Long propertyQNameId, NodePropertyValue nodeValue) protected abstract List<NodeAssocEntity>selectNodeAssocsByTarget(Long targetNodeId, Long typeQNameId) protected abstract NodeEntityselectNodeById(Long id) protected abstract NodeEntityselectNodeByNodeRef(NodeRef nodeRef) protected abstract Map<NodeVersionKey,Map<NodePropertyKey, NodePropertyValue>> selectNodeProperties(Long nodeId) protected abstract Map<NodeVersionKey,Map<NodePropertyKey, NodePropertyValue>> selectNodeProperties(Long nodeId, Set<Long> qnameIds) protected abstract Map<NodeVersionKey,Map<NodePropertyKey, NodePropertyValue>> selectNodeProperties(Set<Long> nodeIds) selectNodesByIds(SortedSet<Long> ids) selectNodesByUuids(Long storeId, SortedSet<String> uuids) protected abstract voidselectNodesWithAspects(List<Long> qnameIds, Long minNodeId, Long maxNodeId, boolean ordered, int maxResults, NodeDAO.NodeRefQueryCallback resultsCallback) protected abstract voidselectNodesWithAspects(List<Long> qnameIds, Long minNodeId, Long maxNodeId, boolean ordered, NodeDAO.NodeRefQueryCallback resultsCallback) protected abstract voidselectNodesWithAspects(List<Long> qnameIds, Long minNodeId, Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback) protected abstract List<ChildAssocEntity>selectParentAssocs(Long childNodeId) protected abstract voidselectParentAssocs(Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, NodeDAO.ChildAssocRefQueryCallback resultsCallback) Parameters are all optional except the parent node ID and the callbackprotected abstract List<NodeIdAndAclId>selectPrimaryChildAcls(Long nodeId) protected abstract List<ChildAssocEntity>selectPrimaryParentAssocs(Long childNodeId) No DB constraint, so multiple returnedprotected abstract StoreEntityselectStore(StoreRef storeRef) protected abstract NodeEntityselectStoreRootNode(StoreRef storeRef) protected abstract intprotected abstract TransactionselectTxnById(Long txnId) protected abstract List<NodeEntity>selectTxnChanges(Long txnId, Long storeId) abstract List<Transaction>selectTxns(Long fromTimeInclusive, Long toTimeExclusive, Integer count, List<Long> includeTxnIds, List<Long> excludeTxnIds, Boolean ascending) selectTxnsUnused(Long minTxnId, Long maxCommitTime, Integer count) voidsetAccessControlListDAO(AccessControlListDAO accessControlListDAO) voidvoidsetAllRootNodesCache(SimpleCache<StoreRef, Set<NodeRef>> allRootNodesCache) Set the cache that maintains the extended Store root node datavoidsetAspectsCache(SimpleCache<NodeVersionKey, Set<QName>> aspectsCache) Set the cache that maintains the Node QName IDsvoidsetCachingThreshold(int cachingThreshold) voidTransaction-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(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, int index) Sets the association index ordering.voidsetChildAssocsUniqueName(Long childNodeId, String childName) TODO: See about pulling automatic cm:name update logic into this DAOprotected intsetChildAssocsUniqueNameImpl(Long childNodeId, String childName) voidsetChildByNameCache(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(DictionaryService dictionaryService) voidsetLocaleDAO(LocaleDAO localeDAO) booleansetModifiedDate(Long nodeId, Date modifiedDate) Pull the cm:modified up to the current time without changing any other cm:auditable properties.booleansetModifiedProperties(Long nodeId, Date modifiedDate, String modifiedBy) Pull the cm:modified up to the current time without changing any other cm:auditable properties.voidsetNodeAclId(Long nodeId, Long aclId) voidsetNodeAssocIndex(Long id, int assocIndex) Update an existing assoc's index.booleansetNodeProperties(Long nodeId, Map<QName, Serializable> properties) voidSet 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(Long primaryParentNodeId, Long optionalOldSharedAlcIdInAdditionToNull, Long newSharedAclId) voidsetPropertiesCache(SimpleCache<NodeVersionKey, Map<QName, Serializable>> propertiesCache) Set the cache that maintains the Node property valuesvoidsetQnameDAO(QNameDAO qnameDAO) voidSet the cache that maintains the Store root node datavoidsetTransactionService(TransactionService transactionService) voidsetUsageDAO(UsageDAO usageDAO) inttouchNodes(Long txnId, List<Long> nodeIds) Update the transaction associated with a lust of nodesprotected abstract intupdateChildAssocIndex(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, int index) protected abstract intupdateChildAssocUniqueName(Long assocId, String name) protected intupdateChildAssocUniqueNameImpl(Long childNodeId, String childName) booleanupdateNode(Long nodeId, QName nodeTypeQName, Locale nodeLocale) protected abstract intupdateNode(NodeUpdateEntity nodeUpdate) protected abstract intupdateNodeAssoc(Long id, int assocIndex) protected abstract intupdateNodes(Long txnId, List<Long> nodeIds) protected abstract intupdateNodesInStore(Long txnId, Long storeId) protected abstract voidupdatePrimaryChildrenSharedAclId(Long txnId, Long primaryParentNodeId, Long optionalOldSharedAlcIdInAdditionToNull, Long newSharedAlcId) protected abstract intupdatePrimaryParentAssocs(Long childNodeId, Long parentNodeId, QName assocTypeQName, QName assocQName, String childNodeName) protected voidupdatePrimaryParentAssocs(ChildAssocEntity primaryParentAssoc, Node newParentNode, Node childNode, Long newChildNodeId, String childNodeName, Long oldParentNodeId, QName assocTypeQName, QName assocQName) protected intupdatePrimaryParentAssocsImpl(ChildAssocEntity primaryParentAssoc, Node newParentNode, Node childNode, Long newChildNodeId, String childNodeName, Long oldParentNodeId, QName assocTypeQName, QName assocQName) protected abstract intupdateStore(StoreEntity store) protected abstract intupdateStoreRoot(StoreEntity store) protected abstract intupdateTransaction(Long txnId, Long commit_time_ms) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.ibatis.BatchingDAO
executeBatch, startBatchMethods inherited from interface org.alfresco.repo.domain.node.NodeDAO
countChildAssocsByParent, deleteTxnsUnused, getMaxNodeId, getMinNodeId, getNodeIdsIntervalForType, purgeDeletedNodes, purgeEmptyTransactions, selectAssocsNotLinkedByTwoOtherAssocs, selectChildAssocsWithoutNodeAssocsOfTypes, selectDeletedNodesByCommitTime, selectNodePropertiesByDataType, selectNodePropertiesByTypes, selectUnusedTransactionsByCommitTime
-
Field Details
-
CACHE_REGION_NODES
- See Also:
-
logger
protected org.apache.commons.logging.Log logger -
isDebugEnabled
protected final boolean isDebugEnabled -
LONG_ZERO
-
-
Constructor Details
-
AbstractNodeDAOImpl
public AbstractNodeDAOImpl()Constructor. Set up various instance-specific members such as caches and locks.
-
-
Method Details
-
setTransactionService
- Parameters:
transactionService- the service to start post-txn processes
-
setDictionaryService
- Parameters:
dictionaryService- the service help determine cm:auditable characteristics
-
setCachingThreshold
public void setCachingThreshold(int cachingThreshold) -
setPolicyBehaviourFilter
- Parameters:
policyBehaviourFilter- the service to determine the behaviour for cm:auditable and other inherent capabilities.
-
setAclDAO
- Parameters:
aclDAO- used to update permissions during certain operations
-
setAccessControlListDAO
- Parameters:
accessControlListDAO- used to update ACL inheritance during node moves
-
setControlDAO
- Parameters:
controlDAO- create Savepoints
-
setQnameDAO
- Parameters:
qnameDAO- translates QName IDs into QName instances and vice-versa
-
setContentDataDAO
- Parameters:
contentDataDAO- used to create and delete content references
-
setLocaleDAO
- Parameters:
localeDAO- used to handle MLText properties
-
setUsageDAO
- Parameters:
usageDAO- used to keep content usage calculations in line
-
setRootNodesCache
Set the cache that maintains the Store root node data- Parameters:
cache- the cache
-
setAllRootNodesCache
Set the cache that maintains the extended Store root node data- Parameters:
allRootNodesCache- the cache
-
setNodesCache
Set the cache that maintains node ID-NodeRef cross referencing data- Parameters:
cache- the cache
-
setAspectsCache
Set the cache that maintains the Node QName IDs- Parameters:
aspectsCache- the cache
-
setPropertiesCache
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(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() -
getCurrentTransactionCommitTime
- Specified by:
getCurrentTransactionCommitTimein interfaceNodeDAO- Returns:
- the commit time of the current transaction entry or null if there have not been any modifications to nodes registered in the transaction.
-
getCurrentTransactionId
- 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
Description copied from interface:NodeDAOGet the ID-ref pair for a store -
getStores
Description copied from interface:NodeDAOFetch a list of all stores in the repository -
exists
Description copied from interface:NodeDAOFind out if a store exists or not -
getRootNode
- Specified by:
getRootNodein interfaceNodeDAO
-
getAllRootNodes
- Specified by:
getAllRootNodesin interfaceNodeDAO
-
newStore
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
Description copied from interface:NodeDAOChanges the old store reference to the new store reference. -
exists
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
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
- Specified by:
isInCurrentTxnin interfaceNodeDAO- Returns:
- Returns true if the node was last modified in the current transaction, otherwise false.
-
getNodeRefStatus
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
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
- Specified by:
getNodePairin interfaceNodeDAO
-
getNodePair
- Specified by:
getNodePairin interfaceNodeDAO
-
getNodeType
- Specified by:
getNodeTypein interfaceNodeDAO
-
getNodeAclId
- Specified by:
getNodeAclIdin interfaceNodeDAO
-
newNode
public ChildAssocEntity newNode(Long parentNodeId, QName assocTypeQName, QName assocQName, StoreRef storeRef, String uuid, QName nodeTypeQName, Locale nodeLocale, String childNodeName, Map<QName, Serializable> auditableProperties) throws InvalidTypeExceptionDescription 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:
InvalidTypeException- if the node type is invalid or if the node type is not a valid real node
-
newNodeImplInsert
-
moveNode
public Pair<Pair<Long,ChildAssociationRef>, moveNodePair<Long, NodeRef>> (Long childNodeId, Long newParentNodeId, QName assocTypeQName, 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
-
updatePrimaryParentAssocsImpl
-
updateNode
- 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
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
- Specified by:
setNodeAclIdin interfaceNodeDAO
-
deleteNode
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
- Specified by:
getNodePropertiesin interfaceNodeDAO
-
getNodeProperty
- Specified by:
getNodePropertyin interfaceNodeDAO
-
setNodeProperties
- Specified by:
setNodePropertiesin interfaceNodeDAO
-
addNodeProperty
- Specified by:
addNodePropertyin interfaceNodeDAO
-
addNodeProperties
- Specified by:
addNodePropertiesin interfaceNodeDAO
-
removeNodeProperties
- Specified by:
removeNodePropertiesin interfaceNodeDAO
-
setModifiedDate
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
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
- Specified by:
getNodeAspectsin interfaceNodeDAO
-
hasNodeAspect
- Specified by:
hasNodeAspectin interfaceNodeDAO
-
addNodeAspects
- Specified by:
addNodeAspectsin interfaceNodeDAO
-
removeNodeAspects
- Specified by:
removeNodeAspectsin interfaceNodeDAO
-
removeNodeAspects
- Specified by:
removeNodeAspectsin interfaceNodeDAO
-
getNodesWithAspects
public void getNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, 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
-
getNodesWithAspects
public void getNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, Long maxNodeId, boolean ordered, NodeDAO.NodeRefQueryCallback resultsCallback) Description copied from interface:NodeDAOGet nodes with aspects between the given ranges, ordering the results optionally- 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)ordered- if the results are to be ordered by nodeIDresultsCallback- callback to process results
-
getNodesWithAspects
public void getNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, Long maxNodeId, boolean ordered, int maxResults, NodeDAO.NodeRefQueryCallback resultsCallback) Description copied from interface:NodeDAOGet nodes with aspects between the given ranges, ordering the results optionally and limit the result set- 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)ordered- if the results are to be ordered by nodeIDmaxResults- limit query to maxResultsresultsCallback- callback to process results
-
newNodeAssoc
public Long newNodeAssoc(Long sourceNodeId, Long targetNodeId, 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
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
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
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
- 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 Collection<Pair<Long,AssociationRef>> getSourceNodeAssocs(Long targetNodeId, 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 Collection<Pair<Long,AssociationRef>> getTargetNodeAssocs(Long sourceNodeId, 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 Collection<Pair<Long,AssociationRef>> getTargetAssocsByPropertyValue(Long sourceNodeId, QName typeQName, QName propertyQName, 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
- Specified by:
getNodeAssocOrNullin interfaceNodeDAO- Returns:
- Returns a specific node association with the given ID or null if it doesn't exist
-
getNodeAssoc
- Specified by:
getNodeAssocin interfaceNodeDAO- Returns:
- Returns a specific node association with the given ID
-
newChildAssocInsert
protected Long newChildAssocInsert(ChildAssocEntity assoc, QName assocTypeQName, String childNodeName) -
newChildAssocInsertImpl
protected Long newChildAssocInsertImpl(ChildAssocEntity assoc, QName assocTypeQName, String childNodeName) -
newChildAssoc
public Pair<Long,ChildAssociationRef> newChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, 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
- Specified by:
deleteChildAssocin interfaceNodeDAO- Parameters:
assocId- the ID of the child association to delete
-
setChildAssocIndex
public int setChildAssocIndex(Long parentNodeId, Long childNodeId, QName assocTypeQName, 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
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
-
updateChildAssocUniqueNameImpl
-
getChildAssoc
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
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 Pair<Long,ChildAssociationRef> getChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, 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(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, 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(Long parentNodeId, QName assocTypeQName, 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(Long parentNodeId, Set<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 Pair<Long,ChildAssociationRef> getChildAssoc(Long parentNodeId, QName assocTypeQName, 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(Long parentNodeId, QName assocTypeQName, Collection<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(Long parentNodeId, QName propertyQName, Serializable value, NodeDAO.ChildAssocRefQueryCallback resultsCallback) Description copied from interface:NodeDAOSelect children by property values- Specified by:
getChildAssocsByPropertyValuein interfaceNodeDAO
-
getChildAssocsByChildTypes
public void getChildAssocsByChildTypes(Long parentNodeId, Set<QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) - Specified by:
getChildAssocsByChildTypesin interfaceNodeDAO
-
getChildAssocsWithoutParentAssocsOfType
public void getChildAssocsWithoutParentAssocsOfType(Long parentNodeId, 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
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(Long childNodeId, QName assocTypeQName, QName assocQName, 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
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 List<Path> getPaths(Pair<Long, NodeRef> nodePair, boolean primaryOnly) throws InvalidNodeRefExceptionDescription copied from interface:NodeDAOBuild the paths for a node. When searching forprimaryOnly == true, checks that there is exactly one path.- Specified by:
getPathsin interfaceNodeDAO- Parameters:
nodePair- the leave or child node to start withprimaryOnly- true to follow only primary parent associations- Throws:
InvalidNodeRefException
-
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
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
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
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
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
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
- Specified by:
getTxnChangesin interfaceNodeDAO- Returns:
- Returns the node statuses for a transaction, regardless of store
-
getTxnChangesForStore
- Specified by:
getTxnChangesForStorein interfaceNodeDAO- Returns:
- Returns the node statuses for a transaction, limited to the store
-
getTxnsUnused
- Specified by:
getTxnsUnusedin interfaceNodeDAO
-
purgeTxn
-
getMinTxnCommitTime
- Specified by:
getMinTxnCommitTimein interfaceNodeDAO- Returns:
- Returns the minimum commit time or null if there are no transactions
-
getMaxTxnCommitTime
- Specified by:
getMaxTxnCommitTimein interfaceNodeDAO- Returns:
- Returns the maximum commit time or null if there are no transactions
-
getMinTxnCommitTimeForDeletedNodes
- Specified by:
getMinTxnCommitTimeForDeletedNodesin interfaceNodeDAO- Returns:
- Returns the minimum commit time for deleted nodes or null if there are no transactions
-
getMinTxnId
- Specified by:
getMinTxnIdin interfaceNodeDAO- Returns:
- Returns the minimum id or 0 if there are no transactions
-
getMinUnusedTxnCommitTime
- Specified by:
getMinUnusedTxnCommitTimein interfaceNodeDAO- Returns:
- the commit time of the oldest unused transaction
-
getMaxTxnId
- Specified by:
getMaxTxnIdin interfaceNodeDAO- Returns:
- Returns the maximum id or 0 if there are no transactions
-
getMinTxInNodeIdRange
Description copied from interface:NodeDAOGets the minimum commit time from transactions including a node id in the range [fromNodeId:toNodeId]- Specified by:
getMinTxInNodeIdRangein interfaceNodeDAO- Parameters:
fromNodeId- Initial node idtoNodeId- Final node id- Returns:
- minimum commit time
-
getMaxTxInNodeIdRange
Description copied from interface:NodeDAOGets the maximum commit time from transactions including a node id in the range [fromNodeId:toNodeId]- Specified by:
getMaxTxInNodeIdRangein interfaceNodeDAO- Parameters:
fromNodeId- Initial node idtoNodeId- Final node id- Returns:
- maximum commit time
-
getNextTxCommitTime
Description copied from interface:NodeDAOGets the next commit time from [fromCommitTime]- Specified by:
getNextTxCommitTimein interfaceNodeDAO- Parameters:
fromCommitTime- Initial commit time- Returns:
- next commit time
-
insertTransaction
-
updateTransaction
-
deleteTransaction
-
selectAllStores
-
selectStore
-
selectStoreRootNode
-
insertStore
-
updateStoreRoot
-
updateStore
-
updateNodesInStore
-
insertNode
-
updateNode
-
updateNodes
-
deleteNodeById
-
deleteNodesByCommitTime
protected abstract int deleteNodesByCommitTime(long fromTxnCommitTimeMs, long toTxnCommitTimeMs) -
selectNodeById
-
selectNodeByNodeRef
-
selectNodesByUuids
-
selectNodesByIds
-
selectNodeProperties
protected abstract Map<NodeVersionKey,Map<NodePropertyKey, selectNodePropertiesNodePropertyValue>> (Set<Long> nodeIds) -
selectNodeProperties
protected abstract Map<NodeVersionKey,Map<NodePropertyKey, selectNodePropertiesNodePropertyValue>> (Long nodeId) -
selectNodeProperties
protected abstract Map<NodeVersionKey,Map<NodePropertyKey, selectNodePropertiesNodePropertyValue>> (Long nodeId, Set<Long> qnameIds) -
deleteNodeProperties
-
deleteNodeProperties
-
insertNodeProperties
protected abstract void insertNodeProperties(Long nodeId, Map<NodePropertyKey, NodePropertyValue> persistableProps) -
selectNodeAspects
-
insertNodeAspect
-
deleteNodeAspects
-
selectNodesWithAspects
protected abstract void selectNodesWithAspects(List<Long> qnameIds, Long minNodeId, Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback) -
selectNodesWithAspects
protected abstract void selectNodesWithAspects(List<Long> qnameIds, Long minNodeId, Long maxNodeId, boolean ordered, NodeDAO.NodeRefQueryCallback resultsCallback) -
selectNodesWithAspects
protected abstract void selectNodesWithAspects(List<Long> qnameIds, Long minNodeId, Long maxNodeId, boolean ordered, int maxResults, NodeDAO.NodeRefQueryCallback resultsCallback) -
insertNodeAssoc
-
updateNodeAssoc
-
deleteNodeAssoc
-
deleteNodeAssocs
-
selectNodeAssocs
-
selectNodeAssocsBySource
protected abstract List<NodeAssocEntity> selectNodeAssocsBySource(Long sourceNodeId, Long typeQNameId) -
selectNodeAssocsBySourceAndPropertyValue
protected abstract List<NodeAssocEntity> selectNodeAssocsBySourceAndPropertyValue(Long sourceNodeId, Long typeQNameId, Long propertyQNameId, NodePropertyValue nodeValue) -
selectNodeAssocsByTarget
protected abstract List<NodeAssocEntity> selectNodeAssocsByTarget(Long targetNodeId, Long typeQNameId) -
selectNodeAssocById
-
selectNodeAssocMaxIndex
-
insertChildAssoc
-
deleteChildAssocs
-
updateChildAssocIndex
-
updateChildAssocUniqueName
-
selectChildAssoc
-
selectChildNodeIds
protected abstract List<ChildAssocEntity> selectChildNodeIds(Long nodeId, Boolean isPrimary, Long minAssocIdInclusive, int maxResults) -
selectPrimaryChildAcls
-
selectChildAssoc
-
selectChildAssocs
protected abstract void selectChildAssocs(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 callback -
selectChildAssocs
protected abstract void selectChildAssocs(Long parentNodeId, QName assocTypeQName, QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback) -
selectChildAssocs
protected abstract void selectChildAssocs(Long parentNodeId, Set<QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) -
selectChildAssoc
protected abstract ChildAssocEntity selectChildAssoc(Long parentNodeId, QName assocTypeQName, String childName) -
selectChildAssocs
protected abstract void selectChildAssocs(Long parentNodeId, QName assocTypeQName, Collection<String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) -
selectChildAssocsByPropertyValue
protected abstract void selectChildAssocsByPropertyValue(Long parentNodeId, QName propertyQName, NodePropertyValue nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback) -
selectChildAssocsByChildTypes
protected abstract void selectChildAssocsByChildTypes(Long parentNodeId, Set<QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) -
selectChildAssocsWithoutParentAssocsOfType
protected abstract void selectChildAssocsWithoutParentAssocsOfType(Long parentNodeId, QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback) -
selectParentAssocs
protected abstract void selectParentAssocs(Long childNodeId, QName assocTypeQName, QName assocQName, Boolean isPrimary, NodeDAO.ChildAssocRefQueryCallback resultsCallback) Parameters are all optional except the parent node ID and the callback -
selectParentAssocs
-
selectPrimaryParentAssocs
No DB constraint, so multiple returned -
updatePrimaryParentAssocs
-
moveNodeData
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
-
selectLastTxnBeforeCommitTime
-
selectTransactionCount
protected abstract int selectTransactionCount() -
selectTxnById
-
selectTxnChanges
-
selectTxns
-
selectTxnsUnused
-
selectMinTxnCommitTime
-
selectMaxTxnCommitTime
-
selectMinTxnCommitTimeForDeletedNodes
-
selectMinTxnId
-
selectMaxTxnId
-
selectMinUnusedTxnCommitTime
-
selectMinTxInNodeIdRange
-
selectMaxTxInNodeIdRange
-
selectNextTxCommitTime
-