|
dbXML API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dbxml.db.core.CollectionManager
com.dbxml.db.core.Collection
Collection represents a collection of Documents. It maintains links to the filer storage implementation, the indexes, and any extensions or triggers that may be associated with the collection. The Collection class is the focal point of the direct API. Nearly all methods for accessing and managing documents, indexes, triggers, and extensions can be found in this class.
Field Summary | |
static int |
TYPE_DOCUMENTS
|
static int |
TYPE_RECORDS
|
Constructor Summary | |
Collection(Collection collection)
|
Method Summary | |
Collection |
createCollection(java.lang.String path,
Configuration config)
createCollection creates a new Collection object and any associated system resources that the Collection will need. |
Key |
createNewOID()
createNewOID allocates a new Object ID to be used as a Key in the Collection. |
void |
dispose()
dispose closes the Collection's associated Filer and Indexes. |
boolean |
drop()
|
boolean |
dropCollection(Collection collection)
dropCollection physically removes the specified Collection and any associated system resources that the Collection uses. |
void |
flushSymbolTable()
|
java.lang.String |
getCanonicalDocumentName(Key key)
getCanonicalDocumentName returns the canonical name for the specified Key in relation to this Collection. |
java.lang.String |
getCanonicalName()
getCanonicalName returns the canonical name for this Object. |
java.io.File |
getCollectionRoot()
|
int |
getCollectionType()
getCollectionType returns the Collection type. |
Container |
getContainer(Transaction tx,
java.lang.Object docKey)
getContainer retrieves a Container from the Collection. |
ContainerSet |
getContainerSet(Transaction tx)
getContainerSet returns the set of Documents being maintained by this Collection. |
Database |
getDatabase()
getDatabase retrieves the Database that is associated with this CollectionManager. |
DocumentTable |
getDocument(Transaction tx,
java.lang.Object docKey)
getDocument retrieves a Document by Key. |
ExtensionManager |
getExtensionManager()
getExtensionManager returns the Collection's ExtensionManager. |
IndexManager |
getIndexManager()
return the IndexManager being used by this Collection. |
long |
getKeyCount(Transaction tx)
getKeyCount returns the count of objects being maintained by this Collection. |
java.lang.String |
getName()
getName returns the name for this Object. |
Collection |
getParentCollection()
getParentCollection returns the parent Collection of this Collection. |
QueryEngine |
getQueryEngine()
getQueryEngine returns the Database's Query Engine |
Record |
getRecord(Transaction tx,
java.lang.Object recKey)
getRecord retrieves a binary Record from the Collection. |
RecordMetaData |
getRecordMetaData(Transaction tx,
java.lang.Object docKey)
getRecordMetaData returns metadata about the Record identified by the provided Key. |
SymbolTable |
getSymbols()
getSymbols returns the SymbolTable in use by this Collection. |
SystemCollection |
getSystemCollection()
getSystemCollection returns the System Collection. |
TriggerManager |
getTriggerManager()
getTriggerManager returns the Collection's TriggerManager. |
Key |
insertDocument(Transaction tx,
DocumentTable document)
insertDocument inserts a new Document into a dbXML Collection. |
Key |
insertRecord(Transaction tx,
Value value)
insertRecord stores a binary Record in the Collection and returns a newly generated Key. |
Key[] |
listKeys(Transaction tx)
listKeys returns a list of all object keys stored by this collection. |
ResultSet |
queryCollection(Transaction tx,
java.lang.String style,
java.lang.String query,
NamespaceMap nsMap)
queryCollection performs a query against the current collection using the specified style and query String. |
ResultSet |
queryDocument(Transaction tx,
java.lang.String style,
java.lang.String query,
NamespaceMap nsMap,
java.lang.Object key)
queryDocument performs a query against a single Document using the specified style, query string, and Document ID. |
void |
remove(Transaction tx,
java.lang.Object key)
remove removes an object from the Collection based on its Key, regardless of its type. |
void |
setConfig(Configuration config)
setConfig sets the configuration information for the Configurable object instance. |
void |
setDocument(Transaction tx,
java.lang.Object docKey,
DocumentTable document)
setDocument overwrites/updates an existing Document in a dbXML Collection. |
void |
setRecord(Transaction tx,
java.lang.Object recKey,
Value value)
setRecord stores a binary Record in the Collection. |
void |
setRecord(Transaction tx,
Record rec)
setValue stores a binary Record in the Collection. |
Methods inherited from class com.dbxml.db.core.CollectionManager |
getCollection, getConfig, listCollections |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.dbxml.util.Configurable |
getConfig |
Field Detail |
public static final int TYPE_DOCUMENTS
public static final int TYPE_RECORDS
Constructor Detail |
public Collection(Collection collection)
Method Detail |
public void setConfig(Configuration config) throws dbXMLException
Configurable
setConfig
in interface Configurable
setConfig
in class CollectionManager
dbXMLException
public final java.lang.String getName()
CollectionManager
getName
in class CollectionManager
public final java.io.File getCollectionRoot()
public final Collection getParentCollection() throws DBException
DBException
- If a Database Exception occurspublic final boolean dropCollection(Collection collection) throws DBException
CollectionManager
dropCollection
in class CollectionManager
collection
- The Collection to drop
DBException
- If a Database Exception occurspublic final Collection createCollection(java.lang.String path, Configuration config) throws DBException
CollectionManager
createCollection
in class CollectionManager
path
- The relative path of the Collectionconfig
- The Collection's configuration
DBException
- If a Database Exception occurspublic Database getDatabase()
CollectionManager
getDatabase
in class CollectionManager
public SystemCollection getSystemCollection() throws DBException
CollectionManager
getSystemCollection
in class CollectionManager
DBException
- If a Database Exception occurs*public QueryEngine getQueryEngine() throws DBException
DBException
- If a Database Exception occurspublic int getCollectionType()
public final IndexManager getIndexManager() throws DBException
DBException
- If a Database Exception occurspublic final ExtensionManager getExtensionManager() throws DBException
DBException
- If a Database Exception occurspublic final TriggerManager getTriggerManager() throws DBException
DBException
- If a Database Exception occurspublic final SymbolTable getSymbols() throws DBException
DBException
- If a Database Exception occurspublic final java.lang.String getCanonicalName()
CollectionManager
getCanonicalName
in class CollectionManager
public final java.lang.String getCanonicalDocumentName(Key key)
key
- The Key
public boolean drop() throws DBException
DBException
public final Key createNewOID()
public final void flushSymbolTable() throws DBException
DBException
public final Key insertDocument(Transaction tx, DocumentTable document) throws DBException
tx
- The controlling Transactiondocument
- The Document
DBException
- If a Database Exception occurspublic final void setDocument(Transaction tx, java.lang.Object docKey, DocumentTable document) throws DBException
tx
- The controlling TransactiondocKey
- The Document Keydocument
- The Document
DBException
- If a Database Exception occurspublic final void remove(Transaction tx, java.lang.Object key) throws DBException
tx
- The controlling Transactionkey
- The Object's Key
DBException
- If a Database Exception occurspublic final DocumentTable getDocument(Transaction tx, java.lang.Object docKey) throws DBException
tx
- The controlling TransactiondocKey
- The Document Key
DBException
- If a Database Exception occurspublic RecordMetaData getRecordMetaData(Transaction tx, java.lang.Object docKey) throws DBException
tx
- The controlling Transaction
DBException
public final Container getContainer(Transaction tx, java.lang.Object docKey) throws DBException
tx
- The controlling TransactiondocKey
- The Document Key
DBException
- If a Database Exception occurspublic final Record getRecord(Transaction tx, java.lang.Object recKey) throws DBException
tx
- The controlling TransactionrecKey
- The Record's Key
DBException
- If a Database Exception occurspublic final void setRecord(Transaction tx, Record rec) throws DBException
tx
- The controlling Transactionrec
- The Record to store
DBException
- If a Database Exception occurspublic final void setRecord(Transaction tx, java.lang.Object recKey, Value value) throws DBException
tx
- The controlling TransactionrecKey
- The Key to usevalue
- The Value to store
DBException
- If a Database Exception occurspublic final Key insertRecord(Transaction tx, Value value) throws DBException
tx
- The controlling Transactionvalue
- The Value to store
DBException
- If a Database Exception occurspublic final ResultSet queryCollection(Transaction tx, java.lang.String style, java.lang.String query, NamespaceMap nsMap) throws DBException
tx
- The controlling Transactionstyle
- The query style to use (ex: XPath)query
- The query to executensMap
- The namespace Map (if any)
DBException
- If a Database Exception occurspublic final ResultSet queryDocument(Transaction tx, java.lang.String style, java.lang.String query, NamespaceMap nsMap, java.lang.Object key) throws DBException
tx
- The controlling Transactionstyle
- The query style to use (ex: XPath)query
- The query to executensMap
- The namespace Map (if any)key
- The Document to query
DBException
- If a Database Exception occurspublic final ContainerSet getContainerSet(Transaction tx) throws DBException
tx
- The controlling Transaction
DBException
- If a Database Exception occurspublic final Key[] listKeys(Transaction tx) throws DBException
tx
- The controlling Transaction
DBException
- If a Database Exception occurspublic final long getKeyCount(Transaction tx) throws DBException
tx
- The controlling Transaction
DBException
- If a Database Exception occurspublic void dispose()
|
dbXML API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |