📄 note.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;
import java.util.*;
public class Note
implements Serializable {
/** identifier field */
private Long id;
/** persistent field */
private long blogid;
/** persistent field */
private long artid;
/** persistent field */
private String name;
/** nullable persistent field */
private String homepage;
/** nullable persistent field */
private String email;
/** nullable persistent field */
private int face;
/** nullable persistent field */
private String content;
private String ip;
private Date createtime;
/** full constructor */
public Note(long blogid, long artid, String name, String homepage,
String email, int face, String content) {
this.blogid = blogid;
this.artid = artid;
this.name = name;
this.homepage = homepage;
this.email = email;
this.face = face;
this.content = content;
}
/** default constructor */
public Note() {
}
/** minimal constructor */
public Note(long blogid, long artid, String name) {
this.blogid = blogid;
this.artid = artid;
this.name = name;
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public long getBlogid() {
return this.blogid;
}
public void setBlogid(long blogid) {
this.blogid = blogid;
}
public long getArtid() {
return this.artid;
}
public void setArtid(long artid) {
this.artid = artid;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getHomepage() {
return this.homepage;
}
public void setHomepage(String homepage) {
this.homepage = homepage;
}
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
public int getFace() {
return this.face;
}
public void setFace(int face) {
this.face = face;
}
public String getContent() {
return this.content;
}
public void setContent(String content) {
this.content = content;
}
public Date getCreatetime() {
return createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String toString() {
return new ToStringBuilder(this)
.append("id", getId())
.toString();
}
public boolean equals(Object other) {
if (! (other instanceof Note)) {
return false;
}
Note castOther = (Note) 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 + -