package com.wechat.dao;

import java.util.ArrayList;

import org.springframework.stereotype.Repository;

import com.wechat.global.base.dao.RedisGeneratorDao;
import com.wechat.model.requestDto.TrendCommentInfo;

/**
 * 个人动态 好友评论信息 缓存类
 * LVRes 中 label 标识评论者姓名; value 标识被评论的动态id;
 * redis中key 存放动态发布者的
 * @author tangwc
 */
@Repository
public class TrendCommentInfoRedisDao extends RedisGeneratorDao<String, ArrayList<TrendCommentInfo>>  {
	private String tableKey = "TrendCommentInfoRedis";

    public ArrayList<TrendCommentInfo> selectMessageInfo(String infoKey) {
        return selectOne(tableKey, infoKey);
    }

    public void updateMessageInfo(String infoKey, ArrayList<TrendCommentInfo> infoValue) {
        update(tableKey, infoKey, infoValue);
    }

    public void insertMessageInfo(String infoKey, ArrayList<TrendCommentInfo> infoValue) {
        insert(tableKey, infoKey, infoValue);
    }

    public void deleteMessageInfo(String infoKey) {
        delete(tableKey, infoKey);
    }
}
