org.alfresco.repo.avm
Interface AVMNodeDAO


public interface AVMNodeDAO

DAO for AVMNodes interface.


Nested Class Summary
static interface AVMNodeDAO.ContentUrlHandler
          A callback handler for iterating over the content URLs
 
Method Summary
 void clear()
          Clear the hibernate session cache.
 void clearNewInStore(AVMStore store)
          Clear newInStore field for a store.
 void delete(AVMNode node)
          Delete a single node.
 void evict(AVMNode node)
          Evict an AVMNode that is no longer going to be used.
 void flush()
          Inappropriate hack to get Hibernate to play nice.
 AVMNode getAncestor(AVMNode node)
          Get the ancestor of a node.
 DirectoryNode getAVMStoreRoot(AVMStore store, int version)
          Get the root of a particular version.
 AVMNode getByID(long id)
          Get by ID.
 void getContentUrls(AVMNodeDAO.ContentUrlHandler handler)
          Get all content urls in the AVM Repository.
 java.util.List getEmptyGUIDS(int count)
          Get a batch
 AVMNode getMergedFrom(AVMNode node)
          Get the node the given node was merged from.
 java.util.List getNewInStore(AVMStore store)
          Get all the nodes that are new in the given store.
 java.util.List getNewInStoreIDs(AVMStore store)
          Get the id's of all AVMNodes new in a given store.
 java.util.List getNewLayeredInStoreIDs(AVMStore store)
          Get any new layered entries in a store.
 java.util.List getNullVersionLayeredDirectories(int count)
          Get a batch of LayeredDirectories which have null indirectionVersions.
 java.util.List getNullVersionLayeredFiles(int count)
          Get a batch of LayeredFiles which have null indirectionVersions.
 java.util.List getOrphans(int batchSize)
          Get up to batchSize orphans.
 void noCache()
          Turn off 2nd level caching.
 void save(AVMNode node)
          Save the given node, having never been saved before.
 void update(AVMNode node)
          Update a node that has been dirtied.
 void yesCache()
          Turn on 2nd level caching.
 

Method Detail

save

void save(AVMNode node)
Save the given node, having never been saved before.


delete

void delete(AVMNode node)
Delete a single node.

Parameters:
node - The node to delete.

getByID

AVMNode getByID(long id)
Get by ID.

Parameters:
id - The id to get.

getAVMStoreRoot

DirectoryNode getAVMStoreRoot(AVMStore store,
                              int version)
Get the root of a particular version.

Parameters:
store - The store we're querying.
version - The version.
Returns:
The VersionRoot or null.

update

void update(AVMNode node)
Update a node that has been dirtied.

Parameters:
node - The node.

getAncestor

AVMNode getAncestor(AVMNode node)
Get the ancestor of a node.

Parameters:
node - The node whose ancestor is desired.
Returns:
The ancestor or null.

getMergedFrom

AVMNode getMergedFrom(AVMNode node)
Get the node the given node was merged from.

Parameters:
node - The node whose merged from is desired.
Returns:
The merged from node or null.

getOrphans

java.util.List getOrphans(int batchSize)
Get up to batchSize orphans.

Parameters:
batchSize - Get no more than this number.
Returns:
A List of orphaned AVMNodes.

getContentUrls

void getContentUrls(AVMNodeDAO.ContentUrlHandler handler)
Get all content urls in the AVM Repository.

Parameters:
contentUrlHandler - the handler that will be called with the URLs

getNewInStore

java.util.List getNewInStore(AVMStore store)
Get all the nodes that are new in the given store.

Parameters:
store - The store to query.
Returns:
A List of AVMNodes.

getNewInStoreIDs

java.util.List getNewInStoreIDs(AVMStore store)
Get the id's of all AVMNodes new in a given store.

Parameters:
store -
Returns:

clearNewInStore

void clearNewInStore(AVMStore store)
Clear newInStore field for a store. (Snapshot)

Parameters:
store -

getNewLayeredInStoreIDs

java.util.List getNewLayeredInStoreIDs(AVMStore store)
Get any new layered entries in a store.

Parameters:
store -
Returns:

flush

void flush()
Inappropriate hack to get Hibernate to play nice.


getEmptyGUIDS

java.util.List getEmptyGUIDS(int count)
Get a batch

Returns:
An iterator over all nodes.

getNullVersionLayeredDirectories

java.util.List getNullVersionLayeredDirectories(int count)
Get a batch of LayeredDirectories which have null indirectionVersions.

Parameters:
count -
Returns:

getNullVersionLayeredFiles

java.util.List getNullVersionLayeredFiles(int count)
Get a batch of LayeredFiles which have null indirectionVersions.

Parameters:
count -
Returns:

evict

void evict(AVMNode node)
Evict an AVMNode that is no longer going to be used.

Parameters:
node -

clear

void clear()
Clear the hibernate session cache.


noCache

void noCache()
Turn off 2nd level caching.


yesCache

void yesCache()
Turn on 2nd level caching.



Copyright © 2005 - 2008 Alfresco Software, Inc. All Rights Reserved.