|
|
@ -76,11 +76,8 @@ public class HistoryDatabaseHandler extends SQLiteOpenHelper { |
|
|
|
* All CRUD(Create, Read, Update, Delete) Operations |
|
|
|
* All CRUD(Create, Read, Update, Delete) Operations |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
public synchronized void delete(String url) { |
|
|
|
public synchronized void deleteHistoryItem(String url) { |
|
|
|
String n = getHistoryItem(url); |
|
|
|
mDatabase.delete(TABLE_HISTORY, KEY_URL + " = ?", new String[] { url }); |
|
|
|
if (n != null) { |
|
|
|
|
|
|
|
deleteHistoryItem(n); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public synchronized void visitHistoryItem(String url, String title) { |
|
|
|
public synchronized void visitHistoryItem(String url, String title) { |
|
|
@ -193,11 +190,6 @@ public class HistoryDatabaseHandler extends SQLiteOpenHelper { |
|
|
|
return n; |
|
|
|
return n; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Deleting single item
|
|
|
|
|
|
|
|
public synchronized void deleteHistoryItem(String id) { |
|
|
|
|
|
|
|
mDatabase.delete(TABLE_HISTORY, KEY_ID + " = ?", new String[] { String.valueOf(id) }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Getting items Count
|
|
|
|
// Getting items Count
|
|
|
|
public int getHistoryItemsCount() { |
|
|
|
public int getHistoryItemsCount() { |
|
|
|
String countQuery = "SELECT * FROM " + TABLE_HISTORY; |
|
|
|
String countQuery = "SELECT * FROM " + TABLE_HISTORY; |
|
|
|