public interface NodeDAO extends NodeBulkLoader
Modifier and Type | Interface and Description |
---|---|
static interface |
NodeDAO.ChildAssocRefQueryCallback
Interface used to iterate over results from child association queries
|
static interface |
NodeDAO.NodeRefQueryCallback
Interface used to iterate over pure node results
|
static class |
NodeDAO.NodeView
An object that contains data giving a 'view' of the node to be deleted.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addNodeAspects(Long nodeId,
Set<org.alfresco.service.namespace.QName> aspectQNames) |
boolean |
addNodeProperties(Long nodeId,
Map<org.alfresco.service.namespace.QName,Serializable> properties) |
boolean |
addNodeProperty(Long nodeId,
org.alfresco.service.namespace.QName qname,
Serializable value) |
int |
countChildAssocsByParent(Long parentNodeId,
boolean isPrimary)
Counts the number of child associations directly under parentNodeId.
|
void |
cycleCheck(Long nodeId)
Perform a check for cyclic relationships
|
void |
deleteChildAssoc(Long assocId) |
void |
deleteNode(Long nodeId)
Deletes the node and all entities.
|
int |
deleteTxnsUnused(long fromCommitTime,
long toCommitTime)
Remove unused transactions from commit time 'fromCommitTime' to commit time 'toCommitTime'
|
boolean |
exists(Long nodeId)
Find out if a node exists.
|
boolean |
exists(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Find out if a node exists.
|
boolean |
exists(org.alfresco.service.cmr.repository.StoreRef storeRef)
Find out if a store exists or not
|
Set<org.alfresco.service.cmr.repository.NodeRef> |
getAllRootNodes(org.alfresco.service.cmr.repository.StoreRef storeRef) |
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> |
getChildAssoc(Long assocId)
Get a specific association
|
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> |
getChildAssoc(Long parentNodeId,
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<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> |
getChildAssoc(Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
String childName)
Get a child association for given parent node, association type and child node name (cm:name).
|
void |
getChildAssocs(Long parentNodeId,
Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.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.
|
void |
getChildAssocs(Long parentNodeId,
org.alfresco.service.namespace.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.
|
void |
getChildAssocs(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.
|
void |
getChildAssocs(Long parentNodeId,
Set<org.alfresco.service.namespace.QName> assocTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Get the child associations of a given parent node, optionally filtering on type QName.
|
void |
getChildAssocsByChildTypes(Long parentNodeId,
Set<org.alfresco.service.namespace.QName> childNodeTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback) |
void |
getChildAssocsByPropertyValue(Long parentNodeId,
org.alfresco.service.namespace.QName propertyQName,
Serializable nodeValue,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Select children by property values
|
void |
getChildAssocsWithoutParentAssocsOfType(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.
|
Long |
getCurrentTransactionId(boolean ensureNew) |
Long |
getMaxNodeId() |
Long |
getMaxTxnCommitTime() |
Long |
getMaxTxnId() |
Long |
getMaxTxnIdByCommitTime(long maxCommitTime)
Retrieves the maximum transaction ID for which the commit time is less than the given time.
|
Long |
getMinNodeId() |
Long |
getMinTxnCommitTime() |
Long |
getMinTxnCommitTimeForDeletedNodes() |
Long |
getMinTxnId() |
Long |
getMinUnusedTxnCommitTime() |
Long |
getNodeAclId(Long nodeId) |
Set<org.alfresco.service.namespace.QName> |
getNodeAspects(Long nodeId) |
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef> |
getNodeAssoc(Long assocId) |
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef> |
getNodeAssocOrNull(Long assocId) |
Collection<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef>> |
getNodeAssocsToAndFrom(Long nodeId) |
org.alfresco.util.Pair<Long,Long> |
getNodeIdsIntervalForType(org.alfresco.service.namespace.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.
|
org.alfresco.service.cmr.repository.NodeRef.Status |
getNodeIdStatus(Long nodeId)
Get the current status of the node, including deleted nodes.
|
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef> |
getNodePair(Long nodeId) |
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef> |
getNodePair(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
Map<org.alfresco.service.namespace.QName,Serializable> |
getNodeProperties(Long nodeId) |
Serializable |
getNodeProperty(Long nodeId,
org.alfresco.service.namespace.QName propertyQName) |
org.alfresco.service.cmr.repository.NodeRef.Status |
getNodeRefStatus(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Get the current status of the node, including deleted nodes.
|
void |
getNodesWithAspects(Set<org.alfresco.service.namespace.QName> aspectQNames,
Long minNodeId,
Long maxNodeId,
NodeDAO.NodeRefQueryCallback resultsCallback)
Get nodes with aspects between the given ranges
|
org.alfresco.service.namespace.QName |
getNodeType(Long nodeId) |
List<Transaction> |
getOneTxnsByCommitTimeDescending(Long fromTimeInclusive,
Long toTimeExclusive,
boolean remoteOnly)
Get one last transaction in a given time range.
|
void |
getParentAssocs(Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.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.
|
List<org.alfresco.service.cmr.repository.Path> |
getPaths(org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef> nodePair,
boolean primaryOnly)
Build the paths for a node.
|
List<NodeIdAndAclId> |
getPrimaryChildrenAcls(Long nodeId)
Fetch all primary child node IDs and corresponding ACL IDs.
|
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> |
getPrimaryParentAssoc(Long childNodeId)
Finds the association between the node's primary parent and the node itself
|
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef> |
getRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef) |
Collection<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef>> |
getSourceNodeAssocs(Long targetNodeId,
org.alfresco.service.namespace.QName typeQName) |
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.StoreRef> |
getStore(org.alfresco.service.cmr.repository.StoreRef storeRef)
Get the ID-ref pair for a store
|
List<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.StoreRef>> |
getStores()
Fetch a list of all stores in the repository
|
Collection<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef>> |
getTargetAssocsByPropertyValue(Long sourceNodeId,
org.alfresco.service.namespace.QName typeQName,
org.alfresco.service.namespace.QName propertyQName,
Serializable propertyValue)
Get target associations by type of the association, property name and value.
|
Collection<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef>> |
getTargetNodeAssocs(Long sourceNodeId,
org.alfresco.service.namespace.QName typeQName) |
int |
getTransactionCount() |
Transaction |
getTxnById(Long txnId)
Retrieves a specific transaction.
|
List<org.alfresco.service.cmr.repository.NodeRef.Status> |
getTxnChanges(Long txnId) |
List<org.alfresco.service.cmr.repository.NodeRef.Status> |
getTxnChangesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef,
Long txnId) |
List<Transaction> |
getTxnsByCommitTimeAscending(List<Long> includeTxnIds)
Get a specific list of transactions ordered by commit time.
|
List<Transaction> |
getTxnsByCommitTimeAscending(Long fromTimeInclusive,
Long toTimeExclusive,
int count,
List<Long> excludeTxnIds,
boolean remoteOnly)
Get all transactions in a given time range.
|
List<Transaction> |
getTxnsByCommitTimeDescending(Long fromTimeInclusive,
Long toTimeExclusive,
int count,
List<Long> excludeTxnIds,
boolean remoteOnly)
Get all transactions in a given time range.
|
List<Long> |
getTxnsUnused(Long minTxnId,
long maxCommitTime,
int count) |
boolean |
hasNodeAspect(Long nodeId,
org.alfresco.service.namespace.QName aspectQName) |
boolean |
isInCurrentTxn(Long nodeId) |
org.alfresco.util.Pair<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef>,org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef>> |
moveNode(Long childNodeId,
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.
|
void |
moveStore(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<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> |
newChildAssoc(Long parentNodeId,
Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
String childNodeName)
Create a new child association.
|
ChildAssocEntity |
newNode(Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
org.alfresco.service.cmr.repository.StoreRef storeRef,
String uuid,
org.alfresco.service.namespace.QName nodeTypeQName,
Locale nodeLocale,
String childNodeName,
Map<org.alfresco.service.namespace.QName,Serializable> auditableProperties)
Create a new node.
|
Long |
newNodeAssoc(Long sourceNodeId,
Long targetNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
int assocIndex)
Create a new association
|
org.alfresco.util.Pair<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.
|
int |
purgeNodes(long fromTxnCommitTimeMs,
long toTxnCommitTimeMs)
Purge deleted nodes where their participating transactions are in-between the given time interval.
|
void |
purgeTxn(Long txnId) |
boolean |
removeNodeAspects(Long nodeId) |
boolean |
removeNodeAspects(Long nodeId,
Set<org.alfresco.service.namespace.QName> aspectQNames) |
int |
removeNodeAssoc(Long sourceNodeId,
Long targetNodeId,
org.alfresco.service.namespace.QName assocTypeQName)
Remove a specific node association
|
int |
removeNodeAssocs(List<Long> ids)
Remove all node associations of given IDs
|
boolean |
removeNodeProperties(Long nodeId,
Set<org.alfresco.service.namespace.QName> propertyQNames) |
List<Node> |
selectChildAssocsWithoutNodeAssocsOfTypes(Long parentNodeId,
Long minNodeId,
Long maxNodeId,
Set<org.alfresco.service.namespace.QName> assocToExcludeTypeQNames) |
List<NodePropertyEntity> |
selectNodePropertiesByDataType(org.alfresco.service.namespace.QName dataType,
long minNodeId,
long maxNodeId)
Select all node properties that are between two node IDs and of the given actual type
|
List<NodePropertyEntity> |
selectNodePropertiesByTypes(Set<org.alfresco.service.namespace.QName> qnames)
Used by the re-encryptor to re-encrypt encryptable properties with a new encryption key.
|
int |
setChildAssocIndex(Long parentNodeId,
Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
int index)
Sets the association index ordering.
|
void |
setChildAssocsUniqueName(Long childNodeId,
String childName)
Bulk-update all unique name (cm:name) index for parent associations of a given node.
|
boolean |
setModifiedDate(Long nodeId,
Date date)
Deprecated.
Use
setModifiedProperties(Long, Date, String) to also change the cm:modifier property |
boolean |
setModifiedProperties(Long nodeId,
Date modifiedDate,
String modifiedBy)
Pull the cm:modified up to the current time without changing any other
cm:auditable properties.
|
void |
setNodeAclId(Long nodeId,
Long aclId) |
void |
setNodeAssocIndex(Long id,
int assocIndex)
Update an existing assoc's index.
|
boolean |
setNodeProperties(Long nodeId,
Map<org.alfresco.service.namespace.QName,Serializable> properties) |
void |
setPrimaryChildrenSharedAclId(Long primaryParentNodeId,
Long optionalOldSharedAlcIdInAdditionToNull,
Long newSharedAclId) |
int |
touchNodes(Long txnId,
List<Long> nodeIds)
Update the transaction associated with a lust of nodes
|
boolean |
updateNode(Long nodeId,
org.alfresco.service.namespace.QName nodeTypeQName,
Locale nodeLocale) |
cacheNodes, cacheNodesById, clear, getCachedAncestors, setCheckNodeConsistency
Long getCurrentTransactionId(boolean ensureNew)
ensureNew
- true to ensure that a new transaction entry is created
if the current transaction does not have one.org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.StoreRef> getStore(org.alfresco.service.cmr.repository.StoreRef storeRef)
List<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.StoreRef>> getStores()
boolean exists(org.alfresco.service.cmr.repository.StoreRef storeRef)
storeRef
- the storeorg.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef> newStore(org.alfresco.service.cmr.repository.StoreRef storeRef)
org.alfresco.service.cmr.repository.StoreExistsException
- if the store already existsvoid moveStore(org.alfresco.service.cmr.repository.StoreRef oldStoreRef, org.alfresco.service.cmr.repository.StoreRef newStoreRef)
oldStoreRef
- the existing storenewStoreRef
- the new storeorg.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef> getRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)
Set<org.alfresco.service.cmr.repository.NodeRef> getAllRootNodes(org.alfresco.service.cmr.repository.StoreRef storeRef)
boolean exists(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the potentially valid node referenceboolean exists(Long nodeId)
nodeId
- the potentially valid node IDboolean isInCurrentTxn(Long nodeId)
org.alfresco.service.cmr.repository.InvalidNodeRefException
- if there is no record of the node, past or presentorg.alfresco.service.cmr.repository.NodeRef.Status getNodeRefStatus(org.alfresco.service.cmr.repository.NodeRef nodeRef)
nodeRef
- the node referenceorg.alfresco.service.cmr.repository.NodeRef.Status getNodeIdStatus(Long nodeId)
nodeId
- the node idorg.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef> getNodePair(org.alfresco.service.cmr.repository.NodeRef nodeRef)
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef> getNodePair(Long nodeId)
org.alfresco.service.namespace.QName getNodeType(Long nodeId)
ChildAssocEntity newNode(Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.cmr.repository.StoreRef storeRef, String uuid, org.alfresco.service.namespace.QName nodeTypeQName, Locale nodeLocale, String childNodeName, Map<org.alfresco.service.namespace.QName,Serializable> auditableProperties) throws org.alfresco.service.cmr.dictionary.InvalidTypeException
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 nodeorg.alfresco.service.cmr.dictionary.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 nodeorg.alfresco.util.Pair<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef>,org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef>> moveNode(Long childNodeId, Long newParentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)
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 nameNodeExistsException
- if the target UUID of the move (in case of a store move) already existsint touchNodes(Long txnId, List<Long> nodeIds)
txnId
- - the tx id to setnodeIds
- - the nodes to updateboolean updateNode(Long nodeId, org.alfresco.service.namespace.QName nodeTypeQName, Locale nodeLocale)
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 onevoid setPrimaryChildrenSharedAclId(Long primaryParentNodeId, Long optionalOldSharedAlcIdInAdditionToNull, Long newSharedAclId)
void deleteNode(Long nodeId)
int purgeNodes(long fromTxnCommitTimeMs, long toTxnCommitTimeMs)
fromTxnCommitTimeMs
- from commit timetoTxnCommitTimeMs
- to commit timeSerializable getNodeProperty(Long nodeId, org.alfresco.service.namespace.QName propertyQName)
Map<org.alfresco.service.namespace.QName,Serializable> getNodeProperties(Long nodeId)
boolean setNodeProperties(Long nodeId, Map<org.alfresco.service.namespace.QName,Serializable> properties)
boolean addNodeProperty(Long nodeId, org.alfresco.service.namespace.QName qname, Serializable value)
boolean addNodeProperties(Long nodeId, Map<org.alfresco.service.namespace.QName,Serializable> properties)
boolean removeNodeProperties(Long nodeId, Set<org.alfresco.service.namespace.QName> propertyQNames)
boolean setModifiedDate(Long nodeId, Date date)
setModifiedProperties(Long, Date, String)
to also change the cm:modifier propertynodeId
- the node to changedate
- the date to set for cm:modifiedboolean setModifiedProperties(Long nodeId, Date modifiedDate, String modifiedBy)
nodeId
- the node to changemodifiedDate
- the date to set for cm:modifiedmodifiedBy
- the name to set for cm:modifierboolean hasNodeAspect(Long nodeId, org.alfresco.service.namespace.QName aspectQName)
boolean addNodeAspects(Long nodeId, Set<org.alfresco.service.namespace.QName> aspectQNames)
boolean removeNodeAspects(Long nodeId)
boolean removeNodeAspects(Long nodeId, Set<org.alfresco.service.namespace.QName> aspectQNames)
void getNodesWithAspects(Set<org.alfresco.service.namespace.QName> aspectQNames, Long minNodeId, Long maxNodeId, NodeDAO.NodeRefQueryCallback resultsCallback)
aspectQNames
- the aspects that must be on the nodesminNodeId
- the minimum node ID (inclusive)maxNodeId
- the maximum node ID (exclusive)resultsCallback
- callback to process resultsLong newNodeAssoc(Long sourceNodeId, Long targetNodeId, org.alfresco.service.namespace.QName assocTypeQName, int assocIndex)
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)void setNodeAssocIndex(Long id, int assocIndex)
id
- the association IDassocIndex
- the new index (greater than 0)int removeNodeAssoc(Long sourceNodeId, Long targetNodeId, org.alfresco.service.namespace.QName assocTypeQName)
sourceNodeId
- the source node IDtargetNodeId
- the target node idassocTypeQName
- the node association QNameint removeNodeAssocs(List<Long> ids)
ids
- the IDs of the associations to removeCollection<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef>> getNodeAssocsToAndFrom(Long nodeId)
nodeId
- the source or target of the associationsCollection<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef>> getSourceNodeAssocs(Long targetNodeId, org.alfresco.service.namespace.QName typeQName)
targetNodeId
- the target of the associationtypeQName
- the type of the association (optional)Collection<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef>> getTargetNodeAssocs(Long sourceNodeId, org.alfresco.service.namespace.QName typeQName)
sourceNodeId
- the source of the associationtypeQName
- the type of the association (optional)Collection<org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef>> getTargetAssocsByPropertyValue(Long sourceNodeId, org.alfresco.service.namespace.QName typeQName, org.alfresco.service.namespace.QName propertyQName, Serializable propertyValue)
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)org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef> getNodeAssocOrNull(Long assocId)
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.AssociationRef> getNodeAssoc(Long assocId)
org.springframework.dao.ConcurrencyFailureException
- if the association ID is invalidorg.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> newChildAssoc(Long parentNodeId, Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, String childNodeName)
childNodeName
- the cm:name to apply to the associationvoid deleteChildAssoc(Long assocId)
assocId
- the ID of the child association to deleteint setChildAssocIndex(Long parentNodeId, Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int index)
parentNodeId
- the parent node IDchildNodeId
- the child node IDassocTypeQName
- the association typeassocQName
- the association path qualified nameindex
- the new indexvoid setChildAssocsUniqueName(Long childNodeId, String childName)
childNodeId
- the child node who's name is changingchildName
- the new cm:name valueorg.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssoc(Long assocId)
assocId
- the ID of the associationorg.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssoc(Long parentNodeId, Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName)
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.
void getChildAssocs(Long parentNodeId, Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, Boolean isPrimary, Boolean sameStore, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
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 resultsvoid getChildAssocs(Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, int maxResults, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
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 resultsvoid getChildAssocs(Long parentNodeId, Set<org.alfresco.service.namespace.QName> assocTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
parentNodeId
- the parent node IDassocTypeQNames
- the association type qnames to filter on; null for no filteringresultsCallback
- the callback that will be called with the resultsorg.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssoc(Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, String childName)
parentNodeId
- the parent Node IDassocTypeQName
- the association type to filter onchildName
- the cm:name value to filter onvoid getChildAssocs(Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, Collection<String> childNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
NOTE: This method only works if the association type fundamentally supports unique-name enforcement.
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 resultsvoid getChildAssocsByChildTypes(Long parentNodeId, Set<org.alfresco.service.namespace.QName> childNodeTypeQNames, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
void getChildAssocsWithoutParentAssocsOfType(Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
parentNodeId
- the parent node IDassocTypeQName
- the association type QNameresultsCallback
- the callback that will be called with the resultsList<Node> selectChildAssocsWithoutNodeAssocsOfTypes(Long parentNodeId, Long minNodeId, Long maxNodeId, Set<org.alfresco.service.namespace.QName> assocToExcludeTypeQNames)
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 typesorg.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ChildAssociationRef> getPrimaryParentAssoc(Long childNodeId)
void getParentAssocs(Long childNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, Boolean isPrimary, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
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 resultsList<NodeIdAndAclId> getPrimaryChildrenAcls(Long nodeId)
nodeId
- the parent node IDList<org.alfresco.service.cmr.repository.Path> getPaths(org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.NodeRef> nodePair, boolean primaryOnly) throws org.alfresco.service.cmr.repository.InvalidNodeRefException
primaryOnly == true
, checks that there is exactly
one path.nodePair
- the leave or child node to start withprimaryOnly
- true to follow only primary parent associationsorg.alfresco.service.cmr.repository.InvalidNodeRefException
void cycleCheck(Long nodeId)
Long getMaxTxnIdByCommitTime(long maxCommitTime)
maxCommitTime
- the max commit time (ms)Transaction getTxnById(Long txnId)
txnId
- the unique transaction ID.List<Transaction> getTxnsByCommitTimeAscending(Long fromTimeInclusive, Long toTimeExclusive, int count, List<Long> excludeTxnIds, boolean remoteOnly)
excludeTxnIds
- a list of txn IDs to ignore. null is allowed.remoteOnly
- true if locally-written transactions must be ignoredList<Transaction> getTxnsByCommitTimeDescending(Long fromTimeInclusive, Long toTimeExclusive, int count, List<Long> excludeTxnIds, boolean remoteOnly)
excludeTxnIds
- a list of txn IDs to ignore. null is allowed.remoteOnly
- true if locally-written transactions must be ignoredList<Transaction> getTxnsByCommitTimeAscending(List<Long> includeTxnIds)
includeTxnIds
- a list of transaction IDs to search forint getTransactionCount()
List<org.alfresco.service.cmr.repository.NodeRef.Status> getTxnChangesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef, Long txnId)
List<org.alfresco.service.cmr.repository.NodeRef.Status> getTxnChanges(Long txnId)
int deleteTxnsUnused(long fromCommitTime, long toCommitTime)
fromCommitTime
- delete unused transactions from commit timetoCommitTime
- delete unused transactions to commit timevoid purgeTxn(Long txnId)
Long getMinTxnCommitTime()
Long getMaxTxnCommitTime()
Long getMinTxnCommitTimeForDeletedNodes()
Long getMinTxnId()
Long getMinUnusedTxnCommitTime()
Long getMaxTxnId()
Long getMinNodeId()
Long getMaxNodeId()
org.alfresco.util.Pair<Long,Long> getNodeIdsIntervalForType(org.alfresco.service.namespace.QName type, Long startTxnTime, Long endTxnTime)
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 consideredvoid getChildAssocsByPropertyValue(Long parentNodeId, org.alfresco.service.namespace.QName propertyQName, Serializable nodeValue, NodeDAO.ChildAssocRefQueryCallback resultsCallback)
List<NodePropertyEntity> selectNodePropertiesByTypes(Set<org.alfresco.service.namespace.QName> qnames)
List<NodePropertyEntity> selectNodePropertiesByDataType(org.alfresco.service.namespace.QName dataType, long minNodeId, long maxNodeId)
dataType
- the actual, original type of the property, as given by one of the constants
on DataTypeDefinition
minNodeId
- the minimum node ID (inclusive)maxNodeId
- the maximum node ID (exclusive)int countChildAssocsByParent(Long parentNodeId, boolean isPrimary)
parentNodeId
- the parent node idisPrimary
- count just primary associations?List<Transaction> getOneTxnsByCommitTimeDescending(Long fromTimeInclusive, Long toTimeExclusive, boolean remoteOnly)
Copyright © 2005–2017 Alfresco Software. All rights reserved.