Initializing the Store

Before initializing the Store, you first need a Store object to initialize. You can create one from scratch using its no-arg constructor, or you can simply use the singleton instance provided via Store's public SINGLETON field (so you don't need to hang on to a reference throughout your application). For applications that only use one Store (which should be the vast majority of applications), the SINGLETON is the way to go.

Whichever way you obain your Store, simply initialize via its init(File storeDirectory). The storeDirectory is the directory containing your .schema file(s). This will create all of the Tables defined in the .schema files and load all Records for each Table from disk. If anything goes wrong (corrupted data, invalid schema, IO error, etc.) a TrivialPersistException will be thrown.