/** * Delete a Contents by id, cascading * * @param id * id * @return deleted count * @throws SQLException * upon deletion error */ public int deleteByIdCascade(String id) throws SQLException { return deleteByIdCascade(id, false); }
/** * Delete the Contents with the provided ids, cascading optionally including * the user table * * @param idCollection * id collection * @param userTable * true if a user table * @return deleted count * @throws SQLException * upon deletion error */ public int deleteIdsCascade(Collection<String> idCollection, boolean userTable) throws SQLException { int count = 0; if (idCollection != null) { for (String id : idCollection) { count += deleteByIdCascade(id, userTable); } } return count; }
/** * Delete the table * * @param table * table name */ public void deleteTable(String table) { try { deleteByIdCascade(table, true); } catch (SQLException e) { throw new GeoPackageException("Failed to delete table: " + table, e); } }