public static < T , ID > int dropTable ( Dao < T , ID > dao , boolean ignoreErrors ) throws SQLException { ConnectionSource connectionSource = dao . getConnectionSource ( ) ; Class < T > dataClass = dao . getDataClass ( ) ; DatabaseType databaseType = connectionSource . getDatabaseType ( ) ; if ( dao instanceof BaseDaoImpl < ? , ? > ) { return doDropTable ( databaseType , connectionSource , ( ( BaseDaoImpl < ? , ? > ) dao ) . getTableInfo ( ) , ignoreErrors ) ; } else { TableInfo < T , ID > tableInfo = new TableInfo < T , ID > ( databaseType , dataClass ) ; return doDropTable ( databaseType , connectionSource , tableInfo , ignoreErrors ) ; } }
Issue the database statements to drop the table associated with a dao .