org.mycore.backend.hibernate
Class MCRHIBFileMetadataStore

java.lang.Object
  extended by org.mycore.backend.hibernate.MCRHIBFileMetadataStore
All Implemented Interfaces:
MCRFileMetadataStore

public class MCRHIBFileMetadataStore
extends Object
implements MCRFileMetadataStore

This class implements the MCRFileMetadataStore.


Field Summary
(package private) static Logger logger
           
protected  String table
           
 
Constructor Summary
MCRHIBFileMetadataStore()
           
 
Method Summary
 MCRFilesystemNode buildNode(MCRFSNODES node)
           
 void deleteNode(String ID)
          Deletes all data of a given MCRFilesystemNode in the persistent metadata store.
 MCRFilesystemNode retrieveChild(String parentID, String name)
          Retrieves a child node of an MCRDirectory from the persistent store.
 Vector<String> retrieveChildrenIDs(String parentID)
          Returns a list of the IDs of all children of a given parent MCRDirectory.
 MCRFilesystemNode retrieveNode(String ID)
          Retrieves the MCRFilesystemNode with that ID from the persistent store.
 String retrieveRootNodeID(String ownerID)
          Retrieves the root MCRFilesystemNode that has no parent and is owned by the object with the given owner ID.
 void storeNode(MCRFilesystemNode node)
          Creates or updates the data of the given node in the persistent store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected String table

logger

static Logger logger
Constructor Detail

MCRHIBFileMetadataStore

public MCRHIBFileMetadataStore()
                        throws MCRPersistenceException
Throws:
MCRPersistenceException
Method Detail

storeNode

public void storeNode(MCRFilesystemNode node)
               throws MCRPersistenceException
Description copied from interface: MCRFileMetadataStore
Creates or updates the data of the given node in the persistent store.

Specified by:
storeNode in interface MCRFileMetadataStore
Parameters:
node - the MCRFilesystemNode to be stored
Throws:
MCRPersistenceException

retrieveRootNodeID

public String retrieveRootNodeID(String ownerID)
                          throws MCRPersistenceException
Description copied from interface: MCRFileMetadataStore
Retrieves the root MCRFilesystemNode that has no parent and is owned by the object with the given owner ID.

Specified by:
retrieveRootNodeID in interface MCRFileMetadataStore
Parameters:
ownerID - the ID of the owner of the root node.
Returns:
an MCRFilesystemNode that has no parent and this owner ID, or null if no such node exists
Throws:
MCRPersistenceException

retrieveChild

public MCRFilesystemNode retrieveChild(String parentID,
                                       String name)
Description copied from interface: MCRFileMetadataStore
Retrieves a child node of an MCRDirectory from the persistent store.

Specified by:
retrieveChild in interface MCRFileMetadataStore
Parameters:
parentID - the unique ID of the parent MCRDirectory
name - the filename of the child node in that directory
Returns:
the child MCRFilesystemNode, or null if no such node exists

retrieveChildrenIDs

public Vector<String> retrieveChildrenIDs(String parentID)
                                   throws MCRPersistenceException
Description copied from interface: MCRFileMetadataStore
Returns a list of the IDs of all children of a given parent MCRDirectory.

Specified by:
retrieveChildrenIDs in interface MCRFileMetadataStore
Parameters:
parentID - the ID of the parent MCRDirectory
Returns:
a Vector of String objects that are the IDs of all child nodes in that directory
Throws:
MCRPersistenceException

deleteNode

public void deleteNode(String ID)
                throws MCRPersistenceException
Description copied from interface: MCRFileMetadataStore
Deletes all data of a given MCRFilesystemNode in the persistent metadata store.

Specified by:
deleteNode in interface MCRFileMetadataStore
Parameters:
ID - the unique ID of the MCRFilesystemNode to delete
Throws:
MCRPersistenceException

retrieveNode

public MCRFilesystemNode retrieveNode(String ID)
                               throws MCRPersistenceException
Description copied from interface: MCRFileMetadataStore
Retrieves the MCRFilesystemNode with that ID from the persistent store.

Specified by:
retrieveNode in interface MCRFileMetadataStore
Parameters:
ID - the unique ID of the MCRFilesystemNode
Returns:
the node with that ID, or null if no such node exists
Throws:
MCRPersistenceException

buildNode

public MCRFilesystemNode buildNode(MCRFSNODES node)