All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.foxinmy.weixin4j.qy.model.Contacts Maven / Gradle / Ivy

There is a newer version: 1.10.2
Show newest version
package com.foxinmy.weixin4j.qy.model;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 通讯录
 * 
 * @className Contacts
 * @author jinyu([email protected])
 * @date 2016年1月25日
 * @since JDK 1.6
 * @see
 */
public class Contacts extends IdParameter {

	private static final long serialVersionUID = -1334319915595303647L;

	@JSONField(name = "userlist")
	private List users;
	@JSONField(name = "partylist")
	private List partys;
	@JSONField(name = "taglist")
	private List tags;

	public List getUsers() {
		return users;
	}

	public void setUsers(List users) {
		this.users = users;
		List userIds = new ArrayList();
		for (User user : users) {
			userIds.add(user.getUserId());
		}
		super.setUserIds(userIds);
	}

	public List getPartys() {
		return partys;
	}

	public void setPartys(List partys) {
		this.partys = partys;
		List partyIds = new ArrayList();
		for (Party party : partys) {
			partyIds.add(party.getId());
		}
		super.setPartyIds(partyIds);
	}

	public List getTags() {
		return tags;
	}

	public void setTags(List tags) {
		this.tags = tags;
		List tagIds = new ArrayList();
		for (Tag tag : tags) {
			tagIds.add(tag.getId());
		}
		super.setTagIds(tagIds);
	}

	@Override
	public String toString() {
		return "Contacts [users=" + users + ", partys=" + partys + ", tags="
				+ tags + ", " + super.toString() + "]";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy