@Override public void init(AbstractAddressbookManager aBooMgr){
  setAddressBookManager(aBooMgr);
  reloadSettings();
  try {
    connection=DriverManager.getConnection(IDENTITYDB_CONNECT_STRING);
  }
 catch (  SQLException e) {
    logger.error("IdentityManager: Failure to connect to db: " + IDENTITYDB_CONNECT_STRING,e);
  }
  Statement statement;
  try {
    statement=connection.createStatement();
    statement.setQueryTimeout(30);
    statement.executeUpdate("create table if not exists " + TABLE_IDENTITY + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name string, firstname string, email string, keystorePath string)");
    statement.executeUpdate("create table if not exists " + TABLE_CLOUDPROVIDER + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name string, username string, password string)");
    statement.executeUpdate("create table if not exists " + TABLE_CLOUDPROVIDER_MAP + " (identityID integer, cloudProviderID integer)");
    aBooMgr.init();
  }
 catch (  SQLException e) {
    logger.error("IdentityManager: Failure on creating tables",e);
  }
 finally {
    if (connection != null) {
      try {
        connection.close();
      }
 catch (      SQLException e) {
        logger.error("IdentityManager: Failure to close db connection while creating tables",e);
      }
    }
  }
}

@ Override public void init ( AbstractAddressbookManager aBooMgr ) { setAddressBookManager ( aBooMgr ) ; reloadSettings ( ) ; try { connection = DriverManager . getConnection ( IDENTITYDB_CONNECT_STRING ) ; } catch ( SQLException e ) { logger . error ( "IdentityManager: Failure to connect to db: " + IDENTITYDB_CONNECT_STRING , e ) ; } Statement statement ; try { statement = connection . createStatement ( ) ; statement . setQueryTimeout ( 30 ) ; statement . executeUpdate ( "create table if not exists " + TABLE_IDENTITY + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name string, firstname string, email string, keystorePath string)" ) ; statement . executeUpdate ( "create table if not exists " + TABLE_CLOUDPROVIDER + " (id INTEGER PRIMARY KEY AUTOINCREMENT, name string, username string, password string)" ) ; statement . executeUpdate ( "create table if not exists " + TABLE_CLOUDPROVIDER_MAP + " (identityID integer, cloudProviderID integer)" ) ; aBooMgr . init ( ) ; } catch ( SQLException e ) { logger . error ( "IdentityManager: Failure on creating tables" , e ) ; } finally { if ( connection != null ) { try { connection . close ( ) ; } catch ( SQLException e ) { logger . error ( "IdentityManager: Failure to close db connection while creating tables" , e ) ; } } } }
creates the initial set of db tables for the sqlite db to store our identity and addressbook entries
