Loading Data
This is the manual for older MicroStream versions (Version < 5.0).
The new documentation (Version >= 5.0) is located at:
Loading data can be done in two ways, eager and Lazy. The basic, default way of loading is eager loading. This means that all objects of a stored object graph are loaded immediately. This is done during startup of the MicroStream database instance automatically if an already existing database is found.
To load your data you just need to create an
EmbeddedStorageManager
instance:EmbeddedStorageManager storage = EmbeddedStorage.start();
After that just get the root instance of your object graph from the
StorageManager
by calling EmbeddedStorageManager.root()
and check for null
as this indicates a non-existing databasefinal EmbeddedStorageManager storage = EmbeddedStorage.start();
if(storage.root() == null)
{
//No existing Database found
}
else
{
MyRoot root = (MyRoot) storage.root();
}
Last modified 1yr ago