|
@ -1,27 +1,22 @@ |
|
|
package gr.thmmy.mthmmy.model; |
|
|
package gr.thmmy.mthmmy.model; |
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
import java.util.HashMap; |
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
public class RecentItem { |
|
|
public class RecentItem { |
|
|
private int boardId, postId, topicId, posterId; |
|
|
private int boardId, postId, topicId, posterId; |
|
|
private String boardTitle, topicTitle, poster; |
|
|
private String boardTitle, topicTitle, poster; |
|
|
private Date timestamp; |
|
|
private Date timestamp; |
|
|
|
|
|
|
|
|
public RecentItem(int boardId, String boardTitle, int postId, String poster, int posterId, int timestamp, |
|
|
public RecentItem(Map<String, Object> map) { |
|
|
int topicId, String topicTitle) { |
|
|
this.boardId = ((Long) map.get("boardId")).intValue(); |
|
|
this.boardId = boardId; |
|
|
this.postId = ((Long) map.get("postId")).intValue(); |
|
|
this.postId = postId; |
|
|
this.poster = String.valueOf(map.get("poster")); |
|
|
this.poster = poster; |
|
|
this.posterId = ((Long) map.get("posterId")).intValue(); |
|
|
this.posterId = posterId; |
|
|
this.topicId = ((Long) map.get("topicId")).intValue(); |
|
|
this.topicId = topicId; |
|
|
this.boardTitle = String.valueOf(map.get("boardTitle")); |
|
|
this.boardTitle = boardTitle; |
|
|
this.topicTitle = String.valueOf(map.get("topicTitle")); |
|
|
this.topicTitle = topicTitle; |
|
|
this.timestamp = new Date((long)(map.get("timestamp")) * 1000); |
|
|
this.timestamp = new Date(timestamp); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public RecentItem(HashMap<String, Object> keymap) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public Date getTimestamp() { |
|
|
public Date getTimestamp() { |
|
|