public abstract class AbstractNodeDAOImpl extends java.lang.Object implements NodeDAO, org.alfresco.ibatis.BatchingDAO
This provides basic services such as caching, but defers to the underlying implementation for CRUD operations.
NodeDAO.ChildAssocRefQueryCallback, NodeDAO.NodeRefQueryCallback, NodeDAO.NodeView| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isDebugEnabled |
protected org.apache.commons.logging.Log |
logger |
static java.lang.Long |
LONG_ZERO |
| Constructor and Description |
|---|
AbstractNodeDAOImpl()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addNodeAspects(java.lang.Long nodeId,
java.util.Set aspectQNames) |
boolean |
addNodeProperties(java.lang.Long nodeId,
java.util.Map properties) |
boolean |
addNodeProperty(java.lang.Long nodeId,
org.alfresco.service.namespace.QName qname,
java.io.Serializable value) |
void |
cacheNodes(java.util.List nodeRefs)
Pre-cache data relevant to the given nodes.
|
void |
cacheNodesById(java.util.List nodeIds)
Pre-cache data relevant to the given nodes.
|
void |
clear()
FOR TESTING ONLY: Clears out node cache data
|
void |
cycleCheck(java.lang.Long nodeId)
Potentially cheaper than evaluating all of a node's paths to check for child association cycles
TODO: When is it cheaper to go up and when is it cheaper to go down?
Look at using direct queries to pass through layers both up and down.
|
void |
deleteChildAssoc(java.lang.Long assocId) |
protected abstract int |
deleteChildAssocs(java.util.List ids) |
void |
deleteNode(java.lang.Long nodeId)
Deletes the node and all entities.
|
protected abstract int |
deleteNodeAspects(java.lang.Long nodeId,
java.util.Set qnameIds) |
protected abstract int |
deleteNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
java.lang.Long assocTypeQNameId) |
protected abstract int |
deleteNodeAssocs(java.util.List ids) |
protected abstract int |
deleteNodeById(java.lang.Long nodeId) |
protected abstract int |
deleteNodeProperties(java.lang.Long nodeId,
java.util.List propKeys) |
protected abstract int |
deleteNodeProperties(java.lang.Long nodeId,
java.util.Set qnameIds) |
protected abstract int |
deleteNodesByCommitTime(long maxTxnCommitTimeMs) |
protected abstract void |
deleteSubscriptions(java.lang.Long nodeId) |
protected abstract int |
deleteTransaction(java.lang.Long txnId) |
boolean |
exists(java.lang.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
|
java.util.Set |
getAllRootNodes(org.alfresco.service.cmr.repository.StoreRef storeRef) |
org.alfresco.util.Pair |
getChildAssoc(java.lang.Long assocId)
Get a specific association
|
org.alfresco.util.Pair |
getChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName)
Get a specific child association given all the determining data.
|
org.alfresco.util.Pair |
getChildAssoc(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
java.lang.String childName)
Checks a cache and then queries.
|
void |
getChildAssocs(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.Boolean isPrimary,
java.lang.Boolean sameStore,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Get the child associations of a given parent node, optionally filtering on association QName
and association type QName.
|
void |
getChildAssocs(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
java.util.Collection 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(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
int maxResults,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Gets the first n child associations of a given parent node, optionally filtering on association QName
and association type QName.
|
void |
getChildAssocs(java.lang.Long parentNodeId,
java.util.Set assocTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Get the child associations of a given parent node, optionally filtering on type QName.
|
void |
getChildAssocsByChildTypes(java.lang.Long parentNodeId,
java.util.Set childNodeTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback) |
void |
getChildAssocsByPropertyValue(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName propertyQName,
java.io.Serializable value,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Select children by property values
|
void |
getChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Gets the set of child associations of a certain parent node without parent associations of a certain type to
other nodes with the same parent! In effect the 'orphans' with respect to a certain association type.
|
java.lang.Long |
getCurrentTransactionId(boolean ensureNew) |
java.lang.Long |
getMaxTxnCommitTime() |
java.lang.Long |
getMaxTxnId() |
java.lang.Long |
getMaxTxnIdByCommitTime(long maxCommitTime)
Retrieves the maximum transaction ID for which the commit time is less than the given time.
|
java.lang.Long |
getMinTxnCommitTime() |
java.lang.Long |
getMinTxnId() |
java.lang.Long |
getMinUnusedTxnCommitTime() |
java.lang.Long |
getNodeAclId(java.lang.Long nodeId) |
java.util.Set |
getNodeAspects(java.lang.Long nodeId) |
org.alfresco.util.Pair |
getNodeAssoc(java.lang.Long assocId) |
org.alfresco.util.Pair |
getNodeAssocOrNull(java.lang.Long assocId) |
java.util.Collection |
getNodeAssocsToAndFrom(java.lang.Long nodeId) |
org.alfresco.service.cmr.repository.NodeRef.Status |
getNodeIdStatus(java.lang.Long nodeId)
Get the current status of the node, including deleted nodes.
|
org.alfresco.util.Pair |
getNodePair(java.lang.Long nodeId) |
org.alfresco.util.Pair |
getNodePair(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
java.util.Map |
getNodeProperties(java.lang.Long nodeId) |
java.io.Serializable |
getNodeProperty(java.lang.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(java.util.Set aspectQNames,
java.lang.Long minNodeId,
java.lang.Long maxNodeId,
NodeDAO.NodeRefQueryCallback resultsCallback)
Get nodes with aspects between the given ranges
|
org.alfresco.service.namespace.QName |
getNodeType(java.lang.Long nodeId) |
void |
getParentAssocs(java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.Boolean isPrimary,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Get the parent association of a given parent node, optionally filtering on association QName
and association type QName.
|
java.util.List |
getPaths(org.alfresco.util.Pair nodePair,
boolean primaryOnly)
Build the paths for a node.
|
java.util.List |
getPrimaryChildrenAcls(java.lang.Long nodeId)
Fetch all primary child node IDs and corresponding ACL IDs.
|
org.alfresco.util.Pair |
getPrimaryParentAssoc(java.lang.Long childNodeId)
Finds the association between the node's primary parent and the node itself
|
org.alfresco.util.Pair |
getRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef) |
java.util.Collection |
getSourceNodeAssocs(java.lang.Long targetNodeId,
org.alfresco.service.namespace.QName typeQName) |
java.util.List |
getStores()
Fetch a list of all stores in the repository
|
java.util.Collection |
getTargetNodeAssocs(java.lang.Long sourceNodeId,
org.alfresco.service.namespace.QName typeQName) |
int |
getTransactionCount() |
Transaction |
getTxnById(java.lang.Long txnId)
Retrieves a specific transaction.
|
java.util.List |
getTxnChanges(java.lang.Long txnId) |
java.util.List |
getTxnChangesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef,
java.lang.Long txnId) |
java.util.List |
getTxnsByCommitTimeAscending(java.util.List includeTxnIds)
Get a specific list of transactions ordered by commit time.
|
java.util.List |
getTxnsByCommitTimeAscending(java.lang.Long fromTimeInclusive,
java.lang.Long toTimeExclusive,
int count,
java.util.List excludeTxnIds,
boolean remoteOnly)
Get all transactions in a given time range.
|
java.util.List |
getTxnsByCommitTimeDescending(java.lang.Long fromTimeInclusive,
java.lang.Long toTimeExclusive,
int count,
java.util.List excludeTxnIds,
boolean remoteOnly)
Get all transactions in a given time range.
|
java.util.List |
getTxnsUnused(java.lang.Long minTxnId,
long maxCommitTime,
int count) |
boolean |
hasNodeAspect(java.lang.Long nodeId,
org.alfresco.service.namespace.QName aspectQName) |
void |
init() |
protected abstract java.lang.Long |
insertChildAssoc(ChildAssocEntity assoc) |
protected abstract java.lang.Long |
insertNode(NodeEntity node) |
protected abstract void |
insertNodeAspect(java.lang.Long nodeId,
java.lang.Long qnameId) |
protected abstract java.lang.Long |
insertNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
java.lang.Long assocTypeQNameId,
int assocIndex) |
protected abstract void |
insertNodeProperties(java.lang.Long nodeId,
java.util.Map persistableProps) |
protected abstract java.lang.Long |
insertServer(java.lang.String ipAddress) |
protected abstract java.lang.Long |
insertStore(StoreEntity store) |
protected abstract java.lang.Long |
insertTransaction(java.lang.Long serverId,
java.lang.String changeTxnId,
java.lang.Long commit_time_ms) |
boolean |
isInCurrentTxn(java.lang.Long nodeId) |
org.alfresco.util.Pair |
moveNode(java.lang.Long childNodeId,
java.lang.Long newParentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName)
Update a node's primary association, giving it a new parent and new association parameters.
|
protected abstract void |
moveNodeData(java.lang.Long fromNodeId,
java.lang.Long toNodeId)
Moves all node-linked data from one node to another.
|
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 |
newChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.String childNodeName)
Create a new child association.
|
ChildAssocEntity |
newNode(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
org.alfresco.service.cmr.repository.StoreRef storeRef,
java.lang.String uuid,
org.alfresco.service.namespace.QName nodeTypeQName,
java.util.Locale nodeLocale,
java.lang.String childNodeName,
java.util.Map auditableProperties)
Create a new node.
|
java.lang.Long |
newNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
int assocIndex)
Create a new association
|
org.alfresco.util.Pair |
newStore(org.alfresco.service.cmr.repository.StoreRef storeRef)
Creates a unique store for the given protocol and identifier combination.
|
int |
purgeNodes(long maxTxnCommitTimeMs)
Purge deleted nodes where their participating transactions are older than a given time.
|
void |
purgeTxn(java.lang.Long txnId) |
boolean |
removeNodeAspects(java.lang.Long nodeId) |
boolean |
removeNodeAspects(java.lang.Long nodeId,
java.util.Set aspectQNames) |
int |
removeNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
org.alfresco.service.namespace.QName assocTypeQName)
Remove a specific node association
|
int |
removeNodeAssocs(java.util.List ids)
Remove all node associations of given IDs
|
boolean |
removeNodeProperties(java.lang.Long nodeId,
java.util.Set propertyQNames) |
protected abstract java.util.List |
selectAllStores() |
protected abstract ChildAssocEntity |
selectChildAssoc(java.lang.Long assocId) |
protected abstract java.util.List |
selectChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName) |
protected abstract ChildAssocEntity |
selectChildAssoc(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
java.lang.String childName) |
protected abstract void |
selectChildAssocs(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.Boolean isPrimary,
java.lang.Boolean sameStore,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Parameters are all optional except the parent node ID and the callback
|
protected abstract void |
selectChildAssocs(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
java.util.Collection childNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback) |
protected abstract void |
selectChildAssocs(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
int maxResults,
NodeDAO.ChildAssocRefQueryCallback resultsCallback) |
protected abstract void |
selectChildAssocs(java.lang.Long parentNodeId,
java.util.Set assocTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback) |
protected abstract void |
selectChildAssocsByChildTypes(java.lang.Long parentNodeId,
java.util.Set childNodeTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback) |
protected abstract void |
selectChildAssocsByPropertyValue(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName propertyQName,
NodePropertyValue nodeValue,
NodeDAO.ChildAssocRefQueryCallback resultsCallback) |
protected abstract void |
selectChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
NodeDAO.ChildAssocRefQueryCallback resultsCallback) |
protected abstract java.util.List |
selectChildNodeIds(java.lang.Long nodeId,
java.lang.Boolean isPrimary,
java.lang.Long minAssocIdInclusive,
int maxResults) |
protected abstract Transaction |
selectLastTxnBeforeCommitTime(java.lang.Long maxCommitTime) |
protected abstract java.lang.Long |
selectMaxTxnCommitTime() |
protected abstract java.lang.Long |
selectMaxTxnId() |
protected abstract java.lang.Long |
selectMinTxnCommitTime() |
protected abstract java.lang.Long |
selectMinTxnId() |
protected abstract java.lang.Long |
selectMinUnusedTxnCommitTime() |
protected abstract java.util.Map |
selectNodeAspects(java.util.Set nodeIds) |
protected abstract NodeAssocEntity |
selectNodeAssocById(java.lang.Long assocId) |
protected abstract int |
selectNodeAssocMaxIndex(java.lang.Long sourceNodeId,
java.lang.Long assocTypeQNameId) |
protected abstract java.util.List |
selectNodeAssocs(java.lang.Long nodeId) |
protected abstract java.util.List |
selectNodeAssocsBySource(java.lang.Long sourceNodeId,
java.lang.Long typeQNameId) |
protected abstract java.util.List |
selectNodeAssocsByTarget(java.lang.Long targetNodeId,
java.lang.Long typeQNameId) |
protected abstract NodeEntity |
selectNodeById(java.lang.Long id) |
protected abstract NodeEntity |
selectNodeByNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
protected abstract java.util.Map |
selectNodeProperties(java.lang.Long nodeId) |
protected abstract java.util.Map |
selectNodeProperties(java.lang.Long nodeId,
java.util.Set qnameIds) |
protected abstract java.util.Map |
selectNodeProperties(java.util.Set nodeIds) |
protected abstract java.util.List |
selectNodesByIds(java.util.SortedSet ids) |
protected abstract java.util.List |
selectNodesByUuids(java.lang.Long storeId,
java.util.SortedSet uuids) |
protected abstract void |
selectNodesWithAspects(java.util.List qnameIds,
java.lang.Long minNodeId,
java.lang.Long maxNodeId,
NodeDAO.NodeRefQueryCallback resultsCallback) |
protected abstract java.util.List |
selectParentAssocs(java.lang.Long childNodeId) |
protected abstract void |
selectParentAssocs(java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.Boolean isPrimary,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
Parameters are all optional except the parent node ID and the callback
|
protected abstract java.util.List |
selectPrimaryChildAcls(java.lang.Long nodeId) |
protected abstract java.util.List |
selectPrimaryParentAssocs(java.lang.Long childNodeId)
No DB constraint, so multiple returned
|
protected abstract ServerEntity |
selectServer(java.lang.String ipAddress) |
protected abstract NodeEntity |
selectStoreRootNode(java.lang.Long storeId) |
protected abstract NodeEntity |
selectStoreRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef) |
protected abstract int |
selectTransactionCount() |
protected abstract Transaction |
selectTxnById(java.lang.Long txnId) |
protected abstract java.util.List |
selectTxnChanges(java.lang.Long txnId,
java.lang.Long storeId) |
protected abstract java.util.List |
selectTxns(java.lang.Long fromTimeInclusive,
java.lang.Long toTimeExclusive,
java.lang.Integer count,
java.util.List includeTxnIds,
java.util.List excludeTxnIds,
java.lang.Long excludeServerId,
java.lang.Boolean ascending) |
protected abstract java.util.List |
selectTxnsUnused(java.lang.Long minTxnId,
java.lang.Long maxCommitTime,
java.lang.Integer count) |
void |
setAccessControlListDAO(AccessControlListDAO accessControlListDAO) |
void |
setAclDAO(AclDAO aclDAO) |
void |
setAllRootNodesCache(org.alfresco.repo.cache.SimpleCache allRootNodesCache)
Set the cache that maintains the extended Store root node data
|
void |
setAspectsCache(org.alfresco.repo.cache.SimpleCache aspectsCache)
Set the cache that maintains the Node QName IDs
|
void |
setCheckNodeConsistency()
Transaction-scope setting to make the Node loader to guarantee the validity of all
caches: some cache data will be reloaded; some cache data will be considered safe.
|
int |
setChildAssocIndex(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
int index)
Sets the association index ordering.
|
void |
setChildAssocsUniqueName(java.lang.Long childNodeId,
java.lang.String childName)
TODO: See about pulling automatic cm:name update logic into this DAO
|
void |
setChildByNameCache(org.alfresco.repo.cache.SimpleCache childByNameCache)
Set the cache that maintains lookups by child cm:name
|
void |
setContentDataDAO(ContentDataDAO contentDataDAO) |
void |
setControlDAO(ControlDAO controlDAO) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setLocaleDAO(LocaleDAO localeDAO) |
boolean |
setModifiedDate(java.lang.Long nodeId,
java.util.Date modifiedDate)
Pull the cm:modified up to the current time without changing any other
cm:auditable properties.
|
void |
setNodeAclId(java.lang.Long nodeId,
java.lang.Long aclId) |
void |
setNodeAssocIndex(java.lang.Long id,
int assocIndex)
Update an existing assoc's index.
|
void |
setNodeIndexer(NodeIndexer nodeIndexer) |
boolean |
setNodeProperties(java.lang.Long nodeId,
java.util.Map properties) |
void |
setNodesCache(org.alfresco.repo.cache.SimpleCache cache)
Set the cache that maintains node ID-NodeRef cross referencing data
|
void |
setParentAssocsCacheLimitFactor(int parentAssocsCacheLimitFactor)
Sets the average number of parents expected per cache entry.
|
void |
setParentAssocsCacheSize(int parentAssocsCacheSize)
Sets the maximum capacity of the parent assocs cache
|
void |
setPolicyBehaviourFilter(BehaviourFilter policyBehaviourFilter) |
void |
setPrimaryChildrenSharedAclId(java.lang.Long primaryParentNodeId,
java.lang.Long optionalOldSharedAlcIdInAdditionToNull,
java.lang.Long newSharedAclId) |
void |
setPropertiesCache(org.alfresco.repo.cache.SimpleCache propertiesCache)
Set the cache that maintains the Node property values
|
void |
setQnameDAO(QNameDAO qnameDAO) |
void |
setRootNodesCache(org.alfresco.repo.cache.SimpleCache cache)
Set the cache that maintains the Store root node data
|
void |
setTransactionService(TransactionService transactionService) |
void |
setUsageDAO(UsageDAO usageDAO) |
int |
touchNodes(java.lang.Long txnId,
java.util.List nodeIds)
Update the transaction associated with a lust of nodes
|
protected abstract int |
updateChildAssocIndex(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
int index) |
protected abstract int |
updateChildAssocsUniqueName(java.lang.Long childNodeId,
java.lang.String name) |
boolean |
updateNode(java.lang.Long nodeId,
org.alfresco.service.namespace.QName nodeTypeQName,
java.util.Locale nodeLocale) |
protected abstract int |
updateNode(NodeUpdateEntity nodeUpdate) |
protected abstract int |
updateNodeAssoc(java.lang.Long id,
int assocIndex) |
protected abstract int |
updateNodes(java.lang.Long txnId,
java.util.List nodeIds) |
protected abstract void |
updatePrimaryChildrenSharedAclId(java.lang.Long txnId,
java.lang.Long primaryParentNodeId,
java.lang.Long optionalOldSharedAlcIdInAdditionToNull,
java.lang.Long newSharedAlcId) |
protected abstract int |
updatePrimaryParentAssocs(java.lang.Long childNodeId,
java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.String childNodeName) |
protected abstract int |
updateStore(StoreEntity store) |
protected abstract int |
updateStoreRoot(StoreEntity store) |
protected abstract int |
updateTransaction(java.lang.Long txnId,
java.lang.Long commit_time_ms) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcountChildAssocsByParent, deleteTxnsUnused, selectPropertiesprotected org.apache.commons.logging.Log logger
protected final boolean isDebugEnabled
public static final java.lang.Long LONG_ZERO
public AbstractNodeDAOImpl()
public void setTransactionService(TransactionService transactionService)
transactionService - the service to start post-txn processespublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService - the service help determine cm:auditable characteristicspublic void setPolicyBehaviourFilter(BehaviourFilter policyBehaviourFilter)
policyBehaviourFilter - the service to determine the behaviour for cm:auditable and
other inherent capabilities.public void setAclDAO(AclDAO aclDAO)
aclDAO - used to update permissions during certain operationspublic void setAccessControlListDAO(AccessControlListDAO accessControlListDAO)
accessControlListDAO - used to update ACL inheritance during node movespublic void setControlDAO(ControlDAO controlDAO)
controlDAO - create Savepointspublic void setQnameDAO(QNameDAO qnameDAO)
qnameDAO - translates QName IDs into QName instances and vice-versapublic void setContentDataDAO(ContentDataDAO contentDataDAO)
contentDataDAO - used to create and delete content referencespublic void setLocaleDAO(LocaleDAO localeDAO)
localeDAO - used to handle MLText propertiespublic void setUsageDAO(UsageDAO usageDAO)
usageDAO - used to keep content usage calculations in linepublic void setNodeIndexer(NodeIndexer nodeIndexer)
nodeIndexer - used when making changes that affect indexespublic void setRootNodesCache(org.alfresco.repo.cache.SimpleCache cache)
cache - the cachepublic void setAllRootNodesCache(org.alfresco.repo.cache.SimpleCache allRootNodesCache)
cache - the cachepublic void setNodesCache(org.alfresco.repo.cache.SimpleCache cache)
cache - the cachepublic void setAspectsCache(org.alfresco.repo.cache.SimpleCache aspectsCache)
aspectsCache - the cachepublic void setPropertiesCache(org.alfresco.repo.cache.SimpleCache propertiesCache)
propertiesCache - the cachepublic void setParentAssocsCacheSize(int parentAssocsCacheSize)
parentAssocsCacheSize - the cache sizepublic void setParentAssocsCacheLimitFactor(int parentAssocsCacheLimitFactor)
AbstractNodeDAOImpl.setParentAssocsCacheSize(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.parentAssocsCacheLimitFactor - the parentAssocsCacheLimitFactor to setpublic void setChildByNameCache(org.alfresco.repo.cache.SimpleCache childByNameCache)
childByNameCache - the cachepublic void init()
public java.lang.Long getCurrentTransactionId(boolean ensureNew)
getCurrentTransactionId in interface NodeDAOpublic java.util.List getStores()
NodeDAOpublic boolean exists(org.alfresco.service.cmr.repository.StoreRef storeRef)
NodeDAOpublic org.alfresco.util.Pair getRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)
getRootNode in interface NodeDAOpublic java.util.Set getAllRootNodes(org.alfresco.service.cmr.repository.StoreRef storeRef)
getAllRootNodes in interface NodeDAOpublic org.alfresco.util.Pair newStore(org.alfresco.service.cmr.repository.StoreRef storeRef)
NodeDAOpublic void moveStore(org.alfresco.service.cmr.repository.StoreRef oldStoreRef,
org.alfresco.service.cmr.repository.StoreRef newStoreRef)
NodeDAOpublic boolean exists(java.lang.Long nodeId)
NodeDAOpublic boolean exists(org.alfresco.service.cmr.repository.NodeRef nodeRef)
NodeDAOpublic boolean isInCurrentTxn(java.lang.Long nodeId)
isInCurrentTxn in interface NodeDAOpublic org.alfresco.service.cmr.repository.NodeRef.Status getNodeRefStatus(org.alfresco.service.cmr.repository.NodeRef nodeRef)
NodeDAOgetNodeRefStatus in interface NodeDAOnodeRef - the node referencepublic org.alfresco.service.cmr.repository.NodeRef.Status getNodeIdStatus(java.lang.Long nodeId)
NodeDAOgetNodeIdStatus in interface NodeDAOnodeId - the node idpublic org.alfresco.util.Pair getNodePair(org.alfresco.service.cmr.repository.NodeRef nodeRef)
getNodePair in interface NodeDAOpublic org.alfresco.util.Pair getNodePair(java.lang.Long nodeId)
getNodePair in interface NodeDAOpublic org.alfresco.service.namespace.QName getNodeType(java.lang.Long nodeId)
getNodeType in interface NodeDAOpublic java.lang.Long getNodeAclId(java.lang.Long nodeId)
getNodeAclId in interface NodeDAOpublic ChildAssocEntity newNode(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.cmr.repository.StoreRef storeRef, java.lang.String uuid, org.alfresco.service.namespace.QName nodeTypeQName, java.util.Locale nodeLocale, java.lang.String childNodeName, java.util.Map auditableProperties) throws org.alfresco.service.cmr.dictionary.InvalidTypeException
NodeDAOnewNode in interface NodeDAOparentNodeId - 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 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 nodepublic org.alfresco.util.Pair moveNode(java.lang.Long childNodeId,
java.lang.Long newParentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName)
NodeDAOmoveNode in interface NodeDAOchildNodeId - 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 namepublic boolean updateNode(java.lang.Long nodeId,
org.alfresco.service.namespace.QName nodeTypeQName,
java.util.Locale nodeLocale)
updateNode in interface NodeDAOnodeTypeQName - 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 onepublic int touchNodes(java.lang.Long txnId,
java.util.List nodeIds)
NodeDAOtouchNodes in interface NodeDAOtxnId - - the tx id to setnodeIds - - the nodes to updatepublic void setNodeAclId(java.lang.Long nodeId,
java.lang.Long aclId)
setNodeAclId in interface NodeDAOpublic void setPrimaryChildrenSharedAclId(java.lang.Long primaryParentNodeId,
java.lang.Long optionalOldSharedAlcIdInAdditionToNull,
java.lang.Long newSharedAclId)
setPrimaryChildrenSharedAclId in interface NodeDAOpublic void deleteNode(java.lang.Long nodeId)
NodeDAOdeleteNode in interface NodeDAOpublic int purgeNodes(long maxTxnCommitTimeMs)
NodeDAOpurgeNodes in interface NodeDAOmaxTxnCommitTimeMs - ignore transactions created after this timepublic java.util.Map getNodeProperties(java.lang.Long nodeId)
getNodeProperties in interface NodeDAOpublic java.io.Serializable getNodeProperty(java.lang.Long nodeId,
org.alfresco.service.namespace.QName propertyQName)
getNodeProperty in interface NodeDAOpublic boolean setNodeProperties(java.lang.Long nodeId,
java.util.Map properties)
setNodeProperties in interface NodeDAOpublic boolean addNodeProperty(java.lang.Long nodeId,
org.alfresco.service.namespace.QName qname,
java.io.Serializable value)
addNodeProperty in interface NodeDAOpublic boolean addNodeProperties(java.lang.Long nodeId,
java.util.Map properties)
addNodeProperties in interface NodeDAOpublic boolean removeNodeProperties(java.lang.Long nodeId,
java.util.Set propertyQNames)
removeNodeProperties in interface NodeDAOpublic boolean setModifiedDate(java.lang.Long nodeId,
java.util.Date modifiedDate)
NodeDAOsetModifiedDate in interface NodeDAOnodeId - the node to changepublic java.util.Set getNodeAspects(java.lang.Long nodeId)
getNodeAspects in interface NodeDAOpublic boolean hasNodeAspect(java.lang.Long nodeId,
org.alfresco.service.namespace.QName aspectQName)
hasNodeAspect in interface NodeDAOpublic boolean addNodeAspects(java.lang.Long nodeId,
java.util.Set aspectQNames)
addNodeAspects in interface NodeDAOpublic boolean removeNodeAspects(java.lang.Long nodeId)
removeNodeAspects in interface NodeDAOpublic boolean removeNodeAspects(java.lang.Long nodeId,
java.util.Set aspectQNames)
removeNodeAspects in interface NodeDAOpublic void getNodesWithAspects(java.util.Set aspectQNames,
java.lang.Long minNodeId,
java.lang.Long maxNodeId,
NodeDAO.NodeRefQueryCallback resultsCallback)
NodeDAOgetNodesWithAspects in interface NodeDAOaspectQNames - the aspects that must be on the nodesminNodeId - the minimum node ID (inclusive)maxNodeId - the maximum node ID (exclusive)resultsCallback - callback to process resultspublic java.lang.Long newNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
int assocIndex)
NodeDAOnewNodeAssoc in interface NodeDAOsourceNodeId - 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)public void setNodeAssocIndex(java.lang.Long id,
int assocIndex)
NodeDAOsetNodeAssocIndex in interface NodeDAOid - the association IDassocIndex - the new index (greater than 0)public int removeNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
org.alfresco.service.namespace.QName assocTypeQName)
NodeDAOremoveNodeAssoc in interface NodeDAOpublic int removeNodeAssocs(java.util.List ids)
NodeDAOremoveNodeAssocs in interface NodeDAOids - the IDs of the associations to removepublic java.util.Collection getNodeAssocsToAndFrom(java.lang.Long nodeId)
getNodeAssocsToAndFrom in interface NodeDAOnodeId - the source or target of the associationspublic java.util.Collection getSourceNodeAssocs(java.lang.Long targetNodeId,
org.alfresco.service.namespace.QName typeQName)
getSourceNodeAssocs in interface NodeDAOtargetNodeId - the target of the associationtypeQName - the type of the association (optional)public java.util.Collection getTargetNodeAssocs(java.lang.Long sourceNodeId,
org.alfresco.service.namespace.QName typeQName)
getTargetNodeAssocs in interface NodeDAOsourceNodeId - the source of the associationtypeQName - the type of the association (optional)public org.alfresco.util.Pair getNodeAssocOrNull(java.lang.Long assocId)
getNodeAssocOrNull in interface NodeDAOpublic org.alfresco.util.Pair getNodeAssoc(java.lang.Long assocId)
getNodeAssoc in interface NodeDAOpublic org.alfresco.util.Pair newChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.String childNodeName)
NodeDAOnewChildAssoc in interface NodeDAOchildNodeName - the cm:name to apply to the associationpublic void deleteChildAssoc(java.lang.Long assocId)
deleteChildAssoc in interface NodeDAOassocId - the ID of the child association to deletepublic int setChildAssocIndex(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
int index)
NodeDAOsetChildAssocIndex in interface NodeDAOparentNodeId - the parent node IDchildNodeId - the child node IDassocTypeQName - the association typeassocQName - the association path qualified namepublic void setChildAssocsUniqueName(java.lang.Long childNodeId,
java.lang.String childName)
setChildAssocsUniqueName in interface NodeDAOchildNodeId - the child node who's name is changingchildName - the new cm:name valuepublic org.alfresco.util.Pair getChildAssoc(java.lang.Long assocId)
NodeDAOgetChildAssoc in interface NodeDAOassocId - the ID of the associationpublic java.util.List getPrimaryChildrenAcls(java.lang.Long nodeId)
NodeDAOgetPrimaryChildrenAcls in interface NodeDAOnodeId - the parent node IDpublic org.alfresco.util.Pair getChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName)
NodeDAOThe 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.
getChildAssoc in interface NodeDAOpublic void getChildAssocs(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.Boolean isPrimary,
java.lang.Boolean sameStore,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
NodeDAOgetChildAssocs in interface NodeDAOparentNodeId - 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 resultspublic void getChildAssocs(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
int maxResults,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
NodeDAOgetChildAssocs in interface NodeDAOparentNodeId - 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 resultspublic void getChildAssocs(java.lang.Long parentNodeId,
java.util.Set assocTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
NodeDAOgetChildAssocs in interface NodeDAOparentNodeId - the parent node IDassocTypeQNames - the association type qnames to filter on; null for no filteringresultsCallback - the callback that will be called with the resultspublic org.alfresco.util.Pair getChildAssoc(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
java.lang.String childName)
getChildAssoc in interface NodeDAOparentNodeId - the parent Node IDassocTypeQName - the association type to filter onchildName - the cm:name value to filter onpublic void getChildAssocs(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
java.util.Collection childNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
NodeDAONOTE: This method only works if the association type fundamentally supports unique-name enforcement.
getChildAssocs in interface NodeDAOparentNodeId - 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 resultspublic void getChildAssocsByPropertyValue(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName propertyQName,
java.io.Serializable value,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
NodeDAOgetChildAssocsByPropertyValue in interface NodeDAOpublic void getChildAssocsByChildTypes(java.lang.Long parentNodeId,
java.util.Set childNodeTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
getChildAssocsByChildTypes in interface NodeDAOpublic void getChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
NodeDAOgetChildAssocsWithoutParentAssocsOfType in interface NodeDAOparentNodeId - the parent node IDassocTypeQName - the association type QNameresultsCallback - the callback that will be called with the resultspublic org.alfresco.util.Pair getPrimaryParentAssoc(java.lang.Long childNodeId)
NodeDAOgetPrimaryParentAssoc in interface NodeDAOpublic void getParentAssocs(java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.Boolean isPrimary,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
NodeDAOgetParentAssocs in interface NodeDAOchildNodeId - 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 resultspublic void cycleCheck(java.lang.Long nodeId)
cycleCheck in interface NodeDAOnodeId - the node to start withpublic java.util.List getPaths(org.alfresco.util.Pair nodePair,
boolean primaryOnly)
throws org.alfresco.service.cmr.repository.InvalidNodeRefException
NodeDAOprimaryOnly == true, checks that there is exactly
one path.public void setCheckNodeConsistency()
NodeBulkLoadersetCheckNodeConsistency in interface NodeBulkLoaderpublic void cacheNodesById(java.util.List nodeIds)
NodeBulkLoadercacheNodesById in interface NodeBulkLoadernodeIds - the nodes that will be cached.public void cacheNodes(java.util.List nodeRefs)
cacheNodes in interface NodeBulkLoadernodeRefs - the nodes that will be cached.public void clear()
clear in interface NodeBulkLoaderpublic java.lang.Long getMaxTxnIdByCommitTime(long maxCommitTime)
NodeDAOgetMaxTxnIdByCommitTime in interface NodeDAOmaxCommitTime - the max commit time (ms)public int getTransactionCount()
getTransactionCount in interface NodeDAOpublic Transaction getTxnById(java.lang.Long txnId)
NodeDAOgetTxnById in interface NodeDAOtxnId - the unique transaction ID.public java.util.List getTxnChanges(java.lang.Long txnId)
getTxnChanges in interface NodeDAOpublic java.util.List getTxnChangesForStore(org.alfresco.service.cmr.repository.StoreRef storeRef,
java.lang.Long txnId)
getTxnChangesForStore in interface NodeDAOpublic java.util.List getTxnsByCommitTimeAscending(java.lang.Long fromTimeInclusive,
java.lang.Long toTimeExclusive,
int count,
java.util.List excludeTxnIds,
boolean remoteOnly)
NodeDAOgetTxnsByCommitTimeAscending in interface NodeDAOexcludeTxnIds - a list of txn IDs to ignore. null is allowed.remoteOnly - true if locally-written transactions must be ignoredpublic java.util.List getTxnsByCommitTimeDescending(java.lang.Long fromTimeInclusive,
java.lang.Long toTimeExclusive,
int count,
java.util.List excludeTxnIds,
boolean remoteOnly)
NodeDAOgetTxnsByCommitTimeDescending in interface NodeDAOexcludeTxnIds - a list of txn IDs to ignore. null is allowed.remoteOnly - true if locally-written transactions must be ignoredpublic java.util.List getTxnsByCommitTimeAscending(java.util.List includeTxnIds)
NodeDAOgetTxnsByCommitTimeAscending in interface NodeDAOincludeTxnIds - a list of transaction IDs to search forpublic java.util.List getTxnsUnused(java.lang.Long minTxnId,
long maxCommitTime,
int count)
getTxnsUnused in interface NodeDAOpublic java.lang.Long getMinTxnCommitTime()
getMinTxnCommitTime in interface NodeDAOpublic java.lang.Long getMaxTxnCommitTime()
getMaxTxnCommitTime in interface NodeDAOpublic java.lang.Long getMinTxnId()
getMinTxnId in interface NodeDAOpublic java.lang.Long getMinUnusedTxnCommitTime()
getMinUnusedTxnCommitTime in interface NodeDAOpublic java.lang.Long getMaxTxnId()
getMaxTxnId in interface NodeDAOprotected abstract ServerEntity selectServer(java.lang.String ipAddress)
protected abstract java.lang.Long insertServer(java.lang.String ipAddress)
protected abstract java.lang.Long insertTransaction(java.lang.Long serverId,
java.lang.String changeTxnId,
java.lang.Long commit_time_ms)
protected abstract int updateTransaction(java.lang.Long txnId,
java.lang.Long commit_time_ms)
protected abstract int deleteTransaction(java.lang.Long txnId)
protected abstract java.util.List selectAllStores()
protected abstract NodeEntity selectStoreRootNode(java.lang.Long storeId)
protected abstract NodeEntity selectStoreRootNode(org.alfresco.service.cmr.repository.StoreRef storeRef)
protected abstract java.lang.Long insertStore(StoreEntity store)
protected abstract int updateStoreRoot(StoreEntity store)
protected abstract int updateStore(StoreEntity store)
protected abstract java.lang.Long insertNode(NodeEntity node)
protected abstract int updateNode(NodeUpdateEntity nodeUpdate)
protected abstract int updateNodes(java.lang.Long txnId,
java.util.List nodeIds)
protected abstract void updatePrimaryChildrenSharedAclId(java.lang.Long txnId,
java.lang.Long primaryParentNodeId,
java.lang.Long optionalOldSharedAlcIdInAdditionToNull,
java.lang.Long newSharedAlcId)
protected abstract int deleteNodeById(java.lang.Long nodeId)
protected abstract int deleteNodesByCommitTime(long maxTxnCommitTimeMs)
protected abstract NodeEntity selectNodeById(java.lang.Long id)
protected abstract NodeEntity selectNodeByNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
protected abstract java.util.List selectNodesByUuids(java.lang.Long storeId,
java.util.SortedSet uuids)
protected abstract java.util.List selectNodesByIds(java.util.SortedSet ids)
protected abstract java.util.Map selectNodeProperties(java.util.Set nodeIds)
protected abstract java.util.Map selectNodeProperties(java.lang.Long nodeId)
protected abstract java.util.Map selectNodeProperties(java.lang.Long nodeId,
java.util.Set qnameIds)
protected abstract int deleteNodeProperties(java.lang.Long nodeId,
java.util.Set qnameIds)
protected abstract int deleteNodeProperties(java.lang.Long nodeId,
java.util.List propKeys)
protected abstract void insertNodeProperties(java.lang.Long nodeId,
java.util.Map persistableProps)
protected abstract java.util.Map selectNodeAspects(java.util.Set nodeIds)
protected abstract void insertNodeAspect(java.lang.Long nodeId,
java.lang.Long qnameId)
protected abstract int deleteNodeAspects(java.lang.Long nodeId,
java.util.Set qnameIds)
protected abstract void selectNodesWithAspects(java.util.List qnameIds,
java.lang.Long minNodeId,
java.lang.Long maxNodeId,
NodeDAO.NodeRefQueryCallback resultsCallback)
protected abstract java.lang.Long insertNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
java.lang.Long assocTypeQNameId,
int assocIndex)
protected abstract int updateNodeAssoc(java.lang.Long id,
int assocIndex)
protected abstract int deleteNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
java.lang.Long assocTypeQNameId)
protected abstract int deleteNodeAssocs(java.util.List ids)
protected abstract java.util.List selectNodeAssocs(java.lang.Long nodeId)
protected abstract java.util.List selectNodeAssocsBySource(java.lang.Long sourceNodeId,
java.lang.Long typeQNameId)
protected abstract java.util.List selectNodeAssocsByTarget(java.lang.Long targetNodeId,
java.lang.Long typeQNameId)
protected abstract NodeAssocEntity selectNodeAssocById(java.lang.Long assocId)
protected abstract int selectNodeAssocMaxIndex(java.lang.Long sourceNodeId,
java.lang.Long assocTypeQNameId)
protected abstract java.lang.Long insertChildAssoc(ChildAssocEntity assoc)
protected abstract int deleteChildAssocs(java.util.List ids)
protected abstract int updateChildAssocIndex(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
int index)
protected abstract int updateChildAssocsUniqueName(java.lang.Long childNodeId,
java.lang.String name)
protected abstract ChildAssocEntity selectChildAssoc(java.lang.Long assocId)
protected abstract java.util.List selectChildNodeIds(java.lang.Long nodeId,
java.lang.Boolean isPrimary,
java.lang.Long minAssocIdInclusive,
int maxResults)
protected abstract java.util.List selectPrimaryChildAcls(java.lang.Long nodeId)
protected abstract java.util.List selectChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName)
protected abstract void selectChildAssocs(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.Boolean isPrimary,
java.lang.Boolean sameStore,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
protected abstract void selectChildAssocs(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
int maxResults,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
protected abstract void selectChildAssocs(java.lang.Long parentNodeId,
java.util.Set assocTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
protected abstract ChildAssocEntity selectChildAssoc(java.lang.Long parentNodeId, org.alfresco.service.namespace.QName assocTypeQName, java.lang.String childName)
protected abstract void selectChildAssocs(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
java.util.Collection childNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
protected abstract void selectChildAssocsByPropertyValue(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName propertyQName,
NodePropertyValue nodeValue,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
protected abstract void selectChildAssocsByChildTypes(java.lang.Long parentNodeId,
java.util.Set childNodeTypeQNames,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
protected abstract void selectChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
protected abstract void selectParentAssocs(java.lang.Long childNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.Boolean isPrimary,
NodeDAO.ChildAssocRefQueryCallback resultsCallback)
protected abstract java.util.List selectParentAssocs(java.lang.Long childNodeId)
protected abstract java.util.List selectPrimaryParentAssocs(java.lang.Long childNodeId)
protected abstract int updatePrimaryParentAssocs(java.lang.Long childNodeId,
java.lang.Long parentNodeId,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
java.lang.String childNodeName)
protected abstract void moveNodeData(java.lang.Long fromNodeId,
java.lang.Long toNodeId)
fromNodeId - the source nodetoNodeId - the target nodeprotected abstract void deleteSubscriptions(java.lang.Long nodeId)
protected abstract Transaction selectLastTxnBeforeCommitTime(java.lang.Long maxCommitTime)
protected abstract int selectTransactionCount()
protected abstract Transaction selectTxnById(java.lang.Long txnId)
protected abstract java.util.List selectTxnChanges(java.lang.Long txnId,
java.lang.Long storeId)
protected abstract java.util.List selectTxns(java.lang.Long fromTimeInclusive,
java.lang.Long toTimeExclusive,
java.lang.Integer count,
java.util.List includeTxnIds,
java.util.List excludeTxnIds,
java.lang.Long excludeServerId,
java.lang.Boolean ascending)
protected abstract java.util.List selectTxnsUnused(java.lang.Long minTxnId,
java.lang.Long maxCommitTime,
java.lang.Integer count)
protected abstract java.lang.Long selectMinTxnCommitTime()
protected abstract java.lang.Long selectMaxTxnCommitTime()
protected abstract java.lang.Long selectMinTxnId()
protected abstract java.lang.Long selectMaxTxnId()
protected abstract java.lang.Long selectMinUnusedTxnCommitTime()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.