View Javadoc
1   package com.zone.weixin4j.qy.chat;
2   
3   import javax.xml.bind.annotation.XmlElement;
4   import javax.xml.bind.annotation.XmlTransient;
5   import java.io.Serializable;
6   
7   /**
8    * 接收人
9    * 
10   * @className ChatReceiver
11   * @author jinyu(foxinmy@gmail.com)
12   * @date 2015年8月1日
13   * @since JDK 1.6
14   * @see
15   */
16  public class ChatReceiver implements Serializable {
17  
18  	private static final long serialVersionUID = -3870813624685620828L;
19  	/**
20  	 * 成员id|会话id
21  	 */
22  	@XmlElement(name = "id")
23  	private String targetId;
24  	/**
25  	 * 群聊|单聊|userid|openid
26  	 */
27  	@XmlElement(name = "type")
28  	private String chatType;
29  
30  	public String getTargetId() {
31  		return targetId;
32  	}
33  
34  	public String getChatType() {
35  		return chatType;
36  	}
37  
38  	@XmlTransient
39  	public ChatType getFormatChatType() {
40  		return ChatType.valueOf(chatType);
41  	}
42  
43  	@Override
44  	public String toString() {
45  		return "ChatReceiver [targetId=" + targetId + ", chatType=" + chatType
46  				+ "]";
47  	}
48  
49  }