Transaction stateTransaction = new Transaction()
{
@Override
public void execute(SqlJetDb database) throws SqlJetException
{
ISqlJetSchema schema = database.getSchema();
if (schema.getTable(STATE_TABLE) == null)
{
database.createTable(CREATE_STATE_SQL);
}
else if (Boolean.getBoolean(StateManager.CLEAR_LOCAL_STATE))
{
database.getTable(STATE_TABLE).clear();
}
}
};
Transaction invocationTransaction = new Transaction()
{
@Override
public void execute(SqlJetDb database) throws SqlJetException
{
ISqlJetSchema schema = database.getSchema();
if (schema.getTable(INVOCATION_TABLE) == null)
{
database.createTable(CREATE_INVOCATION_SQL);
}
if (schema.getTable(INVOKER_TABLE) == null)
{
database.createTable(CREATE_INVOKER_SQL);
database.createIndex(CREATE_INVOKER_INDEX);
}
}