From c20de9fbd29378f40128e9ea7e057f3437ee7d0f Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sun, 11 Apr 2010 21:50:47 +0200 Subject: [PATCH] Database: Removed getChannels(), Moved getChannelsById() -> getChannelsByServerId() --- src/org/yaaic/db/Database.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/org/yaaic/db/Database.java b/src/org/yaaic/db/Database.java index 2a55ef5..a1b63f6 100644 --- a/src/org/yaaic/db/Database.java +++ b/src/org/yaaic/db/Database.java @@ -308,12 +308,14 @@ public class Database extends SQLiteOpenHelper } /** - * Get all channels + * Get all (auto-join) channels of a server * * @return */ - public Cursor getChannels() + public Cursor getChannels(int serverId) { + // XXX: Should no return a cursor but the populated objects + return this.getReadableDatabase().query( ChannelConstants.TABLE_NAME, ChannelConstants.ALL, @@ -331,8 +333,10 @@ public class Database extends SQLiteOpenHelper * @param server Unique id of server * @return */ - public Cursor getChannelsById(int serverId) + public Cursor getChannelsByServerId(int serverId) { + // XXX: Should no return a cursor but the populated objects + return this.getReadableDatabase().query( ChannelConstants.TABLE_NAME, ChannelConstants.ALL,