📄 videocomment.java
字号:
package cn.myvideosite.data.model.bean;
import java.util.Date;
public class VideoComment implements Comparable<Object>{
private int remarkId;
private int userId;
private int getScore;
private String commentText;
private Date publishTime;
/**
*
*/
public VideoComment() {
}
public VideoComment(int userId,String commentText, int getScore,Date publishTime ) {
this.commentText = commentText;
this.getScore = getScore;
this.publishTime = publishTime;
this.userId = userId;
}
/**
* @param commentText
* @param getScore
* @param id
* @param publishTime
* @param remarkId
* @param score
* @param userId
*/
public VideoComment( int remarkId,int userId,String commentText, int getScore,Date publishTime ) {
this.commentText = commentText;
this.getScore = getScore;
this.publishTime = publishTime;
this.remarkId = remarkId;
this.userId = userId;
}
/**
* @return the remarkId
*/
public int getRemarkId() {
return remarkId;
}
/**
* @param remarkId the remarkId to set
*/
public void setRemarkId(int remarkId) {
this.remarkId = remarkId;
}
/**
* @return the userId
*/
public int getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(int userId) {
this.userId = userId;
}
/**
* @return the getScore
*/
public int getGetScore() {
return getScore;
}
/**
* @param getScore the getScore to set
*/
public void setGetScore(int getScore) {
this.getScore = getScore;
}
/**
* @return the commentText
*/
public String getCommentText() {
return commentText;
}
/**
* @param commentText the commentText to set
*/
public void setCommentText(String commentText) {
this.commentText = commentText;
}
/**
* @return the publishTime
*/
public Date getPublishTime() {
return publishTime;
}
/**
* @param publishTime the publishTime to set
*/
public void setPublishTime(Date publishTime) {
this.publishTime = publishTime;
}
public String toString(){
return new StringBuffer("remarkId=").append(remarkId).append(",userId=").append(userId)
.append(",getScore=").append(getScore).append(",commentText=").append(commentText).append(",publishTime=").append(publishTime).toString();
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((publishTime == null) ? 0 : publishTime.hashCode());
result = prime * result + remarkId;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
VideoComment other = (VideoComment) obj;
if (publishTime == null) {
if (other.publishTime != null)
return false;
} else if (!publishTime.equals(other.publishTime))
return false;
if (remarkId != other.remarkId)
return false;
return true;
}
public int compareTo(Object o) {
VideoComment other=(VideoComment)o;
if(remarkId<other.remarkId) return -1;
else if(remarkId>other.remarkId) return 1;
else return 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -