org.outerj.daisy.repository
Interface DocumentCollection


public interface DocumentCollection

A collection of documents in the repository. This interface is called DocumentCollection to avoid a name collision with the often-used Collection interface from the Java API.

Using Document.getCollections(), you can retrieve the collections to which a document belongs. To get a list of all documents belonging to a collection, peform a query using the QueryManager.

Creating and deleting collection is done using the CollectionManager which can be obtained using Repository.getCollectionManager().


Method Summary
 long getId()
          Returns the ID of this collection.
 java.util.Date getLastModified()
          Gets the date when this collection was last saved.
 long getLastModifier()
          Get the id of the user that last modified this collection.
 java.lang.String getName()
          Returns the name of this collection.
 long getUpdateCount()
           
 org.outerx.daisy.x10.CollectionDocument getXml()
          Get an XML document describing this collection.
 void save()
          Stores the modified collection.
 void setName(java.lang.String name)
          Sets the name of this collection.
 

Method Detail

getId

long getId()
Returns the ID of this collection. For newly created collections, this method returns -1 until save() is called.


getName

java.lang.String getName()
Returns the name of this collection.


setName

void setName(java.lang.String name)
Sets the name of this collection.


save

void save()
          throws RepositoryException
Stores the modified collection.

Throws:
RepositoryException

getXml

org.outerx.daisy.x10.CollectionDocument getXml()
Get an XML document describing this collection.


getLastModified

java.util.Date getLastModified()
Gets the date when this collection was last saved. This does NOT include the adding or removing of documents to the collection.


getLastModifier

long getLastModifier()
Get the id of the user that last modified this collection.


getUpdateCount

long getUpdateCount()


Copyright © -2012 . All Rights Reserved.