diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-01-25 19:33:12 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-01-25 19:33:12 +0100 |
commit | 665ef7511f5dcccb349228baa2aa6f02281d3c07 (patch) | |
tree | 461ffa268dc16b299c68e764a3ae55ad912075c4 /src/de/gultsch/chat/ConversationCursor.java | |
parent | df9dcb1060d44a719e2892446b62cde884a880cf (diff) |
all access to the persistance layer is now done via the new xmppservice
Diffstat (limited to '')
-rw-r--r-- | src/de/gultsch/chat/ConversationCursor.java | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/src/de/gultsch/chat/ConversationCursor.java b/src/de/gultsch/chat/ConversationCursor.java deleted file mode 100644 index 5ab3ef56..00000000 --- a/src/de/gultsch/chat/ConversationCursor.java +++ /dev/null @@ -1,97 +0,0 @@ -package de.gultsch.chat; - - -import java.util.ArrayList; - -import de.gultsch.chat.entities.Conversation; -import de.gultsch.chat.entities.Message; - - -import android.database.AbstractCursor; - -public class ConversationCursor extends AbstractCursor { - - - protected ConversationList conversations; - - public static final String NAME = "conversationname"; - public static final String LAST_MSG = "lastmsg"; - public static final String DATE = "date"; - public static final String ID = "_id"; - - public ConversationCursor(ConversationList list) { - super(); - this.conversations = list; - } - - public ArrayList<Conversation> getConversationOverview() { - return this.conversations; - } - - public void setConversationOverview(ConversationList list) { - this.conversations = list; - } - - @Override - public String[] getColumnNames() { - return new String[]{ID,NAME,LAST_MSG,DATE}; - } - - @Override - public int getCount() { - return conversations.size(); - } - - @Override - public double getDouble(int column) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public float getFloat(int column) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public int getInt(int column) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public long getLong(int column) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public short getShort(int column) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public String getString(int column) { - Conversation conversation = conversations.get(getPosition()); - Message lastMessage = conversation.getLastMessages(1,0).get(0); - switch (column) { - case 1: - return conversation.getName(); - case 2: - return lastMessage.toString(); - case 3: - return lastMessage.getTimeReadable(); - default: - return null; - } - } - - @Override - public boolean isNull(int column) { - // TODO Auto-generated method stub - return false; - } - -}
\ No newline at end of file |