f07d652acfae001c1cf0ed8a423fa3fa

来自「《v512工作室_Java高端培训系列视频》(Java JSP Servlet 」· 代码 · 共 69 行

TXT
69
字号
package com.v512.guestbook.model;

/**
 * AdminId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class AdminId implements java.io.Serializable {

    // Fields

    private String username;
    private String password;

    // Constructors

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

    /** full constructor */
    public AdminId(String username, String password) {
	this.username = username;
	this.password = password;
    }

    // Property accessors

    public String getUsername() {
	return this.username;
    }

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

    public String getPassword() {
	return this.password;
    }

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

    public boolean equals(Object other) {
	if ((this == other))
	    return true;
	if ((other == null))
	    return false;
	if (!(other instanceof AdminId))
	    return false;
	AdminId castOther = (AdminId) other;

	return ((this.getUsername() == castOther.getUsername()) || (this.getUsername() != null
		&& castOther.getUsername() != null && this.getUsername().equals(castOther.getUsername())))
		&& ((this.getPassword() == castOther.getPassword()) || (this.getPassword() != null
			&& castOther.getPassword() != null && this.getPassword().equals(castOther.getPassword())));
    }

    public int hashCode() {
	int result = 17;

	result = 37 * result + (getUsername() == null ? 0 : this.getUsername().hashCode());
	result = 37 * result + (getPassword() == null ? 0 : this.getPassword().hashCode());
	return result;
    }

}

⌨️ 快捷键说明

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