Package org.alfresco.repo.domain.node
Interface NodeDAO
- All Superinterfaces:
NodeBulkLoader
- All Known Implementing Classes:
AbstractNodeDAOImpl,NodeDAOImpl,NodeDAOImpl.MSSQL,NodeDAOImpl.MySQL,NodeDAOImpl.MySQLClusterNDB
DAO services for alf_node and related tables
- Since:
- 3.4
- Author:
- Derek Hulley
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface used to iterate over results from child association queriesstatic interfaceInterface used to iterate over pure node resultsstatic classAn object that contains data giving a 'view' of the node to be deleted. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddNodeAspects(Long nodeId, Set<QName> aspectQNames) booleanaddNodeProperties(Long nodeId, Map<QName, Serializable> properties) booleanaddNodeProperty(Long nodeId, QName qname, Serializable value) intcountChildAssocsByParent(Long parentNodeId, boolean isPrimary) Counts the number of child associations directly under parentNodeId.voidcycleCheck(Long nodeId) Perform a check for cyclic relationshipsvoiddeleteChildAssoc(Long assocId) voiddeleteNode(Long nodeId) Deletes the node and all entities.intdeleteTxnsUnused(long fromCommitTime, long toCommitTime) Remove unused transactions from commit time 'fromCommitTime' to commit time 'toCommitTime'booleanFind out if a node exists.booleanFind out if a node exists.booleanFind out if a store exists or notgetAllRootNodes(StoreRef storeRef) 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) Get a child association for given parent node, association type and child node name (cm:name).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 nodeValue, 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! In effect the 'orphans' with respect to a certain association type.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) getNodeIdsIntervalForType(QName type, Long startTxnTime, Long endTxnTime) Returns the [minId, maxId] interval for nodes of a type, with the transaction time in the given window time.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, 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) booleanisInCurrentTxn(Long nodeId) Update a node's primary association, giving it a new parent and new association parameters.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.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 associationCreates a unique store for the given protocol and identifier combination.purgeDeletedNodes(long minAge, int deleteBatchSize) Purge the nodes marked as deletedpurgeEmptyTransactions(long minAge, int deleteBatchSize) Purge the transactions of purged nodesintpurgeNodes(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) selectAssocsNotLinkedByTwoOtherAssocs(Long parentNodeId) selectChildAssocsWithoutNodeAssocsOfTypes(Long parentNodeId, Long minNodeId, Long maxNodeId, Set<QName> assocToExcludeTypeQNames) selectDeletedNodesByCommitTime(long maxCommitTime) selectNodePropertiesByDataType(QName dataType, long minNodeId, long maxNodeId) Select all node properties that are between two node IDs and of the given actual typeselectNodePropertiesByTypes(Set<QName> qnames) Used by the re-encryptor to re-encrypt encryptable properties with a new encryption key.selectUnusedTransactionsByCommitTime(long maxCommitTime) intsetChildAssocIndex(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, int index) Sets the association index ordering.voidsetChildAssocsUniqueName(Long childNodeId, String childName) Bulk-update all unique name (cm:name) index for parent associations of a given node.booleansetModifiedDate(Long nodeId, Date date) Deprecated.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) voidsetPrimaryChildrenSharedAclId(Long primaryParentNodeId, Long optionalOldSharedAlcIdInAdditionToNull, Long newSharedAclId) inttouchNodes(Long txnId, List<Long> nodeIds) Update the transaction associated with a lust of nodesbooleanupdateNode(Long nodeId, QName nodeTypeQName, Locale nodeLocale) Methods inherited from interface org.alfresco.repo.node.NodeBulkLoader
cacheNodes, cacheNodesById, clear, getCachedAncestors, setCheckNodeConsistency
-
Method Details
-
getCurrentTransactionCommitTime
Long getCurrentTransactionCommitTime()- 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
- 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
Get the ID-ref pair for a store- Returns:
- Returns the ID-reference pair for the store or null if it doesn't exist
-
getStores
Fetch a list of all stores in the repository- Returns:
- Returns a list of stores
-
exists
Find out if a store exists or not- Parameters:
storeRef- the store- Returns:
- Returns true if the store exists otherwise false
-
newStore
Creates a unique store for the given protocol and identifier combination. The root node is created with the "root" aspect.- Returns:
- Returns the root node, which is added automatically.
- Throws:
StoreExistsException- if the store already exists
-
moveStore
Changes the old store reference to the new store reference.- Parameters:
oldStoreRef- the existing storenewStoreRef- the new store
-
getRootNode
-
getAllRootNodes
-
exists
Find out if a node exists. Unpurged deleted nodes do not count as they are the DAO's concern only.- Parameters:
nodeRef- the potentially valid node reference- Returns:
- Returns true if the node is present and undeleted
-
exists
Find out if a node exists. Unpurged deleted nodes do not count as they are the DAO's concern only.- Parameters:
nodeId- the potentially valid node ID- Returns:
- Returns true if the node is present and undeleted
-
isInCurrentTxn
- Returns:
- Returns true if the node was last modified in the current transaction, otherwise false.
- Throws:
InvalidNodeRefException- if there is no record of the node, past or present
-
getNodeRefStatus
Get the current status of the node, including deleted nodes.- 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
Get the current status of the node, including deleted nodes.- 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
-
getNodePair
-
getNodeType
-
getNodeAclId
-
newNode
ChildAssocEntity newNode(Long parentNodeId, QName assocTypeQName, QName assocQName, StoreRef storeRef, String uuid, QName nodeTypeQName, Locale nodeLocale, String childNodeName, Map<QName, Serializable> auditableProperties) throws InvalidTypeExceptionCreate a new node. Note that allowing the uuid to be assigned by passing in a null is more efficient.- 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 nodeNodeExistsException- if the target reference is already taken by a live node
-
moveNode
Pair<Pair<Long,ChildAssociationRef>, moveNodePair<Long, NodeRef>> (Long childNodeId, Long newParentNodeId, QName assocTypeQName, QName assocQName) Update 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.- 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)
- Throws:
NodeExistsException- if the target UUID of the move (in case of a store move) already exists
-
touchNodes
Update the transaction associated with a lust of nodes- Parameters:
txnId- - the tx id to setnodeIds- - the nodes to update- Returns:
- the number of nodes touched
-
updateNode
- Parameters:
nodeTypeQName- 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
-
setNodeAclId
-
deleteNode
Deletes the node and all entities. Note that the node entry will still exist and be associated with a live transaction. -
purgeNodes
int purgeNodes(long fromTxnCommitTimeMs, long toTxnCommitTimeMs) Purge deleted nodes where their participating transactions are in-between the given time interval.- Parameters:
fromTxnCommitTimeMs- from commit timetoTxnCommitTimeMs- to commit time- Returns:
- Returns the number of deleted nodes purged
-
getNodeProperty
-
getNodeProperties
-
setNodeProperties
-
addNodeProperty
-
addNodeProperties
-
removeNodeProperties
-
setModifiedDate
Deprecated.UsesetModifiedProperties(Long, Date, String)to also change the cm:modifier propertyPull 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.- Parameters:
nodeId- the node to changedate- the date to set for cm:modified- Returns:
- Returns true if the cm:modified property was actually set
-
setModifiedProperties
Pull 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.- 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
-
hasNodeAspect
-
addNodeAspects
-
removeNodeAspects
-
removeNodeAspects
-
getNodesWithAspects
void getNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback) Get nodes with aspects between the given ranges- 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
void getNodesWithAspects(Set<QName> aspectQNames, Long minNodeId, Long maxNodeId, boolean ordered, NodeDAO.NodeRefQueryCallback resultsCallback) Get nodes with aspects between the given ranges, ordering the results optionally- 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
-
newNodeAssoc
Create a new association- 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
Update an existing assoc's index.- Parameters:
id- the association IDassocIndex- the new index (greater than 0)
-
removeNodeAssoc
Remove a specific node association- Parameters:
sourceNodeId- the source node IDtargetNodeId- the target node idassocTypeQName- the node association QName- Returns:
- Returns the number of associations removed
-
removeNodeAssocs
Remove all node associations of given IDs- Parameters:
ids- the IDs of the associations to remove- Returns:
- Returns the number of associations removed
-
getNodeAssocsToAndFrom
- Parameters:
nodeId- the source or target of the associations- Returns:
- Returns all the node associations where the node is the source or target
-
getSourceNodeAssocs
- 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
- 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
Collection<Pair<Long,AssociationRef>> getTargetAssocsByPropertyValue(Long sourceNodeId, QName typeQName, QName propertyQName, Serializable propertyValue) Get target associations by type of the association, property name and value.- 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
- Returns:
- Returns a specific node association with the given ID or null if it doesn't exist
-
getNodeAssoc
- Returns:
- Returns a specific node association with the given ID
- Throws:
org.springframework.dao.ConcurrencyFailureException- if the association ID is invalid
-
newChildAssoc
Pair<Long,ChildAssociationRef> newChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, String childNodeName) Create 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.- Parameters:
childNodeName- the cm:name to apply to the association- Returns:
- Returns the persisted and filled association's ID
-
deleteChildAssoc
- Parameters:
assocId- the ID of the child association to delete
-
setChildAssocIndex
int setChildAssocIndex(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName, int index) Sets the association index ordering.- 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
Bulk-update all unique name (cm:name) index for parent associations of a given node.- Parameters:
childNodeId- the child node who's name is changingchildName- the new cm:name value
-
getChildAssoc
Get a specific association- Parameters:
assocId- the ID of the association- Returns:
- Returns the association reference or null if it doesn't exist
-
getChildAssoc
Pair<Long,ChildAssociationRef> getChildAssoc(Long parentNodeId, Long childNodeId, QName assocTypeQName, QName assocQName) Get 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.
- Returns:
- Returns a matching association or null if one was not found.
-
getChildAssocs
void getChildAssocs(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. This is an efficient query for node paths.- 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
void getChildAssocs(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. This is an efficient query for node paths.- 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
void getChildAssocs(Long parentNodeId, Set<QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) Get the child associations of a given parent node, optionally filtering on type QName.- 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
Pair<Long,ChildAssociationRef> getChildAssoc(Long parentNodeId, QName assocTypeQName, String childName) Get a child association for given parent node, association type and child node name (cm:name).- 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
void getChildAssocs(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.NOTE: This method only works if the association type fundamentally supports unique-name enforcement.
- 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
-
getChildAssocsByChildTypes
void getChildAssocsByChildTypes(Long parentNodeId, Set<QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback) -
getChildAssocsWithoutParentAssocsOfType
void getChildAssocsWithoutParentAssocsOfType(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! In effect the 'orphans' with respect to a certain association type.- Parameters:
parentNodeId- the parent node IDassocTypeQName- the association type QNameresultsCallback- the callback that will be called with the results
-
selectChildAssocsWithoutNodeAssocsOfTypes
List<Node> selectChildAssocsWithoutNodeAssocsOfTypes(Long parentNodeId, Long minNodeId, Long maxNodeId, Set<QName> assocToExcludeTypeQNames) - Parameters:
parentNodeId- the parent node idminNodeId- the minimum node ID (inclusive), null for no limitation on the minimum value of the node idmaxNodeId- the maximum node ID (exclusive), null for no limitation on the maximum value of the node idassocToExcludeTypeQNames- the node associations to exclude, null for no filtering of the associations types- Returns:
- list of child nodes
-
getPrimaryParentAssoc
Finds the association between the node's primary parent and the node itself- Returns:
- Returns the primary (defining) association or null if it is a root node
-
getParentAssocs
void getParentAssocs(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. This is an efficient query for node paths.- 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
-
getPrimaryChildrenAcls
Fetch all primary child node IDs and corresponding ACL IDs.- Parameters:
nodeId- the parent node ID- Returns:
- Returns a list of Node ID - ACL ID pairs
-
getPaths
List<Path> getPaths(Pair<Long, NodeRef> nodePair, boolean primaryOnly) throws InvalidNodeRefExceptionBuild the paths for a node. When searching forprimaryOnly == true, checks that there is exactly one path.- Parameters:
nodePair- the leave or child node to start withprimaryOnly- true to follow only primary parent associations- Throws:
InvalidNodeRefException
-
cycleCheck
Perform a check for cyclic relationships -
getMaxTxnIdByCommitTime
Retrieves the maximum transaction ID for which the commit time is less than the given time.- Parameters:
maxCommitTime- the max commit time (ms)- Returns:
- the last transaction on or before the given time
-
getTxnById
Retrieves a specific transaction.- Parameters:
txnId- the unique transaction ID.- Returns:
- the requested transaction or null
-
getTransactionCount
int getTransactionCount() -
getTxnChangesForStore
- Returns:
- Returns the node statuses for a transaction, limited to the store
-
getTxnChanges
- Returns:
- Returns the node statuses for a transaction, regardless of store
-
getTxnsUnused
-
deleteTxnsUnused
int deleteTxnsUnused(long fromCommitTime, long toCommitTime) Remove unused transactions from commit time 'fromCommitTime' to commit time 'toCommitTime'- Parameters:
fromCommitTime- delete unused transactions from commit timetoCommitTime- delete unused transactions to commit time- Returns:
- int
-
purgeTxn
-
getMinTxnCommitTime
Long getMinTxnCommitTime()- Returns:
- Returns the minimum commit time or null if there are no transactions
-
getMaxTxnCommitTime
Long getMaxTxnCommitTime()- Returns:
- Returns the maximum commit time or null if there are no transactions
-
getMinTxnCommitTimeForDeletedNodes
Long getMinTxnCommitTimeForDeletedNodes()- Returns:
- Returns the minimum commit time for deleted nodes or null if there are no transactions
-
getMinTxnId
Long getMinTxnId()- Returns:
- Returns the minimum id or 0 if there are no transactions
-
getMinUnusedTxnCommitTime
Long getMinUnusedTxnCommitTime()- Returns:
- the commit time of the oldest unused transaction
-
getMaxTxnId
Long getMaxTxnId()- Returns:
- Returns the maximum id or 0 if there are no transactions
-
getMinNodeId
Long getMinNodeId()- Returns:
- Returns the minimum node id or 0 if there are no nodes
-
getMaxNodeId
Long getMaxNodeId()- Returns:
- Returns the maximum node id or 0 if there are no nodes
-
getNodeIdsIntervalForType
Returns the [minId, maxId] interval for nodes of a type, with the transaction time in the given window time.- Parameters:
type- the node typestartTxnTime- the starting transaction time, null is allowed, case in which no minimum transaction time is consideredendTxnTime- the end transaction time, null is allowed, case in which no maximum transaction time is considered- Returns:
- the interval, as a pair
-
getChildAssocsByPropertyValue
void getChildAssocsByPropertyValue(Long parentNodeId, QName propertyQName, Serializable nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback) Select children by property values -
selectAssocsNotLinkedByTwoOtherAssocs
-
selectNodePropertiesByTypes
Used by the re-encryptor to re-encrypt encryptable properties with a new encryption key. -
selectNodePropertiesByDataType
List<NodePropertyEntity> selectNodePropertiesByDataType(QName dataType, long minNodeId, long maxNodeId) Select all node properties that are between two node IDs and of the given actual type- Parameters:
dataType- the actual, original type of the property, as given by one of the constants onDataTypeDefinitionminNodeId- the minimum node ID (inclusive)maxNodeId- the maximum node ID (exclusive)
-
countChildAssocsByParent
Counts the number of child associations directly under parentNodeId.- Parameters:
parentNodeId- the parent node idisPrimary- count just primary associations?
-
getMinTxInNodeIdRange
Gets the minimum commit time from transactions including a node id in the range [fromNodeId:toNodeId]- Parameters:
fromNodeId- Initial node idtoNodeId- Final node id- Returns:
- minimum commit time
-
getMaxTxInNodeIdRange
Gets the maximum commit time from transactions including a node id in the range [fromNodeId:toNodeId]- Parameters:
fromNodeId- Initial node idtoNodeId- Final node id- Returns:
- maximum commit time
-
getNextTxCommitTime
Gets the next commit time from [fromCommitTime]- Parameters:
fromCommitTime- Initial commit time- Returns:
- next commit time
-
selectDeletedNodesByCommitTime
- Parameters:
maxCommitTime-- Returns:
- Iterator over node ids
-
purgeDeletedNodes
Purge the nodes marked as deleted- Parameters:
minAge-deleteBatchSize-- Returns:
- the count of nodes deleted in each batch
-
selectUnusedTransactionsByCommitTime
- Parameters:
maxCommitTime-- Returns:
- Iterator over transaction ids
-
purgeEmptyTransactions
Purge the transactions of purged nodes- Parameters:
minAge-deleteBatchSize-- Returns:
- the count of transactions deleted in each batch
-
setModifiedProperties(Long, Date, String)to also change the cm:modifier property