📄 basensthread.java
字号:
package com.singnet.bean.base;
import java.lang.Comparable;
import java.io.Serializable;
/**
* This is an object that contains data related to the ns_post table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="ns_post"
*/
public abstract class BaseNsThread extends com.singnet.bean.NsPost implements Comparable, Serializable {
public static String REF = "NsThread";
public static String PROP_POST_REPLY = "postReply";
public static String PROP_POST_HIT = "postHit";
public static String PROP_ID = "id";
// constructors
public BaseNsThread () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseNsThread (java.lang.Long id) {
super(id);
}
/**
* Constructor for required fields
*/
public BaseNsThread (
java.lang.Long id,
java.lang.Long postPid,
java.lang.String postUid,
java.lang.String postUser,
java.lang.String postTitle,
java.lang.String postContent) {
super (
id,
postPid,
postUid,
postUser,
postTitle,
postContent);
}
private int hashCode = Integer.MIN_VALUE;
// fields
private java.lang.Long postHit;
private java.lang.Long postReply;
/**
* Return the value associated with the column: post_hit
*/
public java.lang.Long getPostHit () {
return postHit;
}
/**
* Set the value related to the column: post_hit
* @param postHit the post_hit value
*/
public void setPostHit (java.lang.Long postHit) {
this.postHit = postHit;
}
/**
* Return the value associated with the column: post_reply
*/
public java.lang.Long getPostReply () {
return postReply;
}
/**
* Set the value related to the column: post_reply
* @param postReply the post_reply value
*/
public void setPostReply (java.lang.Long postReply) {
this.postReply = postReply;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.singnet.bean.NsThread)) return false;
else {
com.singnet.bean.NsThread nsThread = (com.singnet.bean.NsThread) obj;
if (null == this.getId() || null == nsThread.getId()) return false;
else return (this.getId().equals(nsThread.getId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public int compareTo (Object obj) {
if (obj.hashCode() > hashCode()) return 1;
else if (obj.hashCode() < hashCode()) return -1;
else return 0;
}
public String toString () {
return super.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -