|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl
public class HibernateNodeDaoServiceImpl
Hibernate-specific implementation of the persistence-independent node DAO interface
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.alfresco.repo.node.db.NodeDaoService |
---|
NodeDaoService.ChildAssocRefQueryCallback, NodeDaoService.ChildAssocRefQueryCallbackFilter, NodeDaoService.NodePropertyHandler, NodeDaoService.NodeRefQueryCallback, NodeDaoService.ObjectArrayQueryCallback |
Field Summary | |
---|---|
static java.lang.Class[] |
DUPLICATE_CHILD_NAME_EXCEPTIONS
Exceptions that indicate duplicate child names violations. |
Constructor Summary | |
---|---|
HibernateNodeDaoServiceImpl()
|
Method Summary | |
---|---|
void |
addNodeAspects(java.lang.Long nodeId,
java.util.Set aspectQNames)
|
void |
addNodeProperties(java.lang.Long nodeId,
java.util.Map properties)
|
void |
addNodeProperty(java.lang.Long nodeId,
QName qname,
java.io.Serializable propertyValue)
|
void |
beforeCommit()
Ensure that any transaction that might be present is updated to reflect the current time. |
void |
cacheNodes(java.util.List nodeRefs)
Pre-cache data relevant to the given nodes. Loads properties, aspects, parent associations and the ID-noderef cache. |
void |
clear()
Clears the cached nodes Clears the L1 cache, the parentAssocsCache and storeAndNodeIdCache |
static java.util.Map |
convertToPersistentProperties(java.util.Map in,
QNameDAO qnameDAO,
LocaleDAO localeDAO,
ContentDataDAO contentDataDAO,
DictionaryService dictionaryService)
|
static java.util.Map |
convertToPublicProperties(java.util.Map propertyValues,
QNameDAO qnameDAO,
LocaleDAO localeDAO,
ContentDataDAO contentDataDAO,
DictionaryService dictionaryService)
|
org.alfresco.util.Pair |
createStore(StoreRef storeRef)
Ensures that the store protocol/identifier combination is unique |
void |
deleteChildAssoc(java.lang.Long assocId)
|
boolean |
deleteChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
QName assocTypeQName,
QName assocQName)
Deletes an explicit child association. |
void |
deleteNode(java.lang.Long nodeId)
Manually ensures that all cascading of associations is taken care of |
void |
deleteNodeAssoc(java.lang.Long assocId)
|
boolean |
equals(java.lang.Object obj)
Checks equality by type and uuid |
void |
flush()
Just flushes the session |
org.alfresco.util.Pair |
getChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
QName assocTypeQName,
QName assocQName)
|
org.alfresco.util.Pair |
getChildAssoc(java.lang.Long parentNodeId,
QName assocTypeQName,
java.lang.String childName)
|
void |
getChildAssocs(java.lang.Long parentNodeId,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback,
boolean recurse)
Get a collection of all child association references for a given parent node. |
void |
getChildAssocs(java.lang.Long parentNodeId,
QName assocTypeQName,
java.util.Collection childNames,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
Get a collection of all child associations references where the child name is an exact match. |
void |
getChildAssocs(java.lang.Long parentNodeId,
QName assocQName,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
Get a collection of all child association references for a given parent node. |
void |
getChildAssocsByChildTypes(java.lang.Long parentNodeId,
java.util.Set childNodeTypeQNames,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
void |
getChildAssocsByTypeQNameAndQName(java.lang.Long parentNodeId,
QName assocTypeQName,
QName assocQName,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
void |
getChildAssocsByTypeQNames(java.lang.Long parentNodeId,
java.util.List assocTypeQNames,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
void |
getChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId,
QName assocTypeQName,
NodeDaoService.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. |
void |
getContentUrlsForStore(StoreRef storeRef,
NodeDaoService.ObjectArrayQueryCallback resultsCallback)
Iterate over all content nodes to get owner/creator and content url (in order to extract content size) |
java.lang.Long |
getMaxTxnCommitTime()
|
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 |
getNodeAccessControlList(java.lang.Long nodeId)
|
java.util.Set |
getNodeAspects(java.lang.Long nodeId)
|
org.alfresco.util.Pair |
getNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
QName assocTypeQName)
|
AssociationRef |
getNodeAssocOrNull(java.lang.Long assocId)
Gets a node association by ID. |
java.util.Collection |
getNodeAssocsToAndFrom(java.lang.Long nodeId)
|
org.alfresco.util.Pair |
getNodePair(java.lang.Long nodeId)
|
org.alfresco.util.Pair |
getNodePair(NodeRef nodeRef)
|
java.util.Map |
getNodeProperties(java.lang.Long nodeId)
|
java.util.Map |
getNodePropertiesRaw(java.lang.Long nodeId)
|
java.io.Serializable |
getNodeProperty(java.lang.Long nodeId,
QName propertyQName)
|
NodeRef.Status |
getNodeRefStatus(NodeRef nodeRef)
|
void |
getNodesDeletedInOldTxns(java.lang.Long minNodeId,
long maxCommitTime,
int count,
NodeDaoService.NodeRefQueryCallback resultsCallback)
Gets a batch of deleted nodes in old transactions. |
void |
getNodesWithAspect(QName aspectQName,
java.lang.Long minNodeId,
int count,
NodeDaoService.NodeRefQueryCallback resultsCallback)
|
void |
getNodesWithChildrenInDifferentStore(java.lang.Long storeId,
java.lang.Long minNodeId,
int count,
NodeDaoService.NodeRefQueryCallback resultsCallback)
Deprecated. Not performant. Do not use. |
QName |
getNodeType(java.lang.Long nodeId)
|
java.util.Collection |
getParentAssocs(java.lang.Long childNodeId)
Get all parent associations for the node. This includes a check to ensuret that only root nodes don't have primary parents |
void |
getPrimaryChildAssocs(java.lang.Long parentNodeId,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
void |
getPrimaryChildAssocsNotInSameStore(java.lang.Long parentNodeId,
NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
|
org.alfresco.util.Pair |
getPrimaryParentAssoc(java.lang.Long childNodeId)
Finds the association between the node's primary parent and the node itself This method includes a check for multiple primary parent associations. |
void |
getPropertyValuesByActualType(DataTypeDefinition actualDataTypeDefinition,
NodeDaoService.NodePropertyHandler handler)
Iterate over all property values for the given type definition. |
void |
getPropertyValuesByPropertyAndValue(StoreRef storeRef,
QName propertyQName,
java.lang.String value,
NodeDaoService.NodePropertyHandler handler)
Iterate over all nodes that have a given property type with a given string value. |
static java.io.Serializable |
getPublicProperty(java.util.Map propertyValues,
QName propertyQName,
QNameDAO qnameDAO,
LocaleDAO localeDAO,
ContentDataDAO contentDataDAO,
DictionaryService dictionaryService)
|
org.alfresco.util.Pair |
getRootNode(StoreRef storeRef)
|
java.util.Collection |
getSourceNodeAssocs(java.lang.Long targetNodeId)
|
java.util.List |
getStores()
Fetch a list of all stores in the repository |
java.util.Collection |
getTargetNodeAssocs(java.lang.Long sourceNodeId)
|
int |
getTransactionCount()
|
Transaction |
getTxnById(long txnId)
Retrieves a specific transaction. |
java.util.List |
getTxnChanges(long txnId)
|
java.util.List |
getTxnChangesForStore(StoreRef storeRef,
long txnId)
|
int |
getTxnDeleteCount(long txnId)
|
java.util.List |
getTxnsByCommitTimeAscending(long fromTimeInclusive,
long toTimeExclusive,
int count,
java.util.List excludeTxnIds,
boolean remoteOnly)
Get all transactions in a given time range. |
java.util.List |
getTxnsByCommitTimeDescending(long fromTimeInclusive,
long toTimeExclusive,
int count,
java.util.List excludeTxnIds,
boolean remoteOnly)
Get all transactions in a given time range. |
java.util.List |
getTxnsByMinCommitTime(java.util.List includeTxnIds)
Get the lowest commit time for a set of transactions |
java.util.List |
getTxnsUnused(java.lang.Long minTxnId,
long maxCommitTime,
int count)
|
int |
getTxnUpdateCount(long txnId)
|
void |
getUsersWithoutUsage(StoreRef storeRef,
NodeDaoService.ObjectArrayQueryCallback resultsCallback)
Iterate over all person nodes to get users without a calculated usage |
void |
getUsersWithoutUsageProp(StoreRef storeRef,
NodeDaoService.ObjectArrayQueryCallback resultsCallback)
Iterate over all person nodes with missing usage property (for one-off patch) |
void |
getUsersWithUsage(StoreRef storeRef,
NodeDaoService.ObjectArrayQueryCallback resultsCallback)
Iterate over all person nodes to get users with a calculated usage |
int |
hashCode()
|
boolean |
hasNodeAspect(java.lang.Long nodeId,
QName aspectQName)
|
boolean |
isDirty()
Does this Session contain any changes which must be synchronized with the store? |
org.alfresco.util.Pair |
moveNodeToStore(java.lang.Long nodeId,
StoreRef storeRef)
This moves the entire node, ensuring that a trail is left behind. |
org.alfresco.util.Pair |
newChildAssoc(java.lang.Long parentNodeId,
java.lang.Long childNodeId,
boolean isPrimary,
QName assocTypeQName,
QName assocQName,
java.lang.String newName)
|
org.alfresco.util.Pair |
newNode(StoreRef storeRef,
java.lang.String uuid,
QName nodeTypeQName)
Create a new node. |
org.alfresco.util.Pair |
newNodeAssoc(java.lang.Long sourceNodeId,
java.lang.Long targetNodeId,
QName assocTypeQName)
|
void |
prependPaths(org.alfresco.util.Pair currentNodePair,
org.alfresco.util.Pair currentRootNodePair,
Path currentPath,
java.util.Collection completedPaths,
java.util.Stack assocIdStack,
boolean primaryOnly)
Recursive method used to build up paths from a given node to the root. |
void |
purgeNode(java.lang.Long nodeId)
Final purge of the node entry. |
void |
purgeTxn(java.lang.Long txnId)
|
void |
removeNodeAspects(java.lang.Long nodeId,
java.util.Set aspectQNames)
|
void |
removeNodeProperties(java.lang.Long nodeId,
java.util.Set propertyQNamesIncl)
|
void |
setAclDaoComponent(AclDaoComponent aclDaoComponent)
|
void |
setAuditableTransactionHelper(RetryingTransactionHelper auditableTransactionHelper)
Set the component to start new transactions when setting auditable properties (timestamps) in the post-transaction phase. |
void |
setBehaviourFilter(BehaviourFilter behaviourFilter)
Set the component to determine the correct aspect behaviours. |
void |
setChildNameUnique(java.lang.Long childAssocId,
java.lang.String childName)
Change the name of the child node. |
void |
setContentDataDAO(ContentDataDAO contentDataDAO)
Set the component for storing and retrieving ContentData |
void |
setDictionaryService(DictionaryService dictionaryService)
Set the component for querying the dictionary model |
void |
setEnableTimestampPropagation(boolean enableTimestampPropagation)
Enable/disable propagation of timestamps from child to parent nodes. Note: This only has an effect on child associations that use the propagateTimestamps element. |
void |
setLocaleDAO(LocaleDAO localeDAO)
Set the component for creating Locale entities |
void |
setNodeAccessControlList(java.lang.Long nodeId,
java.lang.Long aclId)
|
void |
setNodeProperties(java.lang.Long nodeId,
java.util.Map propertiesIncl)
|
void |
setNodeStatus(java.lang.Long nodeId)
|
void |
setParentAssocsCache(SimpleCache parentAssocsCache)
Set the transaction-aware cache to store parent associations by child node id |
void |
setQnameDAO(QNameDAO qnameDAO)
Set the component for creating QName entities. |
void |
setStoreAndNodeIdCache(SimpleCache storeAndNodeIdCache)
Ste the transaction-aware cache to store Store and Root Node IDs by Store Reference |
void |
setTransactionService(TransactionService transactionService)
Executes post-transaction code |
void |
setUsageDeltaDAO(UsageDeltaDAO usageDeltaDAO)
|
org.alfresco.util.Pair |
updateChildAssoc(java.lang.Long childAssocId,
java.lang.Long parentNodeId,
java.lang.Long childNodeId,
QName assocTypeQName,
QName assocQName,
int index,
java.lang.String childName)
|
void |
updateNode(java.lang.Long nodeId,
StoreRef storeRefAfter,
java.lang.String uuidAfter,
QName nodeTypeQName)
|
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
---|
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Class[] DUPLICATE_CHILD_NAME_EXCEPTIONS
Constructor Detail |
---|
public HibernateNodeDaoServiceImpl()
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
HibernateNodeDaoServiceImpl.uuid
public void setQnameDAO(QNameDAO qnameDAO)
public void setContentDataDAO(ContentDataDAO contentDataDAO)
ContentData
public void setUsageDeltaDAO(UsageDeltaDAO usageDeltaDAO)
public void setAclDaoComponent(AclDaoComponent aclDaoComponent)
public void setLocaleDAO(LocaleDAO localeDAO)
public void setDictionaryService(DictionaryService dictionaryService)
public void setEnableTimestampPropagation(boolean enableTimestampPropagation)
public void setTransactionService(TransactionService transactionService)
public void setAuditableTransactionHelper(RetryingTransactionHelper auditableTransactionHelper)
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
public void setStoreAndNodeIdCache(SimpleCache storeAndNodeIdCache)
storeAndNodeIdCache
- the cachepublic void setParentAssocsCache(SimpleCache parentAssocsCache)
parentAssocsCache
- the cachepublic void beforeCommit()
beforeCommit
in interface TransactionalDao
public boolean isDirty()
isDirty
in interface NodeDaoService
isDirty
in interface TransactionalDao
public void flush()
flush
in interface NodeDaoService
flush
in interface TransactionalDao
public java.util.List getStores()
NodeDaoService
getStores
in interface NodeDaoService
HibernateNodeDaoServiceImpl.QUERY_GET_ALL_STORES
public org.alfresco.util.Pair getRootNode(StoreRef storeRef)
getRootNode
in interface NodeDaoService
public org.alfresco.util.Pair createStore(StoreRef storeRef)
createStore
in interface NodeDaoService
public NodeRef.Status getNodeRefStatus(NodeRef nodeRef)
getNodeRefStatus
in interface NodeDaoService
public org.alfresco.util.Pair newNode(StoreRef storeRef, java.lang.String uuid, QName nodeTypeQName) throws InvalidTypeException
NodeDaoService
newNode
in interface NodeDaoService
storeRef
- the store to which the node must belonguuid
- the node store-unique identifier, or null to assign a GUIDnodeTypeQName
- the type of the node
InvalidTypeException
- if the node type is invalid or if the node type
is not a valid real nodepublic org.alfresco.util.Pair moveNodeToStore(java.lang.Long nodeId, StoreRef storeRef)
moveNodeToStore
in interface NodeDaoService
public org.alfresco.util.Pair getNodePair(NodeRef nodeRef)
getNodePair
in interface NodeDaoService
nodeRef
- the node reference
public org.alfresco.util.Pair getNodePair(java.lang.Long nodeId)
getNodePair
in interface NodeDaoService
public QName getNodeType(java.lang.Long nodeId)
getNodeType
in interface NodeDaoService
public void setNodeStatus(java.lang.Long nodeId)
setNodeStatus
in interface NodeDaoService
public java.lang.Long getNodeAccessControlList(java.lang.Long nodeId)
getNodeAccessControlList
in interface NodeDaoService
public void setNodeAccessControlList(java.lang.Long nodeId, java.lang.Long aclId)
setNodeAccessControlList
in interface NodeDaoService
public void updateNode(java.lang.Long nodeId, StoreRef storeRefAfter, java.lang.String uuidAfter, QName nodeTypeQName)
updateNode
in interface NodeDaoService
storeRefAfter
- the new store or null to keep the existing oneuuidAfter
- the new UUID for the node or null to keep it the samenodeTypeQName
- the new type QName for the node or null to keep the existing onepublic java.util.Map getNodePropertiesRaw(java.lang.Long nodeId)
getNodePropertiesRaw
in interface NodeDaoService
nodeId
- the node's ID
NodeDaoService.getNodePair(NodeRef)
public java.io.Serializable getNodeProperty(java.lang.Long nodeId, QName propertyQName)
getNodeProperty
in interface NodeDaoService
public java.util.Map getNodeProperties(java.lang.Long nodeId)
getNodeProperties
in interface NodeDaoService
public void addNodeProperty(java.lang.Long nodeId, QName qname, java.io.Serializable propertyValue)
addNodeProperty
in interface NodeDaoService
public void addNodeProperties(java.lang.Long nodeId, java.util.Map properties)
addNodeProperties
in interface NodeDaoService
public void setNodeProperties(java.lang.Long nodeId, java.util.Map propertiesIncl)
setNodeProperties
in interface NodeDaoService
public void removeNodeProperties(java.lang.Long nodeId, java.util.Set propertyQNamesIncl)
removeNodeProperties
in interface NodeDaoService
public java.util.Set getNodeAspects(java.lang.Long nodeId)
getNodeAspects
in interface NodeDaoService
public void addNodeAspects(java.lang.Long nodeId, java.util.Set aspectQNames)
addNodeAspects
in interface NodeDaoService
public void removeNodeAspects(java.lang.Long nodeId, java.util.Set aspectQNames)
removeNodeAspects
in interface NodeDaoService
public boolean hasNodeAspect(java.lang.Long nodeId, QName aspectQName)
hasNodeAspect
in interface NodeDaoService
public void deleteNode(java.lang.Long nodeId)
deleteNode
in interface NodeDaoService
public void purgeNode(java.lang.Long nodeId)
purgeNode
in interface NodeDaoService
public org.alfresco.util.Pair newChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, boolean isPrimary, QName assocTypeQName, QName assocQName, java.lang.String newName)
newChildAssoc
in interface NodeDaoService
newName
- the cm:name to apply to the association
ChildAssoc
public void setChildNameUnique(java.lang.Long childAssocId, java.lang.String childName)
NodeDaoService
setChildNameUnique
in interface NodeDaoService
childName
- the name to put on the associationpublic org.alfresco.util.Pair updateChildAssoc(java.lang.Long childAssocId, java.lang.Long parentNodeId, java.lang.Long childNodeId, QName assocTypeQName, QName assocQName, int index, java.lang.String childName)
updateChildAssoc
in interface NodeDaoService
index
- the association index. -1 to keep the existing valuepublic void getChildAssocs(java.lang.Long parentNodeId, NodeDaoService.ChildAssocRefQueryCallback resultsCallback, boolean recurse)
NodeDaoService
WARNING: Be sure selective when doing this call recursively.
getChildAssocs
in interface NodeDaoService
parentNodeId
- the parent noderesultsCallback
- the callback that will be called with the resultsrecurse
- if true then iterate over the entire tree of nodes.
Resursion is done top-down i.e. the first level children are all
enumerated first, followed by all second level children and so on.public void getChildAssocs(java.lang.Long parentNodeId, QName assocQName, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
NodeDaoService
getChildAssocs
in interface NodeDaoService
parentNodeId
- the parent noderesultsCallback
- the callback that will be called with the resultspublic void getChildAssocs(java.lang.Long parentNodeId, QName assocTypeQName, java.util.Collection childNames, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
NodeDaoService
getChildAssocs
in interface NodeDaoService
parentNodeId
- the parent nodeassocTypeQName
- the type of the association to check.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 getChildAssocsByTypeQNames(java.lang.Long parentNodeId, java.util.List assocTypeQNames, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
getChildAssocsByTypeQNames
in interface NodeDaoService
public void getChildAssocsByTypeQNameAndQName(java.lang.Long parentNodeId, QName assocTypeQName, QName assocQName, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
getChildAssocsByTypeQNameAndQName
in interface NodeDaoService
public void getChildAssocsByChildTypes(java.lang.Long parentNodeId, java.util.Set childNodeTypeQNames, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
getChildAssocsByChildTypes
in interface NodeDaoService
public void getPrimaryChildAssocs(java.lang.Long parentNodeId, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
getPrimaryChildAssocs
in interface NodeDaoService
public void getPrimaryChildAssocsNotInSameStore(java.lang.Long parentNodeId, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
getPrimaryChildAssocsNotInSameStore
in interface NodeDaoService
public org.alfresco.util.Pair getChildAssoc(java.lang.Long parentNodeId, QName assocTypeQName, java.lang.String childName)
getChildAssoc
in interface NodeDaoService
public org.alfresco.util.Pair getChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, QName assocTypeQName, QName assocQName)
getChildAssoc
in interface NodeDaoService
ChildAssoc
public void clear()
clear
in interface NodeBulkLoader
public void cacheNodes(java.util.List nodeRefs)
cacheNodes
in interface NodeBulkLoader
nodeRefs
- the nodes that will be cached.public void getNodesWithAspect(QName aspectQName, java.lang.Long minNodeId, int count, NodeDaoService.NodeRefQueryCallback resultsCallback)
getNodesWithAspect
in interface NodeDaoService
public void getNodesWithChildrenInDifferentStore(java.lang.Long storeId, java.lang.Long minNodeId, int count, NodeDaoService.NodeRefQueryCallback resultsCallback)
NodeDaoService
getNodesWithChildrenInDifferentStore
in interface NodeDaoService
storeId
- the store of the parent nodesminNodeId
- the min node ID to returncount
- the maximum number of resultsresultsCallback
- the node callbackpublic void getChildAssocsWithoutParentAssocsOfType(java.lang.Long parentNodeId, QName assocTypeQName, NodeDaoService.ChildAssocRefQueryCallback resultsCallback)
NodeDaoService
getChildAssocsWithoutParentAssocsOfType
in interface NodeDaoService
parentNodeId
- the parent node IDassocTypeQName
- the association type QNameresultsCallback
- the callback that will be called with the resultspublic void deleteChildAssoc(java.lang.Long assocId)
deleteChildAssoc
in interface NodeDaoService
public boolean deleteChildAssoc(java.lang.Long parentNodeId, java.lang.Long childNodeId, QName assocTypeQName, QName assocQName)
NodeDaoService
deleteChildAssoc
in interface NodeDaoService
public void prependPaths(org.alfresco.util.Pair currentNodePair, org.alfresco.util.Pair currentRootNodePair, Path currentPath, java.util.Collection completedPaths, java.util.Stack assocIdStack, boolean primaryOnly) throws CyclicChildRelationshipException
Whilst walking up the hierarchy to the root, some nodes may have a root aspect. Everytime one of these is encountered, a new path is farmed off, but the method continues to walk up the hierarchy.
prependPaths
in interface NodeDaoService
currentNode
- the node to start from, i.e. the child node to work upwards fromcurrentPath
- the path from the current node to the descendent that we started fromcompletedPaths
- paths that have reached the root are added to this collectionassocStack
- the parent-child relationships traversed whilst building the path.
Used to detected cyclic relationships.primaryOnly
- true if only the primary parent association must be traversed.
If this is true, then the only root is the top level node having no parents.
CyclicChildRelationshipException
public java.util.Collection getParentAssocs(java.lang.Long childNodeId)
getParentAssocs
in interface NodeDaoService
public org.alfresco.util.Pair getPrimaryParentAssoc(java.lang.Long childNodeId)
getPrimaryParentAssoc
in interface NodeDaoService
public org.alfresco.util.Pair newNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, QName assocTypeQName)
newNodeAssoc
in interface NodeDaoService
NodeAssoc
public java.util.Collection getNodeAssocsToAndFrom(java.lang.Long nodeId)
getNodeAssocsToAndFrom
in interface NodeDaoService
public org.alfresco.util.Pair getNodeAssoc(java.lang.Long sourceNodeId, java.lang.Long targetNodeId, QName assocTypeQName)
getNodeAssoc
in interface NodeDaoService
public AssociationRef getNodeAssocOrNull(java.lang.Long assocId)
NodeDaoService
getNodeAssocOrNull
in interface NodeDaoService
assocId
- the association id
null
if it does not existpublic java.util.Collection getTargetNodeAssocs(java.lang.Long sourceNodeId)
getTargetNodeAssocs
in interface NodeDaoService
public java.util.Collection getSourceNodeAssocs(java.lang.Long targetNodeId)
getSourceNodeAssocs
in interface NodeDaoService
public void deleteNodeAssoc(java.lang.Long assocId)
deleteNodeAssoc
in interface NodeDaoService
public void getPropertyValuesByPropertyAndValue(StoreRef storeRef, QName propertyQName, java.lang.String value, NodeDaoService.NodePropertyHandler handler)
NodeDaoService
getPropertyValuesByPropertyAndValue
in interface NodeDaoService
storeRef
- the store to search inpropertyQName
- the qualified name of the propertyvalue
- the string value to matchhandler
- the callback to use while iterating over the URLspublic void getContentUrlsForStore(StoreRef storeRef, NodeDaoService.ObjectArrayQueryCallback resultsCallback)
NodeDaoService
getContentUrlsForStore
in interface NodeDaoService
storeRef
- the store to search inpublic void getUsersWithoutUsageProp(StoreRef storeRef, NodeDaoService.ObjectArrayQueryCallback resultsCallback)
NodeDaoService
getUsersWithoutUsageProp
in interface NodeDaoService
storeRef
- the store to search inpublic void getUsersWithoutUsage(StoreRef storeRef, NodeDaoService.ObjectArrayQueryCallback resultsCallback)
NodeDaoService
getUsersWithoutUsage
in interface NodeDaoService
storeRef
- the store to search inpublic void getUsersWithUsage(StoreRef storeRef, NodeDaoService.ObjectArrayQueryCallback resultsCallback)
NodeDaoService
getUsersWithUsage
in interface NodeDaoService
storeRef
- the store to search inpublic void getPropertyValuesByActualType(DataTypeDefinition actualDataTypeDefinition, NodeDaoService.NodePropertyHandler handler)
NodeDaoService
getPropertyValuesByActualType
in interface NodeDaoService
actualDataTypeDefinition
- the persisted type to retrievehandler
- the callback to use while iterating over the URLspublic void getNodesDeletedInOldTxns(java.lang.Long minNodeId, long maxCommitTime, int count, NodeDaoService.NodeRefQueryCallback resultsCallback)
NodeDaoService
getNodesDeletedInOldTxns
in interface NodeDaoService
minNodeId
- the minimum node IDmaxCommitTime
- the maximum commit time (to set a minimum transaction age)count
- the maximum number of results (for batching)resultsCallback
- the callback to pass results backpublic Transaction getTxnById(long txnId)
NodeDaoService
getTxnById
in interface NodeDaoService
txnId
- the unique transaction ID.
public java.lang.Long getMinTxnCommitTime()
getMinTxnCommitTime
in interface NodeDaoService
public java.lang.Long getMaxTxnCommitTime()
getMaxTxnCommitTime
in interface NodeDaoService
public java.lang.Long getMaxTxnIdByCommitTime(long maxCommitTime)
NodeDaoService
getMaxTxnIdByCommitTime
in interface NodeDaoService
maxCommitTime
- the max commit time (ms)
public java.util.List getTxnsByMinCommitTime(java.util.List includeTxnIds)
NodeDaoService
getTxnsByMinCommitTime
in interface NodeDaoService
includeTxnIds
- a list of transaction IDs to search for
public int getTxnUpdateCount(long txnId)
getTxnUpdateCount
in interface NodeDaoService
public int getTxnDeleteCount(long txnId)
getTxnDeleteCount
in interface NodeDaoService
public int getTransactionCount()
getTransactionCount
in interface NodeDaoService
public java.util.List getTxnsByCommitTimeAscending(long fromTimeInclusive, long toTimeExclusive, int count, java.util.List excludeTxnIds, boolean remoteOnly)
NodeDaoService
getTxnsByCommitTimeAscending
in interface NodeDaoService
excludeTxnIds
- a list of txn IDs to ignore. null is allowed.remoteOnly
- true if locally-written transactions must be ignoredpublic java.util.List getTxnsByCommitTimeDescending(long fromTimeInclusive, long toTimeExclusive, int count, java.util.List excludeTxnIds, boolean remoteOnly)
NodeDaoService
getTxnsByCommitTimeDescending
in interface NodeDaoService
excludeTxnIds
- a list of txn IDs to ignore. null is allowed.remoteOnly
- true if locally-written transactions must be ignoredpublic java.util.List getTxnChangesForStore(StoreRef storeRef, long txnId)
getTxnChangesForStore
in interface NodeDaoService
public java.util.List getTxnChanges(long txnId)
getTxnChanges
in interface NodeDaoService
public java.util.List getTxnsUnused(java.lang.Long minTxnId, long maxCommitTime, int count)
getTxnsUnused
in interface NodeDaoService
public void purgeTxn(java.lang.Long txnId)
purgeTxn
in interface NodeDaoService
public static java.util.Map convertToPersistentProperties(java.util.Map in, QNameDAO qnameDAO, LocaleDAO localeDAO, ContentDataDAO contentDataDAO, DictionaryService dictionaryService)
public static java.io.Serializable getPublicProperty(java.util.Map propertyValues, QName propertyQName, QNameDAO qnameDAO, LocaleDAO localeDAO, ContentDataDAO contentDataDAO, DictionaryService dictionaryService)
public static java.util.Map convertToPublicProperties(java.util.Map propertyValues, QNameDAO qnameDAO, LocaleDAO localeDAO, ContentDataDAO contentDataDAO, DictionaryService dictionaryService)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |