protected boolean existsTable ( ) { try { int count = sqlManager . getSingleResult ( Integer . class , new StringSqlResource ( String . format ( "SELECT COUNT(*) FROM %s" , tableName ) ) ) ; if ( count == 0 ) { // TODO Should insert an initial record? return false ; } return true ; } catch ( SQLRuntimeException ex ) { return false ; } }
Checks the table which manages a schema version exists or not exists .