newOptions.setSchemaVersion(SQLJET_SCHEMA_VERSION);
newOptions.setCacheSize(SQLJET_PAGE_CACHE_SIZE);
persistenceDb.createTable(GROUP_TABLE_DDL);
persistenceDb.createTable(CUSTOMER_TABLE_DDL);
classLogger.log(Level.CONFIG, "2 tables created in a new data file {0}.", new Object[] {SqlJetDb.IN_MEMORY, persistenceDb.getSchema().getTableNames()});
ISqlJetTable groupTable = persistenceDb.getTable(GROUP_TABLE_NAME);
ISqlJetTable customerTable = persistenceDb.getTable(CUSTOMER_TABLE_NAME);
Date update = new Date();
groupTable.insert(1, update.getTime(), "ACTIVE", 0, true);
groupTable.insert(2, update.getTime(), "INACTIVE", 1, false);
customerTable.insert(1, 1, update.getTime(), "SERVING", "nobody@example.com", "ENCOM1", 0, true);
customerTable.insert(2, 1, update.getTime(), "SERVING", "nobody@example.com", "ENCOM2", 1, true);
customerTable.insert(3, 1, update.getTime(), "SERVING", "nobody@example.com", "ENCOM3", 3, true);
customerTable.insert(4, 1, update.getTime(), "SERVING", "nobody@example.com", "ENCOM4", 2, true);
}
finally
{
persistenceDb.commit();
}