com.mongodb
Class DBApiLayer
java.lang.Object
com.mongodb.DB
com.mongodb.DBApiLayer
public class DBApiLayer
- extends DB
Database API
This cannot be directly instantiated, but the functions are available
through instances of Mongo.
Methods inherited from class com.mongodb.DB |
addUser, authenticate, collectionExists, command, command, createCollection, doEval, dropDatabase, eval, forceError, getCollection, getCollectionFromString, getCollectionNames, getLastError, getName, getPreviousError, getWriteConcern, resetError, resetIndexCache, setReadOnly, setWriteConcern, toString |
DBApiLayer
protected DBApiLayer(String root,
DBConnector connector)
requestStart
public void requestStart()
- Specified by:
requestStart
in class DB
requestDone
public void requestDone()
- Specified by:
requestDone
in class DB
requestEnsureConnection
public void requestEnsureConnection()
- Specified by:
requestEnsureConnection
in class DB
doGetCollection
protected com.mongodb.DBApiLayer.MyCollection doGetCollection(String name)
- Specified by:
doGetCollection
in class DB
getCollectionFromFull
public DBCollection getCollectionFromFull(String fullNameSpace)
- Get a collection from a <databaseName>.<collectionName>.
If
fullNameSpace
does not contain any "."s, this will
find a collection called fullNameSpace
and return it.
Otherwise, it will find the collecton collectionName
and
return it.
- Specified by:
getCollectionFromFull
in class DB
- Parameters:
fullNameSpace
- the full name to find
- Returns:
- the collection
- Throws:
RuntimeException
- if the database named is not this database
getSisterDB
public DB getSisterDB(String dbName)
- Specified by:
getSisterDB
in class DB