publicclassUserimplementsjava.io.Serializable{ /** * */ privatestaticfinallong serialVersionUID = 1L; private String id; private String name; private String password; private String age; private String sex; /** * @return the id */ public String getId(){ return id; } /** * @param id the id to set */ publicvoidsetId(String id){ this.id = id; } /** * @return the name */ public String getName(){ return name; } /** * @param name the name to set */ publicvoidsetName(String name){ this.name = name; } /** * @return the password */ public String getPassword(){ return password; } /** * @param password the password to set */ publicvoidsetPassword(String password){ this.password = password; } /** * @return the age */ public String getAge(){ return age; } /** * @param age the age to set */ publicvoidsetAge(String age){ this.age = age; } /** * @return the sex */ public String getSex(){ return sex; } /** * @param sex the sex to set */ publicvoidsetSex(String sex){ this.sex = sex; } public Map<String, String> toMap(){ Map<String, String> map=new HashMap<String, String>(); map.put("id", this.id); map.put("name", this.name); map.put("password", this.password); map.put("age", this.age); map.put("sex", this.sex); return map; } }