/[projects]/android/MarketStats/src/dk/thoerup/marketstats/CommentCallback.java
ViewVC logotype

Contents of /android/MarketStats/src/dk/thoerup/marketstats/CommentCallback.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 950 - (show annotations) (download)
Mon Jul 5 08:18:02 2010 UTC (13 years, 10 months ago) by torben
File size: 1079 byte(s)
refactor to jsp views
1 package dk.thoerup.marketstats;
2
3 import java.util.List;
4
5 import com.gc.android.market.api.MarketSession.Callback;
6 import com.gc.android.market.api.model.Market.Comment;
7 import com.gc.android.market.api.model.Market.CommentsResponse;
8 import com.gc.android.market.api.model.Market.ResponseContext;
9
10 public class CommentCallback implements Callback<CommentsResponse>{
11 private List<CommentBean> commentBeans;
12
13 private int entryCount;
14
15 public void setList(List<CommentBean> cl) {
16 commentBeans = cl;
17 }
18
19 public int getEntryCount() {
20 return entryCount;
21 }
22
23
24 @Override
25 public void onResult(ResponseContext context, CommentsResponse response) {
26 //System.out.println("Response : " + response);
27 entryCount = response.getEntriesCount();
28
29 //System.out.println("Count="+entryCount);
30
31 List<Comment> cl = response.getCommentsList();
32 for (Comment c : cl) {
33 CommentBean bean = new CommentBean();
34 bean.author = c.getAuthorName();
35 bean.rating = c.getRating();
36 bean.time = c.getCreationTime();
37 bean.text = c.getText();
38 commentBeans.add(bean);
39 }
40
41 }
42 }

  ViewVC Help
Powered by ViewVC 1.1.20