public class CollectionMongoServerImpl extends Object implements MongoServer, CollectionMongoServer
| Constructor and Description |
|---|
CollectionMongoServerImpl() |
CollectionMongoServerImpl(com.google.code.morphia.Datastore datastore) |
CollectionMongoServerImpl(com.mongodb.Mongo mongoServer,
String databaseName)
Constructor for the CollectionMongoServer to ensure that everything has
been set upon initialization
|
CollectionMongoServerImpl(com.mongodb.Mongo mongoServer,
String databaseName,
String username,
String password) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection to the Mongo server
|
String |
findNewCollectionId(String oldCollectionId)
Retrieve the new CollectionId based on the old CollectionID.
|
String |
findOldCollectionId(String newCollectionId)
Retrieve the old CollectionId based on the new CollectionID.
|
com.google.code.morphia.Datastore |
getDatastore()
Return the datastore.
|
List<Collection> |
retrieveAllCollections()
Retrieve all stored collections
|
void |
saveCollection(Collection collection)
Save a Collection
|
void |
setDatastore(com.google.code.morphia.Datastore datastore) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoStringpublic CollectionMongoServerImpl(com.mongodb.Mongo mongoServer,
String databaseName)
mongoServer - The Mongo Server to connect todatabaseName - The database to connect topublic CollectionMongoServerImpl(com.google.code.morphia.Datastore datastore)
public CollectionMongoServerImpl(com.mongodb.Mongo mongoServer,
String databaseName,
String username,
String password)
public CollectionMongoServerImpl()
public com.google.code.morphia.Datastore getDatastore()
getDatastore in interface MongoServerpublic void close()
close in interface MongoServerpublic String findNewCollectionId(String oldCollectionId)
CollectionMongoServerfindNewCollectionId in interface CollectionMongoServeroldCollectionId - The old Collection IDpublic String findOldCollectionId(String newCollectionId)
CollectionMongoServerfindOldCollectionId in interface CollectionMongoServerpublic void saveCollection(Collection collection)
CollectionMongoServersaveCollection in interface CollectionMongoServercollection - The collection to savepublic List<Collection> retrieveAllCollections()
CollectionMongoServerretrieveAllCollections in interface CollectionMongoServerpublic void setDatastore(com.google.code.morphia.Datastore datastore)
setDatastore in interface CollectionMongoServerCopyright © 2015 Europeana Foundation. All rights reserved.