package com.wxpn.tutorial.ec.bean;

import java.util.StringTokenizer;

/**
 * 描述: 描述用户信息类
 * 
 * @Copyright (c) 2005-2008 Wang Xining
 * @author 王夕宁
 * @version 1.0
 */

public class ECMember {
	private int id;

	private String username;

	private String realname;

	private String password;

	private String email;

	private int gender;

	private String strGender;

	private String phone;

	private String pwd_problem;

	private String pwd_answer;

	private String province;

	private String education;

	private String hobbies;

	private String hobby;

	private String selfintro;

	public String getEducation() {
		return education;
	}

	public void setEducation(String education) {
		this.education = education;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public int getGender() {
		return gender;
	}

	public void setGender(int gender) {
		this.gender = gender;
	}

	public String getHobbies() {
		return hobbies;
	}

	public void setHobbies(String hobbies) {
		this.hobbies = hobbies;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getPwd_answer() {
		return pwd_answer;
	}

	public void setPwd_answer(String pwd_answer) {
		this.pwd_answer = pwd_answer;
	}

	public String getPwd_problem() {
		return pwd_problem;
	}

	public void setPwd_problem(String pwd_problem) {
		this.pwd_problem = pwd_problem;
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public String getSelfintro() {
		return selfintro;
	}

	public void setSelfintro(String selfintro) {
		this.selfintro = selfintro;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getStrGender() {
		if (gender == 0)
			return "女";
		else
			return "男";
	}

	public String getHobby() {
		StringTokenizer st = new StringTokenizer(getHobbies(), "@");
		StringBuffer sb = new StringBuffer();
		while (st.hasMoreElements()) {
			switch ((Integer.parseInt(st.nextElement().toString()))) {
			case 1:
				sb.append("计算机行业/软硬件  ");
				break;
			case 2:
				sb.append("旅游、度假  ");
				break;
			case 3:
				sb.append("上网聊天、游戏  ");
				break;
			case 4:
				sb.append("阅读、图书音像  ");
				break;
			case 5:
				sb.append("文化/教育/育儿  ");
				break;
			case 6:
				sb.append("情感生活  ");
				break;
			case 7:
				sb.append("影音娱乐  ");
				break;
			case 8:
				sb.append("生活资讯  ");
				break;
			case 9:
				sb.append("医疗健康  ");
				break;
			case 10:
				sb.append("房产家居  ");
				break;
			default:
				sb.append("");
			}
		}
		return sb.toString();
	}
}
