📄 friendship.java
字号:
package com.jim.database;
/**
* Friendship generated by MyEclipse - Hibernate Tools
*/
public class Friendship implements java.io.Serializable {
// Fields
/**
*
*/
private static final long serialVersionUID = -2864336006932453976L;
private Integer id;
private Integer masterno;
private Integer subno;
// Constructors
/** default constructor */
public Friendship() {
}
public Friendship(int mNo,int sNo){
this.masterno = new Integer(mNo);
this.subno = new Integer(sNo);
}
/** full constructor */
public Friendship(Integer masterno, Integer subno) {
this.masterno = masterno;
this.subno = subno;
}
// Property accessors
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getMasterno() {
return this.masterno;
}
public void setMasterno(Integer masterno) {
this.masterno = masterno;
}
public Integer getSubno() {
return this.subno;
}
public void setSubno(Integer subno) {
this.subno = subno;
}
@Override
public boolean equals(Object obj) {
if(this == obj)
return true;
if(!(obj instanceof Friendship))
return false;
Friendship another = (Friendship)obj;
if(another.getMasterno().equals(masterno)
&& another.getSubno().equals(subno))
return true;
return false;
}
@Override
public int hashCode() {
int ret;
ret = masterno.hashCode();
ret = ret*9 - subno.hashCode();
return ret;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -