⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 friend.java

📁 BBS-CS 天乙社区 v6.0.1(含源码) 天乙社区6.0是一套基于JAVA技术的网络虚拟社区
💻 JAVA
字号:
package com.laoer.bbscs.bean;

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;

/**
 * <p>Title: TianYi BBS</p>
 * <p>Description: TianYi BBS System</p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: LAOER.COM/TIANYISOFT.NET</p>
 * @author laoer
 * @version 6.0
 */

public class Friend
    implements Serializable {

  /** identifier field */
  private Long id;

  /** persistent field */
  private long userID;

  /** persistent field */
  private String userName;

  /** persistent field */
  private long fid;

  /** persistent field */
  private String fname;

  /** nullable persistent field */
  private String fcomment;

  /** persistent field */
  private short isBlack;

  /** full constructor */
  public Friend(long userID, String userName, long fid, String fname,
                String fcomment, short isBlack) {
    this.userID = userID;
    this.userName = userName;
    this.fid = fid;
    this.fname = fname;
    this.fcomment = fcomment;
    this.isBlack = isBlack;
  }

  /** default constructor */
  public Friend() {
  }

  /** minimal constructor */
  public Friend(long userID, String userName, long fid, String fname,
                short isBlack) {
    this.userID = userID;
    this.userName = userName;
    this.fid = fid;
    this.fname = fname;
    this.isBlack = isBlack;
  }

  public Long getId() {
    return this.id;
  }

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

  public long getUserID() {
    return this.userID;
  }

  public void setUserID(long userID) {
    this.userID = userID;
  }

  public String getUserName() {
    return this.userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public long getFid() {
    return this.fid;
  }

  public void setFid(long fid) {
    this.fid = fid;
  }

  public String getFname() {
    return this.fname;
  }

  public void setFname(String fname) {
    this.fname = fname;
  }

  public String getFcomment() {
    return this.fcomment;
  }

  public void setFcomment(String fcomment) {
    this.fcomment = fcomment;
  }

  public short getIsBlack() {
    return this.isBlack;
  }

  public void setIsBlack(short isBlack) {
    this.isBlack = isBlack;
  }

  public String toString() {
    return new ToStringBuilder(this)
        .append("id", getId())
        .toString();
  }

  public boolean equals(Object other) {
    if (! (other instanceof Friend)) {
      return false;
    }
    Friend castOther = (Friend) other;
    return new EqualsBuilder()
        .append(this.getId(), castOther.getId())
        .isEquals();
  }

  public int hashCode() {
    return new HashCodeBuilder()
        .append(getId())
        .toHashCode();
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -