UserInfo.java
资源名称:Myblog.rar [点击查看]
上传用户:wlfwy2004
上传日期:2016-12-12
资源大小:33978k
文件大小:7k
源码类别:
Jsp/Servlet
开发平台:
Java
- package com.opensource.blog.model;
- import java.io.Serializable;
- import org.apache.commons.lang.builder.EqualsBuilder;
- import org.apache.commons.lang.builder.HashCodeBuilder;
- import org.apache.commons.lang.builder.ToStringBuilder;
- public class UserInfo
- implements Serializable {
- /** identifier field */
- private Long id;
- /** persistent field */
- private String username;
- /** persistent field */
- private String nickname;
- /** persistent field */
- private String passwd;
- /** persistent field */
- private String passwdre;
- /** persistent field */
- private String question;
- /** persistent field */
- private String answer;
- /** persistent field */
- private String email;
- /** persistent field */
- private int sex;
- /** nullable persistent field */
- private int age;
- /** nullable persistent field */
- private int pro;
- /** nullable persistent field */
- private String city;
- /** nullable persistent field */
- private int work;
- /** nullable persistent field */
- private int income;
- /** nullable persistent field */
- private int industry;
- /** nullable persistent field */
- private int edulevel;
- /** nullable persistent field */
- private String mb;
- /** nullable persistent field */
- private String address;
- /** nullable persistent field */
- private int face;
- /** nullable persistent field */
- private String sign;
- /** nullable persistent field */
- private long lastlogintime;
- /** nullable persistent field */
- private String lastloginip;
- /** nullable persistent field */
- private int logintimes;
- /** full constructor */
- public UserInfo(String username, String nickname, String passwd,
- String passwdre, String question, String answer, String email,
- int sex, int age, int pro, String city, int work, int income,
- int industry, int edulevel, String mb, String address,
- int face, String sign, long lastlogintime, String lastloginip,
- int logintimes) {
- this.username = username;
- this.nickname = nickname;
- this.passwd = passwd;
- this.passwdre = passwdre;
- this.question = question;
- this.answer = answer;
- this.email = email;
- this.sex = sex;
- this.age = age;
- this.pro = pro;
- this.city = city;
- this.work = work;
- this.income = income;
- this.industry = industry;
- this.edulevel = edulevel;
- this.mb = mb;
- this.address = address;
- this.face = face;
- this.sign = sign;
- this.lastlogintime = lastlogintime;
- this.lastloginip = lastloginip;
- this.logintimes = logintimes;
- }
- /** default constructor */
- public UserInfo() {
- }
- /** minimal constructor */
- public UserInfo(String username, String nickname, String passwd,
- String passwdre, String question, String answer, String email,
- int sex) {
- this.username = username;
- this.nickname = nickname;
- this.passwd = passwd;
- this.passwdre = passwdre;
- this.question = question;
- this.answer = answer;
- this.email = email;
- this.sex = sex;
- }
- public Long getId() {
- return this.id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getUsername() {
- return this.username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String getNickname() {
- return this.nickname;
- }
- public void setNickname(String nickname) {
- this.nickname = nickname;
- }
- public String getPasswd() {
- return this.passwd;
- }
- public void setPasswd(String passwd) {
- this.passwd = passwd;
- }
- public String getPasswdre() {
- return this.passwdre;
- }
- public void setPasswdre(String passwdre) {
- this.passwdre = passwdre;
- }
- public String getQuestion() {
- return this.question;
- }
- public void setQuestion(String question) {
- this.question = question;
- }
- public String getAnswer() {
- return this.answer;
- }
- public void setAnswer(String answer) {
- this.answer = answer;
- }
- public String getEmail() {
- return this.email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public int getSex() {
- return this.sex;
- }
- public void setSex(int sex) {
- this.sex = sex;
- }
- public int getAge() {
- return this.age;
- }
- public void setAge(int age) {
- this.age = age;
- }
- public int getPro() {
- return this.pro;
- }
- public void setPro(int pro) {
- this.pro = pro;
- }
- public String getCity() {
- return this.city;
- }
- public void setCity(String city) {
- this.city = city;
- }
- public int getWork() {
- return this.work;
- }
- public void setWork(int work) {
- this.work = work;
- }
- public int getIncome() {
- return this.income;
- }
- public void setIncome(int income) {
- this.income = income;
- }
- public int getIndustry() {
- return this.industry;
- }
- public void setIndustry(int industry) {
- this.industry = industry;
- }
- public int getEdulevel() {
- return this.edulevel;
- }
- public void setEdulevel(int edulevel) {
- this.edulevel = edulevel;
- }
- public String getMb() {
- return this.mb;
- }
- public void setMb(String mb) {
- this.mb = mb;
- }
- public String getAddress() {
- return this.address;
- }
- public void setAddress(String address) {
- this.address = address;
- }
- public int getFace() {
- return this.face;
- }
- public void setFace(int face) {
- this.face = face;
- }
- public String getSign() {
- return this.sign;
- }
- public void setSign(String sign) {
- this.sign = sign;
- }
- public long getLastlogintime() {
- return this.lastlogintime;
- }
- public void setLastlogintime(long lastlogintime) {
- this.lastlogintime = lastlogintime;
- }
- public String getLastloginip() {
- return this.lastloginip;
- }
- public void setLastloginip(String lastloginip) {
- this.lastloginip = lastloginip;
- }
- public int getLogintimes() {
- return this.logintimes;
- }
- public void setLogintimes(int logintimes) {
- this.logintimes = logintimes;
- }
- public String toString() {
- return new ToStringBuilder(this)
- .append("id", getId())
- .toString();
- }
- public boolean equals(Object other) {
- if (! (other instanceof UserInfo)) {
- return false;
- }
- UserInfo castOther = (UserInfo) other;
- return new EqualsBuilder()
- .append(this.getId(), castOther.getId())
- .isEquals();
- }
- public int hashCode() {
- return new HashCodeBuilder()
- .append(getId())
- .toHashCode();
- }
- }